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

Evaluator requires a trailing space
Posted by 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 tried not to add a space at the end of the second line, but AC anyway. There is no such problem (-)
Posted by Dmitry 'Diman_YES' Kovalioff 18 Feb 2007 22:56
Re: I tried not to add a space at the end of the second line, but AC anyway. There is no such problem (-)
Posted by Bruce Merry 19 Feb 2007 00:54
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.
Re: I tried not to add a space at the end of the second line, but AC anyway. There is no such problem (-)
Posted by Vladimir Yakovlev (USU) 19 Feb 2007 01:39
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
Re: I tried not to add a space at the end of the second line, but AC anyway. There is no such problem (-)
Posted by Bruce Merry 19 Feb 2007 12:32
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.
Re: I tried not to add a space at the end of the second line, but AC anyway. There is no such problem (-)
Posted by MessedUp 22 Feb 2007 17:07
wrong thread

Edited by author 22.02.2007 17:08
Re: I tried not to add a space at the end of the second line, but AC anyway. There is no such problem (-)
Posted by MessedUp 22 Feb 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