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

建议使用的浏览器:

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

4754:Spacecraft Monitoring

题目描述
  In recent years, China's space industry has made rapid development, and recently launched the manned spacecraft shenzhou 10. Beauty Astronaut Wang Yaping even made a lesson in the spacecraft to the whole world. It means a lot to China's space communication. And the Nanjing University of Science and Technology also contribute their strength in communication, radar and detecting guidance.
  Today, there have been many aircrafts in space, they are communicating with each other in air, or with the ground monitoring points in ground (including fixed and mobile monitoring point). To simplify the problem, we assume that all the aircrafts and ground monitoring points are all in the equatorial plane. Aircrafts are all in synchronous orbit, suppose the earth’s core as point (0, 0). We already know:
  Every aircraft’s or ground monitoring point’s height R relative to the earth’s core, initial angle A (rad), and some communication relationship between them.
  Also every aircraft’s or ground monitoring point’s cost price P.
  And the ground-to-ground price per unit distance: dd, ground-to-air price per unit distance: dk (air-to-ground the same), air-to-air price per unit distance: kk.
  In order to know the general condition of the system, you should calculate the maximal average cost price of some aircrafts or ground monitoring points. The average cost price = (the sum of aircrafts’ or ground monitoring points’ cost price + communication cost price between them if it's existing)/(the amount of the aircrafts or ground monitoring points)
输入解释
  Multiple cases, end with EOF;
  The first line, 4 positive integers, n, dd, dk, kk, there is n aircrafts or ground monitoring points, dd, dk, kk is the same with description above. Remember that we first calculate the distance between two objects into integer, four to five homes in rounding, then calculate the communication cost price.

  Next n lines, each represents an aircraft or ground monitoring point,
if the first letter is ‘d’, it means “ground monitoring point” in ground,
if the first letter is ‘k’, it means “aircraft”in air,
then R,A,P, described above.

  Next an integer m, the amount of communication relationship.
  Next m lines, each line is like x, B, y, C (1<=B, C<=n, x, y = ‘d’ or ‘k’), represents object B is communicated with object C, B’s type is x, C’s type is y; B,C is the sequence number in particular kind ('d' or 'k') listed above, starts from 1.
  1<=n<=300, 0<=m<=n*n, 1<=dd,dk,kk<=10^6, R、A are floating numbers, 0<=R<=1000,
0<=A<2*PI, 1<=P<=10^6。
  PS: communication between two points is considered as a segment.
输出解释
  After “Case #” + case number + ”: ”, case number starts from 1, Output 2 numbers, separated by a blank space, first is the maximal average cost price, next is the amount of this part. The result should be corrected to four decimal places.
输入样例
2 1000 2000 3000
d 2 0 1
d 3 0 4
1
d 1 d 2
输出样例
Case #1: 502.5000 2
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-4754

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

共提交 0

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