Solved by 44 users: dan, robotact, DD, tomek, wojtekt, MasterZerg, Ravent, murphy, mikleb, wintokk, dragonghy, marek.cygan, proglamer, mylady, Cheryl, andyzh1314, zmy, Rizvanov, lutyj, Moonlight, Wind_Love, shangjingbo, tourist, WsemirZ, Zhukov_Dmitry, pmnox, liulz, zloy_mipt, mazahaka, MIKseR, UdH-WiNGeR, defrager, DAV, Al.Cash, stasg7, EAA2008, ripatti, Dest, gchebanov, Irkhin, Madiyar_Tktl, KOHECJIOH, avg79, JohnJones_001.
The fastest solutions
The best scored solutions
The smallest solutions
User Date Attempt Time CM SC Rizvanov 12 feb 2008
C++ 16 00.07 483 stasg7 11 nov 2009
C++ 53 00.17 491 zmy 25 dec 2007
C++ 10 00.19 527 tomek 13 apr 2006
C++ 1 00.12 535 DAV 11 jul 2009
C++ 4 00.10 537 stasg7 10 nov 2009
C++ 52 00.13 537 stasg7 10 nov 2009
C++ 49 00.11 547 shangjingbo 17 mar 2008
FPC 1 00.23 575 Moonlight 13 mar 2008
FPC 7 00.23 578 Wind_Love 17 mar 2008
C++ 5 00.11 579 gchebanov 15 dec 2010
C++ 3 00.07 600 dragonghy 16 apr 2007
FPC 7 00.12 624
Languages C++ 30
FPC 10
Kylix 4
C 2
Java 1
< < < < < < < < < <
Enclosing point with polygon
Time limit = 2
second(s)
There are
N points
A1 ,
A2 , .. ,
AN and point
B at a plain.
Find polygon with vertices
Ai of minimal peremiter that encloses point
B
The polygon sides should be less or equal to
K .
Input
Input has the following format:
N K
XB YB
X1 Y1
..
XN YN
3 ≤
N ≤ 100, 0 <
K ≤ 30000,
|
XB |, |
YB |, |
Xi |, |
Yi | < 10000.
All coordinates and
K are given with 4 digits after point.
Output
The perimeter length with accuracy 0.01.
Input#1
3 6.0000
1.0000 1.0000
0.0000 0.0000
0.0000 3.0000
4.0000 0.0000
Output#1
12.00
Author:
Voroztsov Artem,
I Moscow individual students programming contest, MIPT, 17 October 2004.
30 October 2004
<PREV | Problem set | Search related messages | NEXT>