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 1074. Very Short Problem

Empty lines in 1074
Posted by Igor Dex 1 Jun 2011 18:37
It is not clear if empty lines can be used in the input.
Is the next example possible?
<empty line>
5
#
Re: Empty lines in 1074
Posted by AterLux 1 Jun 2011 23:07
Yes it possible.
A length of the string S doesn't exceed 100 symbols, but it not guaranteed not to be empty.
Re: Empty lines in 1074
Posted by AterLux 1 Jun 2011 23:09
Extra hint for you:
try this:

-7293874219874982174982174987321E-18446744073709551616
10
#
Re: Empty lines in 1074
Posted by Igor Dex 2 Jun 2011 15:02
Thank you, AterLux. That test is OK. I tried other tests from the forum. They are OK too. Anyway I have WA12.
Re: Empty lines in 1074
Posted by Igor Dex 2 Jun 2011 20:38
Moreover, is the next example with just 2 lines possible?
#
1
It seems that it's possible. Do we have to write "Not a floating point number" because according to the statement we need to answer on each pair lines of the input?
Re: Empty lines in 1074
Posted by AterLux 2 Jun 2011 22:48
That's hair-splitting
# means end of input, you need not to process this pair, also you need not to read second line in this pair.

My both AC solution (Pascal & Java) will not output anything with your example.

But, as we know, 12th test is not empty. When you get "Crash (Access violation)" - in most cases it mean reading or writing out of array bounds - so check it sizes.
check you can process 100-character string and can output 200-character at line

Be carefull with greatest numbers, + and - before numbers (and exponent too!),
check "Nafpn" answer for double -- or ++ or -+ and so on
also check you output 0.000 (without minus) when trimming -0.0000xxxx.