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
520 - Append
Moderator: Board moderators
Re: 520 Append - Need clarification and also sample output
Yes.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?
And your cases are correct.
-
- Experienced poster
- Posts: 139
- Joined: Wed May 18, 2011 3:04 pm
Re: 520 - Append
Jan is right. At first, I misunderstood the problem, so got WA two times.
metaphysis: http://uhunt.onlinejudge.org/id/95895
My solutions for UVa problems: https://github.com/metaphysis/Code.
My solutions for UVa problems: https://github.com/metaphysis/Code.