|
|
back to boardYou may see from the details. My three programs are nearly the same, but I got different time. Because I'm using CPP and I'm using FStream.h. First, n<=100 is exact! Number of Clients <= 10000! The time, you can use longint to record. I use "int" in cpp as "longint" in pascal, and I've got ACed. Don't be lost in this hint: If 1000 days since the funeral passed and the tomb is not dug over then the forgetful relatives wouldn't find the tomb and wouldn't see its neighbors. Good luck. Others are quite good. And the problem is quite easy in fact. I still have a question: If the funeral was on day 1, and on day 999 the tomb was visited, can the tomb be dug on day 1002? If on time 1, the client was buried. And on time 1001, he was visited. So if there was no more visit, this tomb cannot be dug over before time 2002. And at the same time, after time 1001, someone wanted to visit the tomb, he wouldn't find the place so the visit would effect nothing. Am I right? client #2 was visited 3 times, on 500, 1236, 2032. so the client came on time 2033 had no place to bury. and also the client came on time 300, 1001, 1003. so the answer is 4. which point did i sill misunderstand, please? > client #2 was visited 3 times, on 500, 1236, 2032. so the client > came on time 2033 had no place to bury. No, at 2004 all tombs exept the one, where client 2 rests, are dug over (empty). At 2032 relatives of clint 2 saw three empty neighbouring tombs. > and also the client came on time 300, 1001, 1003. that is true, 3 clients altogether In a hint 6 instead of "since the funeral" in should be "since the last visit" Hi there. I've got AC and would like to clarify some thing. You say: >Don't be lost in this hint: >If 1000 days since the funeral passed and the tomb is not >dug over then the forgetful relatives wouldn't find the tomb >and wouldn't see its neighbors. I think this is incorrect. In fact (I got AC before looking at the webboard for the first time) I had the following code when checking whether the visit will succeed: if (time <= last_visit[visit_who] + 1000) //visit may happen, need to check other conditions else //visit impossible, they don't remember where the tomb is This must be what you mean, right? Well, I got WA on test 6 with this code, and got AC after removing this condition, so, the real condition to check if visit will succeed is whether anybody still affects - either the last visit of relatives, or the last visit of neighbours. |
|
|