Page 1 of 1

520 - Append

Posted: Sat Dec 30, 2006 10:50 pm
by stcheung
This problem is a bit vague. When it says "expressing the sequence Cw in the form CuCv" does it mean the Cu and Cv must use the same original pairs from Cw? In other words, Cu is the head of Cw while Cv is the tail of Cw? If so, does anyone have some sample output?

And is my following sample output correct (the number before : is my output for the next block of input)? THANKS
1:
0 a
1 1
0 b
3 3
3 3
3 2
0 c

1:
0 a
1 1
0 b
3 3
3 3
3 2
0 c

2:
0 a
0 a
0 a
0 a
3 3
0 c

2:
0 a
0 b
0 c
0 d
2 2
3 1
5 5

1:
0 a
0 b

0:
0 a

1:
0 a
1 1
0 b

0:
0 a
0 b
2 1

2:
0 a
1 1
0 b
1 1
0 c
1 1

Re: 520 Append - Need clarification and also sample output

Posted: Thu Mar 27, 2008 8:01 pm
by Jan
stcheung wrote:This problem is a bit vague. When it says "expressing the sequence Cw in the form CuCv" does it mean the Cu and Cv must use the same original pairs from Cw? In other words, Cu is the head of Cw while Cv is the tail of Cw?
Yes.

And your cases are correct.

Re: 520 - Append

Posted: Tue May 02, 2017 5:37 am
by metaphysis
Jan is right. At first, I misunderstood the problem, so got WA two times.