logo AlgoBeat OnlineJudge
登录 注册

#215381. [SWERC 2017] Blowing Candles

内存限制:1024 MiB 时间限制:4000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

As Jacques-Édouard really likes birthday cakes, he celebrates his birthday every hour, instead of every year. His friends ordered him a round cake from a famous pastry shop, and placed candles on its top surface. The number of candles equals the age of Jacques-Édouard in hours. As a result, there is a huge amount of candles burning on the top of the cake. Jacques-Édouard wants to blow all the candles out in one single breath.

You can think of the flames of the candles as being points in the same plane, all within a disk of radius (in nanometers) centered at the origin. On that same plane, the air blown by Jacques-Édouard follows a trajectory that can be described by a straight strip of width , which comprises the area between two parallel lines at distance , the lines themselves being included in that area. What is the minimum width such that Jacques-Édouard can blow all the candles out if he chooses the best orientation to blow?

输入格式

The first line consists of the integers and , separated with a space, where is Jacques-Édouard’s age in hours. Then lines follow, each of them consisting of the two integer coordinates and of the th candle in nanometers, separated with a space.

输出格式

Print the value as a floating point number. An additive or multiplicative error of is tolerated: if is the answer, any number either within or within is accepted.

样例

样例输入 1

3 10
0 0
10 0
0 10

样例输出 1

7.0710678118654755

数据范围与提示

Limits

  • ;
  • ;
  • for , ;
  • all points have distinct coordinates.