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

Обсуждение задачи 1200. Рога и копыта

Mathematical solution with O(1) efficiency - why WA#2?Tests and help seriously needed...
Послано Intelligent_Design 24 сен 2006 23:39
Hi.
I've found a formulae to solve this problem as the fastest variant,but still experiencing some minor problems with this task,cause I've got WA on the 2nd test...
I've also tried all the tests I found in this thread,the programme did the well...however,my problem doesn't disappear...
Could you please help me,give some more tests or so?
Re: Mathematical solution with O(1) efficiency - why WA#2?Tests and help seriously needed...
Послано IYI_Blade 27 сен 2006 23:04
Do you handle the case where Horns + Hoofs can be < K

For example
2 2
10
The solution is
2.00
1 1
Re: Mathematical solution with O(1) efficiency - why WA#2?Tests and help seriously needed...
Послано Bobur 28 янв 2009 00:11
i think you did this like this::
x := TRUNC((a+1)/2);
y := TRUNC((b+1)/2);
you must write like this:
x := TRUNC((a+1)/2);
y := TRUNC(b/2);
i don't know why, but it help me!!!
good luck!