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

Обсуждение задачи 1990. Гонки на карах

What happened with my program on Test #24?
Послано 198808xc 13 апр 2014 03:46
My algorithm is linear, except the quicksort procedure.
It gets TLE at Test #24.

What happened?
I have checked the program multiple times.

Thanks.
Re: What happened with my program on Test #24?
Послано Harkonnen 12 авг 2022 10:04
It's very weird - almost happened to me too (0.934 sec, dunno which test). After that I switched to 'int' and kept 'double' only for boundaries - it became 0.5 sec. Then I precalculated 1.0/(y[i+1]-y[i]) - timing didn't change. Then I suspected it was some anti-qsort case, tried to random-shuffle, even tried heapsort - no matter, still 0.5 sec. Then I've noticed that I am submitting it as GCC instead of VisualC (was testing another problem before on GCC/clang) - got 0.171 sec with same code :) GCC suxx. Dunno if it's input or sorting or what. I was using scanf/printf (cin/cout are slower in VisualC even with iostream::sync_with_stdio(false)).