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

Обсуждение задачи 1031. Железнодорожные билеты

How do you solve this problem very fast , what's the time complexity. please give me some hint. here or piyawut@se-ed.net
Послано MadPsyentist/Sam 2 фев 2002 21:27
Re: How do you solve this problem very fast , what's the time complexity. please give me some hint. here or piyawut@se-ed.net
Послано Jordan 21 фев 2002 10:33
> The Time complexity is o(n^2),is it fast enough?
Re: How do you solve this problem very fast , what's the time complexity. please give me some hint. here or piyawut@se-ed.net
Послано Pete Lupherenko 24 апр 2002 23:45
>>The Time complexity is o(n^2),is it fast enough?
I think yes, but there is a rather simple solution with the
complexity of O(n).
It's really simple, just do some thinking :o)

Besides, I think I can't explain the idea in English... :(
Re: How do you solve this problem very fast , what's the time complexity. please give me some hint. here or piyawut@se-ed.net
Послано lotus4h 17 апр 2008 15:56
Yes...You can use DP to solve.but not DFS or other searching method..