Logo
(追記) (追記ここまで)

7916번 - Cross Spider 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB343766723.929%

문제

The Bytean cross spider (Araneida baitoida) is known to have an amazing ability. Namely, it can instantly build an arbitrarily large spiderweb as long as it is contained in a single plane. This ability gives the spider an opportunity to use a fancy hunting strategy. It does not need to wait until a fly is caught in an already built spiderweb; if only the spider knows the current position of a fly, it can instantly build a spiderweb to catch the fly.

A cross spider has just spotted n flies in Byteasar’s garden. Each fly is flying still in some point of a 3D space. The spider is wondering if it can catch all the flies with a single spiderweb. Write a program that answers the spider’s question.

입력

The first line of the input contains an integer n (1 ≤ n ≤ 100 000). The following n lines contain a description of the flies in a 3D space: the i-th line contains three integers xi, yi, zi (−1 000 000 , xi, yi, zi , 1 000 000) giving the coordinates of the i-th fly (a point in a 3-dimensional Euclidean space). No two flies are located in the same point.

출력

Your program should output a single word TAK (i.e., yes in Polish) if the spider can catch all the flies with a single spiderweb. Otherwise your program should output the word NIE (no in Polish).

제한

예제 입력 1

4
0 0 0
-1 0 -100
100 0 231
5 0 15

예제 출력 1

TAK

예제 입력 2

4
0 1 0
-1 0 -100
100 0 231
5 0 15

예제 출력 2

NIE

힌트

출처

ICPC > Regionals > Europe > Central European Regional Contest > Poland Collegiate Programming Contest > AMPPZ 2011 K번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /