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

建议使用的浏览器:

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

6164:Dying Light

题目描述

LsF is visiting a local amusement park with his friends, and a mirror room successfully attracts his attention. Inside the mirror room, there are n plane mirrors standing vertically on the ground. They are placed end-to-end and face-to-face so that if you overlook the room, you can find a convex hull and the all the reflector surfaces are inside the pattern. The height of the mirror is not important in this problem.
Due to imperfect manufacturing techniques, mirrors can't reflect light without lose of energy. Each mirror has a reflection efficiency k, which means if the incident light's intensity is I, the reflected light's intensity will be reduced to kI. The only exception could happen when the light precisely goes to the two mirrors' junction. In that case, the light will be completely absorbed instantly. Note the laws of reflection of light applies in all other situations, that the angle of incidence equals the angle of reflection.
Now LsF stands inside the mirror hall, and shoots a laser beam paralleled to the ground using his laser pointer. Unfortunately, his laser pointer can only shot laser beams with intensity of 1. What's worse, a laser beam is considered disappeared if its intensity is below $10^{-4}$. There's not much magnitude distance between the two numbers.
LsF wants to know how many touches can his laser beam make with mirrors before it disappears.
输入解释
The first line contains an integer n(3≤n≤1000), indicating the number of mirrors;
Then n lines follow. The ith line contains three real numbers $x_i,y_i,k_i(-10^9≤x_i,y_i≤10^9;0≤k_i≤0.9)$, which means the ith mirror's one end is at position $(x_i,y_i)$ and another end is at ($x_{i+1}$mod n,$y_{i+1}$mod n), and its reflectivity is $k_i$.
Next there are two real numbers Vx,Vy(-109≤Vx,Vy≤109), indicating the initial direction vector of the laser beam.
LsF is standing at the origin (0, 0).

输出解释
Output an integer in one line, the number of touches the laser beam could make before it disappears.
输入样例
4
1 2 0.5
-1 0 0.5
1 -2 0.5
3 0 0.5
0 1
4
1 1 0.5
-1 1 0.5
-1 -1 0.5
1 -1 0.5
1 1
输出样例
14
1
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6164

最后修改于 2020-10-25T23:28:56+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 131072/131072K(Java/Others)