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

Обсуждение задачи 1005. Куча камней

Показать все сообщения Спрятать все сообщения

Can't resolve problem on ruby, Time Exceed Issue Sergey Khvan 6 ноя 2015 18:39
Hello, I've implemented two solutions: DP and Brut Force on ruby,
but still no luck to pass tests (#3, #4).
Does someone have good solution on ruby for that problem?
Is it my bad hands, or tests were changed and ruby cant process it fast.

If you have accepted solution, please try to submit it again.
Also, if you resolved it on ruby, please give some specific hints about solution.
Thanks!
I don't know much about Ruby but I've solved this problem on Python which I suppose has  similar performance. It's very important to optimize algorithm very well in order to pass all tests on those script languages. Time your code and try not to exceed 1 sec. limit with 20 stones. Sorry, no hints about algorithm from me.