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

Обсуждение задачи 1379. Транспортировка кружек

For those who gets WA #2 AND ADMINS!
Послано it4.kp 22 июл 2006 20:05
This code:
...
int l=0, h=10000000, mid;
while (l+1<h) {
  mid=(l+h)/2;
  if (can(mid))l=mid; else h=mid;
}
...
gets WA #2

but this one:
...
int l=0, h=10000001, mid;
while (l+1<h) {
  mid=(l+h)/2;
  if (can(mid))l=mid; else h=mid;
}
...

gets AC! Feel the diference!

TO ADMINS:
Problem statement says road capacity < 10^9, so we'll never be able to deliver 10^7 cups, since truck weights 3*10^6 grammes. But obviously answer on TEST #2 is 10^7. Fix it, please.
You are obviously wrong (+)
Послано Dmitry 'Diman_YES' Kovalioff 22 июл 2006 20:51
There is no number in the input files that exceeds 10^9. The tests are absolutely correct. The answer for the second test is 10^7. But it is possible when N=1.

P.S. It is a common mistake. Always test your program on boundary tests.
Re: You are obviously wrong (+)
Послано it4.kp 23 июл 2006 05:36
Well, technically you are right. But let's take a look at the problem statement... First, we can see phrase:

"Of course, it is impossible to deliver 10000000 cups (this is the amount of cups ordered by organizing committee) in a ONE trip."

And then the output format:

"Print the only number: the total amount of the cups (it must be as much as possible), which can be delivered in the FIRST trip of the truck in a time of 24 hours."

After that I don't think answer 10^7 is full of sense.

And why to write all that story with delivering cups if N=1?

IMO problem statement should not be tricky.