Page 1 of 1

### 11164 - Kingdom Division

Posted: Sun Jan 21, 2007 3:51 am
Anyone can give me some tricky testcases ?
I got WA....

here is my code:

Code: Select all

`` Acc......``

Posted: Sun Jan 21, 2007 9:27 am
try these input:

Code: Select all

``````4 6 9
6 7 15
``````

Posted: Sun Jan 21, 2007 2:00 pm
ferng1021 wrote:try these input:

Code: Select all

``````4 6 9
6 7 15
``````
but wiil be the output for this input... i got negetive output
is it: Poor King!

i have changed my code:

Code: Select all

`` Acc....``
some input and out put:

input:

Code: Select all

``````0 4 5
0 5 0
0 9 7
5 6 0
0 0 0
4 98 5
98 5 69
-1 34 3``````
output:

Code: Select all

``````Set 1:
0.0000
Set 2:
0.0000
Set 3:
0.0000
Set 4:
0.0000
Set 5:
Poor King!
Set 6:
0.4278
Set 7:
Poor King!``````

Posted: Mon Jan 22, 2007 4:03 pm
Could you give me an idea for this problem?

Posted: Tue Jan 23, 2007 7:41 am
Thanks a lot for joy's tests !!

To paulmcvn: try to split the polygon AFXE into 2 triangles, called x, y
Find the relationship between a, b, c, x, y. You will see the solution

Posted: Thu Jan 25, 2007 6:25 am
Hello there, I think I need help finding the bug in my version...

this is the i/o I got so far:

Code: Select all

``````1 2 1
2 4 2
1 3 3
0 4 5
0 5 0
0 9 7
5 6 0
0 0 0
4 98 5
98 5 69
4 6 9
6 7 15
2 1 99
8 2 0.01
0 5 0
1 1.1 1
1 1.01 1
1 1.001 1
1 1.000001 1
-1 0 0``````

Code: Select all

``````Case 1:
2.0000
Case 2:
4.0000
Case 3:
5.0000
Case 4:
0.0000
Case 5:
0.0000
Case 6:
0.0000
Case 7:
0.0000
Case 8:
Poor King!
Case 9:
0.4278
Case 10:
Poor King!
Case 11:
Poor King!
Case 12:
Poor King!
Case 13:
Poor King!
Case 14:
0.2451
Case 15:
0.0000
Case 16:
20.0000
Case 17:
200.0000
Case 18:
2000.0000
Case 19:
2000000.0006``````
Edit: just noticed it is Set and not Case, testing again.
Edit II: Yeah, when you replace Case with Set it gets AC, this is kind of a shame for me..., anyways leaving the big I/O in case some needs it.

Ignore the last one, it is wrong. It is good to see the input for this problem doesn't involve precision issues.

Posted: Thu Jan 25, 2007 2:27 pm
You should remove the last case. I set the judge data such that no nasty precision error occurs. Because solving problem is more fascinating than correcting precision problems.