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

Обсуждение задачи 1379. Транспортировка кружек

WA#25 what's the problem?
Послано ¥@§@® Δδδ@$☺√ 10 дек 2007 14:07
Here's the main part of my code:

for i:=0 to n-1 do
  begin
   cpt[i]:=1441;
   for j:=0 to n-1 do t[i,j]:=1441;
  end;
 for i:=0 to m-1 do
  begin
   read(x,y);
   dec(x); dec(y);
   readln(t[x,y],w[x,y]);
   dec(w[x,y],3000000);
   w[x,y]:=w[x,y] div 100;
   w[y,x]:=w[x,y];
   t[y,x]:=t[x,y];
  end;
 cup[0]:=10000000; cpt[0]:=0;
 for i:=0 to n-1 do
  for j:=0 to n-1 do
   begin
    if i=j then continue;
    m:=min(cup[j],w[i,j]);
    r:=cpt[j]+t[i,j];
    if (cup[i]<m)and(r<1441) then
     begin
      cup[i]:=m;
      cpt[i]:=r;
     end;
   end;
Re: WA#25 what's the problem?
Послано ¥@§@® Δδδ@$☺√ 12 дек 2007 21:27
Please, who can give me tricky tests where my code fails?
I can't find my mistake. More over, my algo is true as well.
Re: WA#25 what's the problem?
Послано Yurchuk Maxim, Rybinsk, Liceum #2, icq 474444559 20 дек 2007 20:52
I have wa #25 too:(
Re: WA#25 what's the problem?
Послано svr 20 дек 2007 21:51
Use random tests!
Very helpfull.
After 450 I couln't without this method.
Re: WA#25 what's the problem?
Послано Yurchuk Maxim, Rybinsk, Liceum #2, icq 474444559 20 дек 2007 22:01
Thanks, but how I get answers for this tests?
Re: WA#25 what's the problem?
Послано svr 20 дек 2007 22:11
On some random tests answer of wrong program
is obviously wrong.
For example you may use broote forse method
as alternative on small dimensions.

Edited by author 20.12.2007 22:13
Re: WA#25 what's the problem?
Послано Yurchuk Maxim, Rybinsk, Liceum #2, icq 474444559 20 дек 2007 22:20
I have AC:-) it was is stupid bug in dijkstra...
But that is 'Brut Force Method'? Can you send me letter about this method to mail on russian, because i don't know english good... x2m@mail.ru
Re: WA#25 what's the problem?
Послано svr 20 дек 2007 22:28
Broote forse method is full search with gatanteed right
answer.
Re: WA#25 what's the problem?
Послано Yashar Abbasov 21 дек 2007 02:30
Can you tell me what did you change in your program? i can't still find my mistake. can you send me your code to my e-mail?(yashar25.92@mail.ru)
Thanks