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

Обсуждение задачи 1522. Factory

Bruce Merry Evaluator requires a trailing space [6] // Задача 1522. Factory 18 фев 2007 22:50
I carefully wrote my solution to not put any extraneous spaces at the end of the second line and it came back WA #1 every time during the contest. If I now put a space at the end of the line, it comes back as WA #12.
I've put the code I submitted at

http://people.cs.uct.ac.za/~bmerry/a1.cpp

and

http://people.cs.uct.ac.za/~bmerry/a12.cpp

The only difference is that the second puts out a trailing space, the first does not. The first gets WA #1 while the second gets WA #12.
That's because of line printf("%lld", ...). It should look like printf("%I64d", ...). Read C++ FAQ about using 64-bit types:
http://acm.timus.ru/help.aspx?topic=cpp
Argh! Eight years later and we still don't have C99-compliant compilers.

I now get WA #18 but presumably that is a different issue.
wrong thread

Edited by author 22.02.2007 17:08
??? again. Confusing that the order of the threads changes if you post a solution in the wrong thread, and then want to correct it by going to the other thread. :)

Edited by author 22.02.2007 17:08

Edited by author 22.02.2007 17:10