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.
UserDateAttemptTimeCMSC
Rizvanov12 feb 2008C++1600.07483
stasg711 nov 2009C++5300.17491
zmy25 dec 2007C++1000.19527
tomek13 apr 2006C++100.12535
DAV11 jul 2009C++400.10537
stasg710 nov 2009C++5200.13537
stasg710 nov 2009C++4900.11547
shangjingbo17 mar 2008FPC100.23575
Moonlight13 mar 2008FPC700.23578
Wind_Love17 mar 2008C++500.11579
gchebanov15 dec 2010C++300.07600
dragonghy16 apr 2007FPC700.12624
 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#13 6.0000 1.0000 1.0000 0.0000 0.0000 0.0000 3.0000 4.0000 0.0000 Output#112.00

Author:
Voroztsov Artem,
I Moscow individual students programming contest, MIPT, 17 October 2004.
30 October 2004

<PREV | Problem set | Search related messages | NEXT>

 © acm.mipt DevGroupThe page was generated in 190ms