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

Обсуждение задачи 1096. Таблички с номерами маршрутов

My AC probram gets on samle test output
2
2
1
However this is an output of reversed sequence. It is even imposible to change 1/8 to 5/4.
Good output:
2
1
2

What is more, in the problem statement is not written that any one shortest way of changing can be printed. Even for sampe test there are 2 way of solving it.

Sorry for mine English.
Thank you for help! Validator of this problem was fixed.
Rejudge is finished. 56 AC verdicts turned to WA, but 12 WA got AC.
IMO, tests are still incorrect. My program got TLE #10 after such debug submit:

// some code here ...
int m;
void TLE(){
    while(1);
}
int main(){
    scanf("%d ",&m);
    if(m > 1000) TLE();
    int u,v,x,a,b;
    REP(i,m){
        scanf("%d %d ",&u,&v);
        if(u <1 || u > 2000) TLE();
                // some code here
    }
        // some code here
        return 0;
}

Without assertions it got Crash #10...
You are right! There was a route number 0 in several tests.
Tests are fixed. The wrong verdicts will be rejudged.
Smilodon_am [Obninsk INPE] 2 Admins: "IMHO: Rejudgement is needed." [1] // Задача 1096. Таблички с номерами маршрутов 30 май 2011 18:28
My AC solution give wrong (I think so) answer on this test:
4
6 8
5 4
7 4
1 5
6 1 8
Answer:
1
1
But we cannot do it. Solution means that we give our plate "1 8" to the driver of the 1st bus and he gives us plate "6 8". But his route is 6 and he gets "1 8". So his plate now doesn't correspond to its route.

In statement is said "Any driver will agree to change his plate for another only if this plate has the number of his route". "1 8" doesn't have 6.
Send me the code, please!

goldenxbullet@gmail.com

Thanks!