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

建议使用的浏览器:

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

3365:New Ground

题目描述
Your school has a large ground. Recently the school wants a new ground similar to the former one.
The ground is a simple polygon. Suppose it has n edges and the old one is A0,A1,…,An-1, the new one is B0,B1,…,Bn-1.
They must be one-to-one mapping.
The new ground can be only worked out by rotating, expanding, contracting and shifting, but not flipping.
Now you know all the points of the old ground, B0, and B1. Can you calculate the other points of the new ground?
输入解释
The first line contains one integer T representing the number of test cases.
For each case, first line contains one integer n (3<=n<=10000).
Then n lines follow. The i-th line has two integers representing the coordinate of the point Ai. (For each 0<=i<j<n, Ai doesn't equals Aj)
Following one line contains four integers. The first two integers represent the coordinate of the point B0, and the second two integers represent the coordinate of the point B1. B0 never equals B1.
All coordinates are within [-10000, 10000].
The old ground always has a positive area.
输出解释
For each test case, in the first line print the case number.
Then print n lines followed. The i-th line contains two numbers separated by one space representing the coordinate of the point Bi, rounded to 2 digits after the decimal point.

Please follow the format of the sample output.
输入样例
2
3
0 0
1 0
0 1
2 0 2 2
4
0 0
2 0
2 1
0 1
5 0 5 1
输出样例
Case 1:
2.00 0.00
2.00 2.00
0.00 0.00
Case 2:
5.00 0.00
5.00 1.00
4.50 1.00
4.50 0.00
来自杭电HDUOJ的附加信息
Recommend lcy

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

源链接: HDU-3365

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

共提交 0

通过率 --%
时间上限 内存上限
20000/10000MS(Java/Others) 65536/65536K(Java/Others)