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 1787. Turn for MEGA

Algorithm key points
Posted by DiG 28 Apr 2012 14:57
1) To get current count of cars in traffic jam, you have to add count of city-cars and previous jam-cars and substract cpm-value (car per minute).
2) Don't forget to set to zero jam-cars, if jam-cars value less than zero, because, in that case, there is no cars on crossroad in that moment!

Good Luck!