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

Обсуждение задачи 1004. Экскурсия

Confused with description, please help.
Послано Alexander Shulgin 29 июл 2004 18:53
Greetings, The One, Who Reads This.

Let us consider such input:

4 2
1 2 1
3 4 10
-1

Why should not we consider a way from 1st crossing to the 2nd one and back (as roads _are_ two-way) a sightseeing route ?

k = 2

x1 = 1
x2 = 2

x1 != x2 (numbers x1 and x2 _are_ different)

y1: 1->2
y2: 2->1

Thanks,
Alex
Note: K > 2 (!)
Послано xakac 12 сен 2004 18:54
In this case you have k = 1 roads. Even if you connect two crossing points with two different roads, you will have k = 2. But the condition says that there must be k > 2 roads.

Read in carefully.
(continue)
Послано xakac 12 сен 2004 18:57
And the condition 'two-way roads' is needed only for you don't mind in wich direction you can go by the road.