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

Обсуждение задачи 1452. Pascal против C++

Alexander Prudaev ADMINS!!! WRONG TEST!!! [17] // Задача 1452. Pascal против C++ 10 июн 2006 18:25
test #1
6
7 0 0 0 0 0

my program output "2\n1 2" but gets WA#1
yes, you are right
my cheat program:

var N;
begin
  readln(N);
  readln(N);
  readln(N);
  if (N=0) then 10 div 0 else InfinityRecursion
end.

of course, read(N);
Alexander Prudaev i can't undestand why WA [14] // Задача 1452. Pascal против C++ 10 июн 2006 21:55
i am in despair. it work! test it!
at least once for sample input it write sample output.
i don't use any random, but it gets WA1

//code deleted


Edited by author 13.06.2006 23:27
Rizvanov++ de xXx Re: i can't undestand why WA [13] // Задача 1452. Pascal против C++ 10 июн 2006 22:47
ht[heap[hp].nexN&0x7FF]=hp++; //It's wrong!
Alexander Prudaev Re: i can't undestand why WA [12] // Задача 1452. Pascal против C++ 10 июн 2006 23:29
ht[heap[hp].nexN&0x7FF]=hp++; //It's wrong!

why it's wrong?
it's equivalent line:

ht[heap[hp].nexN&0x7FF]=hp; hp++;
Rizvanov++ de xXx Re: i can't undestand why WA // Задача 1452. Pascal против C++ 10 июн 2006 23:47
ht[heap[hp].nexN&0x7FF]=hp; hp++; //It's right!
and after finding of all mistakes, you get the TLE#6...
Rizvanov++ de xXx Check the your program on these tests: [10] // Задача 1452. Pascal против C++ 10 июн 2006 23:54
6
1 2 3 4 5 6

3
1 1 2

3
1 2049 4097

Edited by author 11.06.2006 05:08
Alexander Prudaev Re: Check the your program on these tests: [9] // Задача 1452. Pascal против C++ 12 июн 2006 16:44
я извиняюсь, мне просто не сказать этого по английски :)
я запостил не ту версию программы, в этой есть баги.
да не в этом дело

я написал программу которая даёт правильный ответ на sample#1
причём даже в той же последовательности выводит номера.

моя программа даёт ответ:
4
4 5 1 6

но проверяющая система выносит вердикт: WA#1

я закомментировал вывод ответа
и написал в конце printf("4\n4 5 1 6");
такая программа получает WA2

вопрос: как такое может быть, что одна программа
получает WA2, а вторая WA1

я не однократно проверил что программы на
этот sample выдают один и тот же ответ

может быть причина в том, что я вывожу числа так:
for (i=0;i<chetotam;i++) printf("%d ",int_ar[i]);

мешает лишний пробел? это глупо, и маловероятно.

перед выводом нет перевода строки.

больше мне ничего в голову не приходит
Victor Barinov (TNU) Re: Check the your program on these tests: // Задача 1452. Pascal против C++ 14 июн 2006 03:49
На всякий случай убери лишний пробел, моя АС прога не выводит его...
Dmitry 'Diman_YES' Kovalioff I will try to help you (+) [4] // Задача 1452. Pascal против C++ 14 июн 2006 10:14
Your solution is verified by a checker written by Ilya Grebnov, and no one still claimed it works wrong. I want you to send me both you WA(1) and WA(2) solutions for investigation. If some bug in the checker is found I will fix it. My e-mail for Russian-speaking programmers is dimanyes@mail.ru
Alexander Prudaev Re: I will try to help you (+) // Задача 1452. Pascal против C++ 17 июн 2006 13:58
sent. I write a new program - WA12 :)
Alexander Prudaev Re: I will try to help you (+) [2] // Задача 1452. Pascal против C++ 24 июн 2006 02:42
I send. You forgot about?
Dmitry 'Diman_YES' Kovalioff I did not forget. I just tried to understand why it works wrong (+) [1] // Задача 1452. Pascal против C++ 24 июн 2006 08:32
I have nothing to say. Everything is ok on my Borland C++ Builder compiler. You must contact with Vladimir Yakovlev to investigate this problem because he is C++ programmer. I have forwarded your mail to him.
can you give me his e-mail?
you know my, sent it.
Vladimir Yakovlev (USU) Re: Check the your program on these tests: [1] // Задача 1452. Pascal против C++ 15 июн 2006 15:05
Your program works wrong on sample input. Test it with other compiler. For example, with Intel C++ Compiler 7.0
Alexander Prudaev Re: Check the your program on these tests: // Задача 1452. Pascal против C++ 16 июн 2006 19:05
I have only Visual Studio 6 & 2005
in this IDE my program writes right answer
I have same problem. On 1 test my program output:
4
6 1 5 4
but WA1. Why?