520 - Append

All about problems in Volume 5. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
stcheung
Experienced poster
Posts: 114
Joined: Mon Nov 18, 2002 6:48 am
Contact:

520 - Append

Post 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
Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:

Re: 520 Append - Need clarification and also sample output

Post 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.
metaphysis
Experienced poster
Posts: 139
Joined: Wed May 18, 2011 3:04 pm

Re: 520 - Append

Post by metaphysis »

Jan is right. At first, I misunderstood the problem, so got WA two times.
Post Reply

Return to “Volume 5 (500-599)”