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 1029. Ministry

What does the output mean?
Posted by Dan Ghinea 24 Jun 2001 01:56
I don't understand how should the output be written. Why
are there five numbers in the output? What do they mean?

Can anyone tell me, please? Thank you.
Re: What does the output mean?
Posted by tau 26 Jun 2001 20:55
The number represent the room on the k-th floor where the
guy is at a moment of time. Initially k is 0. Because the
guy goes to next floor without changing it's room
corespondingly that means that when there appear 2
identical numbers on consecutive lines we know that he got
one flor up.


Ex
If the number of camere is 4 and the number of floors is 3
and we have output
3
3
2
1
1

it means that the guy followed this path:
 1   2   3   4   // camerele
---------------
| | | | |v| | |  // floor 1
---------------
|v| |<| |<| | |  // floor 2
---------------
|!| | | | | | |  // etaju 3
---------------
> I don't understand how should the output be written. Why
> are there five numbers in the output? What do they mean?
>
> Can anyone tell me, please? Thank you.
Multumesc mult!
Posted by Dan Ghinea 1 Jul 2001 03:36