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

建议使用的浏览器:

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

3491:Rotated Sky Charts

题目描述

Lambert has two scanned images of a sky chart. These two images look identical except that they are rotated and scaled with different parameters with respect to the same center. Lambert wants to know the smallest angle one of the images has to be rotated so that the two images coincide if appropriately scaled.

输入解释

The input contains multiple test cases. Each test case begins with a line containing a positive integer n (1 ≤ n1 000 000), the number of stars shown in each image. Then comes 2n lines each containing a pair of real numbers (x, y), the position of a star in an image. The first n lines describe the first image; the rest describe the second image. The input ends once EOF is met.

输出解释

For each test case, output one line containing the smallest angle the first image has to be rotated counterclockwise so that the two images coincide if appropriately scaled. Output your result in degrees and round it to two digits beyond decimal point.

输入样例
1
1 0
0 100
2
1 1
-1 1
1 -1
-1 -1
5
-19830.82380 -18786.25720
2148.03095 -18081.71419
875.00326 -22561.64828
7119.42127 8980.47085
-8967.62588 37.09588
24112.04526 12837.22343
2737.01862 18001.97639
5155.38703 21982.16524
-9250.95629 -6764.23120
8634.96079 -2420.15335
输出样例
90.0
180.00
164.58

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

源链接: POJ-3491

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

共提交 0

通过率 --%
时间上限 内存上限
2000 131072