Solved by 44 users: Artur, robotact, DD, NSI, Dmitry_Gozman, dan, noir_soleil, Awk, MasterZerg, mikleb, dragonghy, Ilya, ich, mishik, andyzh1314, Rizvanov, shangjingbo, Wind_Love, tourist, pmnox, zloy_mipt, mazahaka, RAVEman, MaxBuzz, UdH-WiNGeR, ilyakor, defrager, Ravent, topspin, superzz, Dest, EAA2008, ripatti, s01A15, Jacob, vi002, CoJIMuP, checkil, oleg.dudrov, Robert_Gerbicz, regmar, max-spilet, murphy, avg79.
UserDateAttemptTimeCMSC
ilyakor`07 mar 2009`C++600.01830
RAVEman`10 jan 2009`C++1400.01956
regmar`09 oct 2013`C++800.01962
mikleb`19 nov 2006`C++2800.011433
Ravent`10 apr 2009`C++2500.011567
Dest`17 dec 2009`C++1600.02673
Rizvanov`24 jan 2008`C++500.02789
superzz`29 oct 2009`C++100.021034
Wind_Love`18 mar 2008`FPC700.021091
shangjingbo`17 mar 2008`FPC100.021108
 C++ 31 FPC 6 Kylix 5 Java 3 C 1
` >  >  >  >  >  >  >  >  >  > `

## Spheres intersection

Time limit = 2 second(s)

You are give set of closed (closed = contain boundary) spheres in 3-dimentional euclidian space. You should check if they have common point.

Input. The fist line contains number of spheres N, 1 < N ≤ 20, and then N lines go, each with four integer numbers Xi Yi Zi and Ri. All numbers less than 10000 in their absolute value.

Output. YES or NO.

 Input#1```2 0 0 0 1 0 0 2 1 ``` Output#1```YES ```
 Input#2```2 0 0 0 1 2 2 2 2 ``` Output#2```NO ```
 Input#3```4 0 0 0 3 0 0 4 3 0 5 0 4 0 6 0 5 ``` Output#3```YES ```
 Input#4```4 0 0 0 3 0 0 4 3 0 5 0 4 0 6 0 4 ``` Output#4```NO ```

Author:
Artem Voroztsov, played at regional student personal contest in Moscow, 29 April 2005.
1 May 2005

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

 © acm.mipt DevGroupThe page was generated in 200ms