演算法極簡單,但是presentation format可以搞死人的一題...唉。
附網路上偷來的測資:
MATCHES CHEESECAKE PICNIC EXCUSES
CHEESECAKE MATCHES EXCUSES PICNIC
PEANUT BANANA VACUUM GREEDY
PICNIC EXCUSES MATCHES CHEESECAKE
A A B B
STRINGA STRINGB STRINGC STRINGD
ABCDEF GHIJKF ABCDEF GHIJKF
AABBCC DDFFBBSS KHGKHD DFHGDKJGH
PREFECT DEFER DEFER PREFECT
DEFER PREFECT PREFECT DEFER
BALL CATAM BALL BA
#
----- ANSWER ------
C
H
E
E
S
E E
C X
MATCHES PICNIC
K U
E S
E
S
M
A P
T I
CHEESECAKE EXCUSES
H N
E I
S C
Unable to make two crosses
C
H
E
E
S
E E
X C
PICNIC MATCHES
U K
S E
E
S
A B
STRINGA STRINGC
T T
R R
I I
N N
G G
B D
G G
H H
I I
J J
K K
ABCDEF ABCDEF
D
D F
D H
F G
F D
AABBCC KHGKHD
B J
S G
S H
D
E
F P
E R
PREFECT DEFER
F
E
C
T
D
E
P F
R E
DEFER PREFECT
F
E
C
T
C
BALL BALL
T A
A
M
沒有留言:
張貼留言