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

Обсуждение задачи 1876. Утро сороконожки

Clarification on the task
Послано Aleksandr 24 янв 2017 17:09
Please, correct me if I am wrong.
In the worst case, first of all our centipede will take 40 right slippers (40slip * 2sec)
After that it will take all of the remaining right slippers ((rightSlippers-40) * 2sec)
Then, because there are no right slippers left, it will take 40 left slippers(40slip * 1sec)
And finally take remaining left slippers and throw them away ((leftSlippers-40) * 2sec)
I guess I didn't understand the task correctly, may someone explain it to me?
Re: Clarification on the task
Послано Aleksandr 24 янв 2017 17:25
Update:

I guess I should of have searched a little more, I found what is the case.

If any of you are interested the solution is that there may be another situation where we have >40 left slippers, so first we take 39 right ones, then 40 left ones, throw remaining lefts away and take our last right. Depending on which one is longer, you may use this solution or the one I posted before.

P.S. of course you don't have to throw away the remaining slippers once all legs are dressed, my bad.