All about problems in Volume 102. If there is a thread about your problem, please use it. If not, create one with its number in the subject.
Moderator: Board moderators
Even
Learning poster
Posts: 75 Joined: Thu Nov 22, 2001 2:00 am
Location: Taiwan
Post
by Even » Thu Aug 15, 2002 3:54 pm
if input like
1 2 3 or 3 4 7 that is a = b = c
what is the output ??
and can anybody give me more examples...thank you
or give me the output for
3
1 2 3
3 4 5
10000 10000 1
wyvmak
Experienced poster
Posts: 110 Joined: Thu Dec 13, 2001 2:00 am
Post
by wyvmak » Sun Sep 01, 2002 9:57 am
in case you haven't got AC yet.
my output:
3.000 3.000 3.333 -1.000
6.766 6.813 6.918 7.500
10000.866 10000.914 13333.333 15000.000
Even
Learning poster
Posts: 75 Joined: Thu Nov 22, 2001 2:00 am
Location: Taiwan
Post
by Even » Mon Sep 02, 2002 5:05 am
if a,b,c can't form a triangle...should output be
-1.000 -1.000 -1.000 -1.000 ??
and how to find the DM...optimal??
I try to search from I( x, y ) ...
but I don't know if the answer is correct
( through it's correct to the sample above... )
wyvmak
Experienced poster
Posts: 110 Joined: Thu Dec 13, 2001 2:00 am
Post
by wyvmak » Mon Sep 02, 2002 12:53 pm
DM is called Fermat point, a search engine will tell you about it. one thing, there're two cases for Fermat point. [i'm surprised that Fermat is such a great mathematician]
if a triangle cannot be formed, only circumcentre is -1. other values still can be obtained. i think you would know what should they be.
Even
Learning poster
Posts: 75 Joined: Thu Nov 22, 2001 2:00 am
Location: Taiwan
Post
by Even » Mon Sep 16, 2002 3:12 pm
if the input
2
123 112 12
110 100 20
what is the output ?? thank you :p
Even
Learning poster
Posts: 75 Joined: Thu Nov 22, 2001 2:00 am
Location: Taiwan
Post
by Even » Mon Sep 16, 2002 3:59 pm
thanks.... I got AC...
and the answer above is
124.000 125.579 156.783 440.617
119.940 121.590 141.678 182.281
arif_pasha
New poster
Posts: 42 Joined: Fri Jun 13, 2003 3:47 pm
Location: Dhaka , Bangladesh
Contact:
Post
by arif_pasha » Wed Feb 01, 2006 11:02 am
wyvmak wrote: if a triangle cannot be formed, only circumcentre is -1. other values still can be obtained. i think you would know what should they be.
i dont understand how the distance from the incenter can be measured..
. can anyone provide some testcases? thnx
arif_pasha
New poster
Posts: 42 Joined: Fri Jun 13, 2003 3:47 pm
Location: Dhaka , Bangladesh
Contact:
Post
by arif_pasha » Wed Feb 01, 2006 11:23 am
now i understand how can i find the radius of the incircle even if the points are colinear. but still wa..
can someone provide results for the following test cases:
6
1 2 3
5 5 9
100 100 100
10000 10000 1000
1000 1000 2000
10000 5000 5500
my output:
3.000 3.000 3.333 -1.000
9.974 10.381 10.569 17.206
173.205 173.205 173.205 173.205
10853.518 10892.028 13391.331 15018.785
2000.000 2000.000 2000.000 -1.000
10262.391 10940.191 11136.782 25800.942
arif_pasha
New poster
Posts: 42 Joined: Fri Jun 13, 2003 3:47 pm
Location: Dhaka , Bangladesh
Contact:
Post
by arif_pasha » Wed Feb 01, 2006 11:44 am
at last.. i got it accepted..
xiaomengxian
New poster
Posts: 7 Joined: Mon Mar 12, 2007 4:41 am
Location: Changsha, Hunan, China
Post
by xiaomengxian » Tue Mar 13, 2007 5:38 am
What is the trick? Could you tell me, please?
I tried all the tests above, but still get WA..
xiaomengxian
New poster
Posts: 7 Joined: Mon Mar 12, 2007 4:41 am
Location: Changsha, Hunan, China
Post
by xiaomengxian » Wed Apr 25, 2007 3:49 pm
I've made a stupid mistake... Now I get AC
baodog
Experienced poster
Posts: 202 Joined: Wed Jul 04, 2007 6:53 am
Post
by baodog » Tue Jul 10, 2007 9:56 am
A note about degenerate triangles:
If a>b+c, how is anything defined? You can place
the vertices arbitrarily ... and it's still not a Triangle as stated.
So -1.000 -1.000 -1.000 -1.000 if a triangle cannot
be formed at all.
Jan
Guru
Posts: 1334 Joined: Wed Jun 22, 2005 10:58 pm
Location: Dhaka, Bangladesh
Contact:
Post
by Jan » Tue Sep 11, 2007 1:47 am
Well, I was little bit confused for
arif_pasha 's cases. However, all of them are not correct I think. Here are the cases.
Input:
Code: Select all
11
5 5 9
1 2 3
100 100 100
10000 10000 1000
1000 1000 2000
10000 5000 5500
123 112 12
110 100 20
1 2 3
3 4 5
10000 10000 1
Output:
Code: Select all
10.000 10.381 10.569 17.206
3.000 3.000 3.333 -1.000
173.205 173.205 173.205 173.205
10853.518 10892.028 13391.331 15018.785
2000.000 2000.000 2000.000 -1.000
10500.000 10940.191 11136.782 25800.942
124.000 125.579 156.783 440.617
119.940 121.590 141.678 182.281
3.000 3.000 3.333 -1.000
6.766 6.813 6.918 7.500
10000.866 10000.914 13333.333 15000.000
Hope these help.