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

Test 12
Posted by Victor Barinov (TNU) 3 Aug 2006 16:47
Please check the 12-th test. I and others thinks that our solutions are correct, but they are WA on 12...

Maybe anyone can give a little hint?

Edited by author 03.08.2006 16:49
Your solution is definitely wrong
Posted by Vladimir Yakovlev (USU) 3 Aug 2006 17:30
Re: Your solution is definitely wrong
Posted by Victor Barinov (TNU) 3 Aug 2006 18:39
Thank you! :)
But it is not helped me. Maybe you give me this test? Or any similar?
No, try to think (-)
Posted by Vladimir Yakovlev (USU) 3 Aug 2006 20:28
Test 12
Posted by Krayev Alexey (PSU) 3 Aug 2006 22:15
Yeah, I have WA12 too. I doubt if the test is really correct.
And one more question: what means pluses and minuses in brackets? (Sorry for offtop).

Edited by author 03.08.2006 22:16

Edited by author 03.08.2006 22:16
(+)
Posted by Victor Barinov (TNU) 3 Aug 2006 22:24
Cool men write (-) if there are only theme in post, and (+) if it consists any more than ony theme :)
Cool men... I see, OK thnx (-) :)
Posted by Krayev Alexey (PSU) 3 Aug 2006 22:31
It's just another style of posting messages (-)
Posted by Vladimir Yakovlev (USU) 3 Aug 2006 23:40
Strange test
Posted by Krayev Alexey (PSU) 4 Aug 2006 01:37
It seems that 12 test has cases like
1e14234320000000
2
Is that output would be correct for this case:
1.00e14234320000000

Edited by author 04.08.2006 01:42
Re: Strange test
12 test has cases like
1e-14234320000000
2
and correct answer for this case:
0.00
Re: Strange test
Posted by KAV 4 Aug 2006 19:59
From my code:
if( exp > 1000 ) ...   // make Output Limit
The result is Output Limit, test 12! So, exp is more than 1000 :)

From problem statement:
"It is guaranteed that a length of a result will not exceed 200 symbols."
Is it right (with such big exp and number != 0)?
Re: Strange test
Posted by Krayev Alexey (PSU) 4 Aug 2006 20:24
No, that was bug in my check code. Later I submited smth like that:
if (e>1000 && !isnull(mantissa)) while (1);
and this code didn't cause tle.
Re: Strange test
Posted by KAV 4 Aug 2006 20:35
I had the code:
if( abs( exp ) > 1000 ) ...   // the answer is 0.0000...
It got WA 12.

Then I decided to divide it into two parts: exp>1000 and exp<-1000.
if( exp < -1000 )
       ...   // 0.000... - 100%, yes?
else if( exp > 1000 )
{
    // I amn't sure that there can be such a situation, that's why I do only output limit
   while( 1 ) cout << "111\n";
}
Output Limit 12!

"It is guaranteed the the length of output would be less than 200 symbols".
I think, exp>1000 can be only when the number is 0 ( 0e10000 ). But then the right answer is 0.000 - the first code, which gets WA.

So, there is a test in 12th test where exp>1000 and number is NOT 0!
Re: Strange test
Posted by Krayev Alexey (PSU) 4 Aug 2006 20:44
You forget that input file may contain a number of test cases. Maybe cases with big (and small) exponent your program processes correctly, but fails at other cases.
Although i agree that it is very, very strange.
This multitest contains about 100 cases (-)
Posted by Vladimir Yakovlev (USU) 4 Aug 2006 21:29
Re: Test 12(+)
Posted by I)iver 10 Aug 2006 19:44
There are tests like
1e+00000000000000001
5
or
1e-10000000000000000
2

First, my program had WA on test 12. Than I fixed my bug with this tests, and finally got AC=)
Re: Test 12(+)
Posted by Krayev Alexey (PSU) 10 Aug 2006 21:43
my program processes correctly these cases,
outputing:
10.00000
0.00

but still wa#12
Re: Test 12(+)
Posted by Olympic Bear (Nikolay Dubchuk) 23 Aug 2016 18:24
Try this test:
1+10
0
#

it's not a correct float number