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

Don't understand sample
Posted by Nazar Revutsky 16 Mar 2003 13:36
What clients have been sent to a crematorium ???

   2 2
1: 1 d
2: 1 d
3: 1 d
4: 1 d
5: 300 d
   500 v 2
6: 1001 d
7: 1002 d
8: 1002 d
9: 1003 v 3
10:1003 d
11:1003 d
   1236 v 2
   2032 v 2
12:2033 d

I think 5,6,11,12 (4 clients)
Sample could be wrong
Posted by Leonid Volkov 16 Mar 2003 22:53
As far as I can judge, there is a misprint in the sample output. You
are right, the correct answer should be four. Thus, let us wait a
couple of days, until the consultation with the task author will be
possible, and he will answer for sure.
Sorry Sample is OK :)
Posted by Nazar Revutsky 17 Mar 2003 01:19
Why is sample OK?
Posted by Kovychev R. A. 17 Mar 2003 22:30
   2 2
1: 1 d
2: 1 d
3: 1 d
4: 1 d
5: 300 d
   500 v 2
6: 1001 d
7: 1002 d
8: 1002 d
   1003 v 3
9: 1003 d
10:1003 d
   1236 v 2
   2032 v 2
11:2033 d

I think:
First 2 clients in crematorium are 5 and 6.
Next 3 clients are 8,9,10 because client-neighbour 7 is added
recently.
Last client is 11 because client-neighbour 2 is visited recently.

Totally 6 clients are in the crematorium.‰
Re: Why is sample OK?
Posted by Nazar Revutsky 19 Mar 2003 04:21

    => 4 clear
1 d
    => 3 clear
1 d
    => 2 clear
1 d
    => 1 clear
1 d
    => 0 clear
300 d    ->to the crematory
500 v 2
1001 d   ->to the crematory
    => 3 clear
1002 d
    => 2 clear
1002 d
    => 1 clear
1003 v 3
1003 d
    => 0 clear
1003 d   ->to the crematory
1236 v 2
    => 3 clear
2032 v 2
2033 d
    => 2 clear


3 to clematory
Why?
Posted by Kovychev R. A. 19 Mar 2003 13:54
It is said "the manager puts a new client on a used place only if all
the neighboring graves have not been visited for the last 100 days".
So for 2x2 "2032 v 2" means all graves can't be used for clients until
2133.
So last client must be in crematorium.
I tried your interpretation but got WA 0.01 sec‰
Re: Why?
Posted by Nazar Revutsky 19 Mar 2003 22:42
> It is said "the manager puts a new client on a used place only if
all
the neighboring graves have not been visited for the last 100 days".
> So for 2x2 "2032 v 2" means all graves can't be used for clients
until
2133.
> So last client must be in crematorium.
> I tried your interpretation but got WA 0.01 sec‰


2004 day manager clear all places except 2 (1236 v 2).