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

Обсуждение задачи 1397. Игра в точки

To admins: Time Limit in Java
Послано crdp 19 сен 2007 22:47
I have sent two solutions: one in Java, one in Pascal.
Java solution is more efficiently.
But Java solution got TL1, and Pascal solution got AC.
For optimization, i killed making instances of all classes in Java, but still TL1.
Can You change java time limit for this problem?
Re: To admins: Time Limit in Java
Послано Sandro (USU) 19 сен 2007 23:54
There is no possibility to set different TL for different languages in Timus Online Judge. Your Java solution works more than 5 seconds on 1st test. Write more effective solution. By the way, try to avoid Math.hypot in your program; sqrt works faster.
Re: To admins: Time Limit in Java
Послано crdp 20 сен 2007 14:25
Thanks. But I think, that this situation is unfair for Java-programmers.
Re: To admins: Time Limit in Java
Послано Vladimir Yakovlev (USU) 20 сен 2007 15:17
Change Math.hypot to Math.sqrt and you'll get 20x acceleration! Solution will work even faster than your pascal solution.

So, this problem can be solved in Java with the same algorithm.