10207  The Unreal Tournament
Moderator: Board moderators
10207 WA Could anybody give me more input/output tests ?
Hi. I'm getting WA for problem 10207, but I don't know why. I tested my program against a reasonably large (and in my opinion complete) input/output combination, and my program gets everything right (newlines and so too).
I'd like to ask whether anybody minds giving me some sample input/output to test my program against, help is appreciated a lot, thanks!
I'd like to ask whether anybody minds giving me some sample input/output to test my program against, help is appreciated a lot, thanks!
10207... please help
well the question says "if P(i,j) is undefined print 1 with similer formatting
but for every input we output two lines right?
the first one will be 1... but what do we put in the second line?
i was able to work out the "mathematics" behind the question and am getting the outputs correct for the sample provided, but the online judge reports wrong answer... maybe because i print
1
0
for invalid inputs?
finally, how large can the inputs be? i mean for large values of i and j... the number of recursive calls(even though i used a formula which i am certain is correct) will overflow an integer
please help
but for every input we output two lines right?
the first one will be 1... but what do we put in the second line?
i was able to work out the "mathematics" behind the question and am getting the outputs correct for the sample provided, but the online judge reports wrong answer... maybe because i print
1
0
for invalid inputs?
finally, how large can the inputs be? i mean for large values of i and j... the number of recursive calls(even though i used a formula which i am certain is correct) will overflow an integer
please help
For invalid input, output this
1.00000
0
The range of i, j are given clearly, and you require BigInt to solve this problem. This problem is not that trivial, beside finding the maths. logic behind, you have to fight with time limit and memory limit too.
1.00000
0
The range of i, j are given clearly, and you require BigInt to solve this problem. This problem is not that trivial, beside finding the maths. logic behind, you have to fight with time limit and memory limit too.
My signature:
 Please make discussion about the algorithm BRFORE posting source code.
We can learn much more in discussion than reading source code.  I HATE testing account.
 Don't send me source code for debug.
thank you
i'm kind of a newbie(this was like the 20th problem i cracked)...
yes i got something like acceptedactually it says a presentation error
this was the first problem for me that would require lond double and big integer... but i worked it out
thank you for the help...
yes i got something like acceptedactually it says a presentation error
this was the first problem for me that would require lond double and big integer... but i worked it out
thank you for the help...

 New poster
 Posts: 3
 Joined: Wed Mar 09, 2005 1:28 pm
10207 help
What may the undefined P(i,j) be?

 Experienced poster
 Posts: 122
 Joined: Sun Nov 13, 2005 10:25 am
 Location: Taiwan
I am wandering the output of
Can someone help?
Code: Select all
0.5 1
1000 0
My accepted code returnsWeiMing Chen wrote:I am wandering the output of
Input:Can someone help?Code: Select all
0.5 1 1000 0 0.5 0
Output:
Code: Select all
0.00000
1
Ami ekhono shopno dekhi...
HomePage
HomePage

 Guru
 Posts: 5947
 Joined: Thu Sep 01, 2011 9:09 am
 Location: San Jose, CA, USA
Re: 10207  The Unreal Tournament
A straight forward DP in JAVA using BigInteger got me AC in just over 2sec. i=0 and j=0 is the only special case. For this input:
AC output is:
Code: Select all
0.5 3
0 0
452 0
0 251
.1 0
Code: Select all
1.00000
0
0.00000
0
1.00000
0
Check input and AC output for thousands of problems on uDebug!