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 1134. Cards

SEE THE PROBLEMS
Posted by sultan 19 Aug 2002 15:16
what will be the answer of
the following
and please let me know why
1) 1 2 -1 3
2) 1 2 0 4
3) -1 -2 3 0
You haven't understood the problem..see here :)
Posted by Vladimir Milenov Vasilev 20 Aug 2002 17:46
Hi!
This problem is not very hard, if you understand it. So, the cards
are numerated in this way:
the first card has 0 and 1 on it's two sides, the second has 1 and 2,
the third has 2 and 3...and so on..the n-th card has n-1 and n on its
both sides - all the numbers are positive!!!!
So, the your first and third  tests are incorect - such an input will
not ocure, and the answer for the second is YES, because:
First NICK has taken the second card(with numbers 1 and 2), after
that the third card(with numbers 2 and 3), after that the first card
(with numbers 0 and 1) and on the end the forth card(with numbers 4
and 5). See that he says one of the two numbers writen on the card
and each card is taken no more than once!
I hope, this will help :)
Bye!
from Vlado