ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1522. Factory

Show all messages Hide all messages

Evaluator requires a trailing space Bruce Merry 18 Feb 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