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 1251. Cemetery Manager

HINT I've considered many thing and got AC hardly
Posted by Love SJC 20 Mar 2008 14:43
I have submitted 36 times and got AC.
If someone is puzzled and I hope I can help you.
1.first,read the problem's hint carefully.
2.If a tomb was visited on day T then its neighbors may be dug over on day T+101.It said "visited",so if a client was buried on day T,and a client could be buried near him on day T+1....It means when a client was buried,he has no last visit,also you can think his last visit is on day -10000.
3.A tomb is dug over as soon as there is an opportunity
Becareful.AS SOON AS.
4.If someone's tomb was not dug,his relatives can visit him successful.
5.Today is T,if a tomb's last visit is before t-1000,and all it's neighbor's last visit is before t-100,it will be dug at once.
So sorry for my poor English.
I hope these can help you.