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

建议使用的浏览器:

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

3890:Apparent Magnitude

题目描述
Every time when I gazing at the dazzling night sky, I wonder that how many stars are there and how bright they are …

From Wikipedia, I know that we can use a metric called apparent magnitude (apmag) to describe the brightness of a star. The apparent magnitude of a celestial body is a measure of its brightness as seen by an observer on Earth, normalized to the value it would have in the absence of the atmosphere. The brighter the object appears, the lower the value of its magnitude would be.
In this problem, can you help me to count the stars and their average apmag in the sky?
输入解释
There are several cases in the input, each case begin with two positive integer N (N<=60,000) and M (M<=20,000) giving the number of stars and queries. The following N lines give the 2D- coordinate (-10^8 < x, y < 10^8, integer) and the apmag (-40.00 < apmag < 40.00, a float number of two decimal places) of each star. After that, each of the following M lines contains four integers: -10^8 < lowX, lowY, upX, upY < 10^8, representing the lower-left and upper-right coordinates of a rectangle.
输出解释
For each query, you must answer the number of stars in the rectangle (including the boundary), and their apmag, as a format of "sum_apmag/number_star”. If there is no star in the rectangle, just print "0.00/0” in a single line.
输入样例
4 2
1 1 1.24
2 2 4.56
3 3 7.89
4 4 3.21
1 1 2 2
5 6 7 8
输出样例
5.80/2
0.00/0
来自杭电HDUOJ的附加信息
Recommend chenyongfu

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

源链接: HDU-3890

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

共提交 0

通过率 --%
时间上限 内存上限
5000/3000MS(Java/Others) 125536/65536K(Java/Others)