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 1105. Observers Coloring

Here is the explanation of the output:
3 - number of observers
2
5
7
These are the observers we shall color, and now we consider only
observers 2,5 and 7(because we are interested only in colored
observers):
2:  0.0 - 10.0
5:  9.0 - 18.0
7: 19.0 - 20.0
So, from 0.0 to 9.0 (during 9 minutes)there was only observer 2 in
the room, from 10 to 18 (during 8 minutes)- only obesver 5, and from
19 to 20 (during one minute) there was only observer 7. So, total
time is 9+8+1=18, which is not less than 2/3*(20.0-0.0)=13.3333
Of course, this output is not the only possible output for this test
case, for example my program's output is:
3
2
5
4
I hope this will help
Good luck!