ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1251. Менеджер кладбища

Don't understand sample
Послано Nazar Revutsky 16 мар 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
Послано Leonid Volkov 16 мар 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 :)
Послано Nazar Revutsky 17 мар 2003 01:19
Why is sample OK?
Послано Kovychev R. A. 17 мар 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?
Послано Nazar Revutsky 19 мар 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?
Послано Kovychev R. A. 19 мар 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?
Послано Nazar Revutsky 19 мар 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).