10322 - The Four in One Stadium

All about problems in Volume 103. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
dwyak
New poster
Posts: 36
Joined: Sun Jul 28, 2002 5:16 am
Location: P.R.China
Contact:

10322 - The Four in One Stadium

Post by dwyak »

Who can give me some cases?
for example, what's the output for this input?

1.0 2.0 3.0
0.1 10.0 10.0
3.23787981 5.83784343 1.23872383

thx very much
Wenyuan Dai, Shanghai Jiaotong University.
Moritz Kunze
New poster
Posts: 2
Joined: Sat Sep 21, 2002 11:52 am
Contact:

Post by Moritz Kunze »

I get:

1.7750895846 0.1154579521 0.2394762157
3.5682482323 0.0842953628 0.0339737442
2.3783828932 0.1422255342 0.3610147806

Unfortunately i have no certainty if these values are correct, because for some reason p10322 is not judged at the moment.
Picard
Learning poster
Posts: 96
Joined: Mon Jun 24, 2002 1:22 pm
Location: Hungary
Contact:

Post by Picard »

i get:

1.7750895846 0.1154579521 0.2394762157
3.5682482323 0.0842953628 0.1205519957
2.3783828932 0.1422255342 0.3610147806

(i didn't go after why is the difference and which one is actually correct, but i got accepted)
Moritz Kunze
New poster
Posts: 2
Joined: Sat Sep 21, 2002 11:52 am
Contact:

Post by Moritz Kunze »

Ah, thank you.
I had an error in my prog, but i have to test it later at the online-judge. Somehow all my submissions get lost or are delayed unusually long.
dwyak
New poster
Posts: 36
Joined: Sun Jul 28, 2002 5:16 am
Location: P.R.China
Contact:

Post by dwyak »

Thank you very much. I got AC now.
I found a VERY big and silly mistake in my program.
Wenyuan Dai, Shanghai Jiaotong University.
..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

10322

Post by .. »

As I know, this problem is about solving the Soddy Circle problem.
However, for some test case, the biggest circle will only touch 2 small circles inside (No soddy circle) .And I find the rules to check this case in:

http://mathworld.wolfram.com/IsoperimetricPoint.html

But for the following 2 data sets, the rules fail to check. And my program still handle them as Soddy Circle. Can anyone teach me what condition I miss to check????

Input:
1.0 2.0 3.0
3.23787981 5.83784343 1.23872383
Output:
1.7750895846 0.1154579521 0.2394762157
2.3783828932 0.1422255342 0.3610147806
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.
Alexander Grushetsky
New poster
Posts: 28
Joined: Wed Jul 31, 2002 10:33 am
Location: Ukraine
Contact:

Post by Alexander Grushetsky »

r1,r2,r3 - radiuses of the circles. r1>=r2>=r3.
if r3<r2*r1*(r1+r2)/(r2^2+r1^2+r2*r1) then the radius of the big circle is r1+r2 (it touches only two circles)

Your output for input is correct.
..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

Post by .. »

Thank you!
I got accepted :D :D :D
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.
Post Reply

Return to “Volume 103 (10300-10399)”