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

Обсуждение задачи 1162. Currency Exchange

Any hint? How to solve it with shortest path?
Послано Maigo Akisame (maigoakisame@yahoo.com.cn) 24 окт 2004 06:12
Re: Any hint? How to solve it with shortest path?
Послано HybridTheory 24 окт 2004 19:28
Bellman-Ford.
Do Bellman-Ford once to find the longest path.
If there is a positive cycle then Yes,otherwise No.
Please in 1217 help I need answer N=12, 14, 16. help I am in contest
Послано BSP 24 окт 2004 19:33
I am in contest know please help I must solve this problem
1217. N = 12, 14, 16.
Re: Please in 1217 help I need answer N=12, 14, 16. help I am in contest
Послано Maigo Akisame (maigoakisame@yahoo.com.cn) 25 окт 2004 10:33
12--3052783504
14--266095289560
16--23194144960900
GL!
What's the length of edges?
Послано Maigo Akisame (maigoakisame@yahoo.com.cn) 25 окт 2004 10:33
I get WA #13, could you help me?
Послано Maigo Akisame (maigoakisame@yahoo.com.cn) 25 окт 2004 15:45
[code deleted]

Edited by moderator 23.06.2006 17:15
Here's what's wrong in your algorithm (+)
Послано Michael Rybak (accepted@ukr.net) 26 окт 2004 20:36
this is wrong:

...
else begin
writeln('YES');
halt;
end;

It isn't necessarily a YES. You can't be sure that there's positive cycle by only condition that you've found 2 different positive values for money[b]. Your code can be easily modified (took me 1 min) though in such a way that you get AC, checking the condition of 'YES' answer correctly. I can write you an email, telling how to do that, if you want.
I've written a new prog, but it's WA 19. Can you help?
Послано Maigo Akisame (maigoakisame@yahoo.com.cn) 31 окт 2004 10:20
[code deleted]

Edited by moderator 23.06.2006 17:15
Ah, it's really easy to get AC. It's YES only if i=n.
Послано Maigo Akisame (maigoakisame@yahoo.com.cn) 1 ноя 2004 13:13
Excuse me, why it's YES only if i=n ???
Послано ferng1021 23 июн 2006 14:12
another question :

"pre[b]:=pre[a]+pre[b]+[a];"

May I use "pre[b]:=pre[a]+[a]" ??