ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1501. Sense of Beauty

Possible wrong example test#1
Posted by Ont 6 Dec 2006 08:45
Try to take as described in answer and you give this order of the cards:

for test
0011
0110
and answer
22121112 ----> 01010(11)0 (mistake!)

True possible answer is 22121121.

Am I right?
Re: Possible wrong example test#1
Posted by Nechaev Ilya (Rybinsk SAAT) 6 Dec 2006 18:24
I think you don't understand problem statement. Sample test is right. You don't need to make sequence like 01010101.....
Read the task again.

Edited by author 06.12.2006 18:24
Re: Possible wrong example test#1
Posted by Ont 8 Dec 2006 19:02
But it's just hard to understand for me...
Why example is true?  If we take card 1 than card 1 than pile with ones is lager than pile with zeros. And lager by 2 cards, not by 1! See problem - <...> At each moment the resulting piles must not differ in size by more than one card <...>
Re: Possible wrong example test#1
Posted by Nechaev Ilya (Rybinsk SAAT) 8 Dec 2006 23:20
See table:

zero's,      one's,       difference
---|--------
0  |      1            0                 1
1  |      1            1                 0
0  |      2            1                 1
1  |      2            2                 0
0  |      3            2                 1
1  |      3            3                 0
1  |      3            4                 1
0  |      4            4                 0

I think all is right.

Edited by author 08.12.2006 23:22
Re: Possible wrong example test#1
Posted by Ont 9 Dec 2006 13:28
Yes :).  I was very stupid....
Many sanks, now i will try to solve it.