Jet Aircraft

Mr. Retain is so clever that he creates a jet aircraft by himself. A jet aircraft is an aircraft propelled by jet engines. Jet aircraft fly much faster than propeller-powered aircrafts and at higher altitudes -- as high as 10,000 to 15,000 meters (about 33,000 to 49,000 ft). At these altitudes, jet engines achieve maximum efficiency over long distances. The engines in propeller powered aircraft achieve their maximum efficiency at much lower altitudes. Jet aircraft can move faster than sound.

Now, Mr. Retain would like to test his jet aircraft. His has chosen some places as destinations. However, Mr. Retain doesn’t want to take risk to go to every place, i.e. he will go to only one place. The probability of a successful flight between two places is only determined by their distance. Assume X1, Y1, Z1 and X2, Y2, Z2 are coordinates of two places, the probability should be calculate by .

Mr. Retain will give you all the coordinates. Your task is to calculate the maximum probability.

 

Input     (Please use standard input, and don’t read or write files.)

The first line contains an integer N, the number of places (1< N <=10000). It is followed by N lines. Each line contains three integers: X, Y, Z which means the coordinates.

The last line is where Mr. Retain starts from.

|X| , |Y|, |Z| <= 106

 

Output   (Please use standard output, and don’t read or write files.)

The maximum probability with four decimal points

 

Sample Input

Sample Output

3

1 0 0

2 2 2

0 0 0

 

0.7071

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值