Page 1 of 1

10250 - The Other Two Trees

Posted: Mon Jun 23, 2003 5:23 am
by Observer
I thought this prob is easy, but......

Could anyone tell me when the line "Impossible." would be printed (or never?), and also give me some test cases?? Thx in advance!!

Posted: Sun Aug 03, 2003 4:53 pm
by Observer
Hmm... I get Accepted by changing just one thing: from double to extended! Oh 2+ hours wasted... :(

Posted: Tue Mar 20, 2007 6:02 am
by yiuyuho
For my program, I put impossible when the 2 points are the same.

I got AC as well.....

I used some intuitive method - basically, assume the 2 square is axis aligned, and of maximum size, then find the other 2 points. I hope there is a more mathematical approach to it?

Plus, may be the judge data is plain weak :-p, so I really want some technique that couples with some degree of proof.

Any one care to shine some light?

10250 The Other Two Trees´╝îask for help.

Posted: Mon Aug 16, 2010 4:08 am
by free
for this problem,i have thought for a whole night,maybe i got the ideal, but i still cannot wrte out the code.

that is i cannot express my ideal with code, could somebody tell me the core code?

thanks in advance.

Re: 10250 - The Other Two Trees

Posted: Thu Oct 20, 2011 5:10 am
by yatsen
Can anyone who got AC post some sample I/O?
I always got WA. :(

Re: 10250 - The Other Two Trees

Posted: Fri Nov 04, 2011 11:41 pm
by brianfry713
I got AC without ever printing impossible. I used C's long double.

Input:

Code: Select all

10 0 -10 0
10 0 -10 0
10 0 -10 0
1.4 2.3 53.2 -1.0
1.1 4.2 10.4 -1002.4
4  1 66 2
-1342 .1 -2.4 2.5
Output:

Code: Select all

0.0000000000 -10.0000000000 0.0000000000 10.0000000000
0.0000000000 -10.0000000000 0.0000000000 10.0000000000
0.0000000000 -10.0000000000 0.0000000000 10.0000000000
28.9500000000 26.5500000000 25.6500000000 -25.2500000000
509.0500000000 -494.4500000000 -497.5500000000 -503.7500000000
34.5000000000 32.5000000000 35.5000000000 -29.5000000000
-673.4000000000 671.1000000000 -671.0000000000 -668.5000000000

Re: 10250 - The Other Two Trees

Posted: Fri Nov 14, 2014 10:32 pm
by lighted
brianfry713 wrote:I got AC without ever printing impossible. I used C's long double.
Yes, it is always possible to find trees. To get accepted double is enough. :)