当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3412:Ray

Special Judge 特殊评判
题目描述

There is a structure consisting of K homogenous slices of equal thickness. The refraction index of the i-th slice is Ni. A ray of light travels in the first slice at the angle a to the normal. Write a program to compute the angle that the ray will have to the normal in the last slice.

It is known that the formula N1sinα=N2sinβ holds in a two-sliced structure with the refraction indices of the slices equal to N1 and N2, respectively, when a ray of light passes from the first slice to the second, traveling at the angle a to the normal in the first slice, and at the angle b to the normal in the second slice.

输入解释

On the first line of the file is the number of slices K (1≤K≤100). Each of the following K lines contains the refraction index Ni of the corresponding slice. All the refraction indices are real numbers in the range from 0.000001 to 2000. The last line of the file contains the angle α between the ray and the normal in the first slice. The angle is a real number in the range from 0 to π/2 and is given in radians.

输出解释

The first and only line of the file must contain the angle β between the ray and the normal in the last slice. The answer must be given with the precision of 0.001. If the ray does not reach the last slice, the output must be the word ‘NO’.

输入样例
2
1
2
0.02
输出样例
0.01

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3412

最后修改于 2020-10-29T07:00:58+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536