10772 - Rose windows

All about problems in Volume 107. 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
Eduard
Experienced poster
Posts: 183
Joined: Fri Sep 26, 2003 2:54 pm
Location: Armenia,Yerevan

10772 - Rose windows

Post by Eduard »

Please give hint how to solve this problem.I can't find how changed radius.
Thanks.
someone who like to solve informatic problems.
http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:29650

sohel
Guru
Posts: 856
Joined: Thu Jan 30, 2003 5:50 am
Location: New York

radius...not needed

Post by sohel »

I actually found the chord lengths of each smaller circles and then found the radius correspondingly.

If you follow closely, you will see a pattern of how the smaller polygons form.
The vertices of the smaller polygons are formed from the intersections of the lines joining the vertices of the main polygon.

Hope it helps. :wink:

_.B._
Experienced poster
Posts: 160
Joined: Sat Feb 07, 2004 7:50 pm
Location: Venezuela
Contact:

My way.

Post by _.B._ »

Greetings!
Hey Sohel!
I had a different approach for this problem.
I worked only with the "apotemas" (it's like the height of the triangles that form a regular polygon, don't know how to translate it) and the radius of the polygons.
You MAY see the pattern to build the smaller polygons from the main polygon (the big one) in the example drawn in the problem.
Just to be sure I had the right idea, I draw in paper a "dec
_.

legend12
New poster
Posts: 2
Joined: Sun Jun 29, 2003 5:18 pm

10772 Sample Output is OK?

Post by legend12 »

Input
9.238794 8 2

Output
100.0000

Is is OK?

I think "input" will be "9.238794 8 3" to get that "output".

Cho
A great helper
Posts: 274
Joined: Wed Oct 20, 2004 11:51 pm
Location: Hong Kong

Post by Cho »

in/out of my code, in:

Code: Select all

9.238794 8 2
9.238794 8 3
out:

Code: Select all

0.0668
100.0000

ranjit
New poster
Posts: 34
Joined: Fri Jan 30, 2004 11:22 am
Location: india

Interesting ...

Post by ranjit »

My ac code gives the o/p

Code: Select all

100.0000
100.0000
for both the cases.

Hope it helps

Sanny
Learning poster
Posts: 78
Joined: Sat Feb 14, 2004 3:59 pm
Location: BUET
Contact:

Post by Sanny »

I'm getting WA in this problem. Can anyone check these i/o please.

Input:

Code: Select all

22
100 40 1
100 40 2
100 40 3
100 40 5
100 40 10
100 40 20
100 40 15
100 40 19
100 38 1
100 38 2
100 38 4
100 38 9
100 38 18
50 6 1
50 6 2
50 6 3
50 8 3
9.238794 8 2
10 4 1
20 4 1
50 6 2
50 6 3
Output:

Code: Select all

193.7897
576.5974
945.2074
1604.1015
2462.3319
30633.7542
1878.1616
576.5974
214.7256
638.3196
1422.1929
2564.7697
638.3196
2165.0635
4330.1270
6771.4499
2928.9322
100.0000
200.0000
800.0000
4330.1270
6771.4499
Regards
Sanny

sidky
New poster
Posts: 50
Joined: Wed Nov 06, 2002 1:37 pm
Location: Planet Earth, Universe
Contact:

Post by sidky »

My AC code gives this output

Code: Select all

193.7897
576.5974
945.2074
1604.1015
2462.3319
129.0335
1878.1616
576.5974
214.7256
638.3196
1422.1929
2564.7697
638.3196
2165.0635
4330.1270
1358.7911
2928.9322
100.0000
200.0000
800.0000
4330.1270
1358.7911

Sanny
Learning poster
Posts: 78
Joined: Sat Feb 14, 2004 3:59 pm
Location: BUET
Contact:

Post by Sanny »

Thanks. Got AC now. Had a funny mistake in code. I gave a special check for cases k==n/2 and I typed it wrong. :(

Regards
Sanny

Post Reply

Return to “Volume 107 (10700-10799)”