Solved by 92 users: ...
UserDateAttemptTimeCMSC
ripatti`03 jun 2010`C++2700.02271
Mishunin_Alexander`23 oct 2007`C++1700.37274
ripatti`03 jun 2010`C++2600.02277
Mishunin_Alexander`23 oct 2007`C++1600.36311
Pset`16 may 2005`FPC17100.01331
Dima`16 may 2005`FPC1?.??331
Mishunin_Alexander`23 oct 2007`C++1500.36341
DAV`12 mar 2010`C++900.14344
N1k1tung`02 dec 2006`Kylix300.70355
DAV`12 mar 2010`C++800.14359
WsemirZ`19 jul 2008`C++300.39380
Jacob`05 may 2008`C++300.36398
Ravent`01 sep 2006`Kylix304.45403
tourist`14 feb 2008`Kylix1701.80408
 C++ 52 FPC 27 Kylix 11 Java 2 C 1
` >  >  >  >  >  >  >  >  >  > `

## Star War (epizode V)

Time limit = 5 seconds

A long time ago in the galaxy far, far away.

After the Death Star had been destroyed by rebels, a group of imperial scientists started the development of new project "Death Star 2". New Star was provided by Death Ray, which destroys any object on its way and continue its passage in the original direction. For this time the resistance movement was expanded on many planets. The Emperor naturally disliked it. He gave the order to Dark Lord and Greatest Jedi Dart Vader to destroy the maximum number of planets with rebellious bases. Unfortunately, a very much time is required for recharging Death Ray, therefore Empire has one attempt only.

Help Lord Vader to choose position of new Death Star and the launch direction of the Death Ray such that the maximum number of planets is destroyed by one strike. And let the Evil Side of the Power will be with you!

Input The first line contains the number of rebellious planets N (2 ≤ N ≤ 200). Then N lines follow. Each line contains coordinates of planet x, y (integers in the range -32768 .. 32767) and its radius R (integer in the range 1..32767). The numbers is separated by one space.

Output Write in the output file the maximum number of planets, which can be destroyed by one strike of new Death Star.

 Input#1```3 0 0 1 6 -1 1 3 1 2 ``` Output#1```3 ```
 Input#2```4 5 0 1 0 5 1 -5 0 1 0 -5 1 ``` Output#2```2 ```

Author:
Semi-final of Ukraine student programming contest, March 2003, Khmelnitski.

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

 © acm.mipt DevGroupThe page was generated in 200ms