|
|
back to boardDon't understand sample 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 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. Why is sample OK? 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? => 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? 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? > 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). |
|
|