시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
3 초 512 MB 0 0 0 0.000%

문제

You knocked over the inkwell for the team fountain pen... Now spots of ink are beginning to form on the page and spread out. This is really going to hamper your speed at writing up programming contest solutions.

The ink spreads out by forming infinitesimally-small blots on the page. A blot that appears at time t seconds after the incident grows in radius smoothly, at a rate of 1cm per second, and may eventually overlap with other blots on the page.

At first the page is still usable, but when the combined size of the ink blots grows large enough, you will have to abandon your work and find another piece of paper upon which to type up solutions.

How long will it take for this to happen?

Figure K.1: Illustration of Sample Input 1.

입력

The input consists of:

  • one line with the number of inkblots, n (1 ≤ n ≤ 100), and the real-valued total area of ink in square centimetres at which the paper must be abandoned, a (1 ≤ a ≤ 109).
  • n further lines, each with the x and y coordinates in centimetres of an ink blot (−106 ≤ x, y ≤ 106) and the time in seconds at which the blot first appears, t (0 ≤ t ≤ 106).

출력

Output the time in seconds at which the ink blots cover exactly a square centimetres of the infinitely-large page. Your answer must be accurate to an absolute or relative error of 10−6.

예제 입력 1

4 20.566371
0.0 0.0 0.0
0.0 2.0 0.0
2.0 0.0 0.0
2.0 2.0 0.0

예제 출력 1

1.4142135624

예제 입력 2

2 785.398163397
-50 0 20
50 0 30

예제 출력 2

35

예제 입력 3

5 10000
0 0 0
0 0 1
0 0 2
10 0 1
0 -5 2

예제 출력 3

53.3322048