https://en.wikibooks.org/wiki/Famous_Theorems_of_Mathematics/Brouwer_fixed-point_theorem
Maps
The well known fixed point theorem states that if you take two maps of the same region that have different scales and put the smaller one atop the larger so that it is located completely within it, there is the point on the plane that represents the same actual point on both maps. Of course, there may be no common point for three or more maps - pairwise fixed points of different maps may be different.
Consider that you are given three rectangular maps M1, M2 and M3 of the same region but with different scales s1 > s2 > s3 (the scale of the map is the ratio of linear sizes of objects on the map to linear sizes of the actual objects, for any given region the larger is the scale of the map, the larger are the linear sizes of the map). Let the smallest map M3 be placed atop the largest one M1 in such a way that it is completely located within it. You have find the way to place the medium map M2, in such a way that the following conditions are satisifed:
M2 is completely located within M1;
M3 is completely located within M2;
there is the point that represents the same actual place on all three maps.
Input
Input contains multiple test cases. The first line of the input is a single integer T (1 <= T <= 50) which is the number of test cases. T test cases follow, each preceded by a single blank line.
The first line of each case contains three real numbers - the scale s1 and the linear sizes x1, y1 of the largest map (1 <= x1, y1 <= 1000). Let the map be placed on the cartesian plane (with OX axis directed rightwards and OY axis directed upwards) in such a way that its corners are in the points with coordinates (0, 0), (x1, 0), (x1, y1) and (0, y1).
The second line of each case contains one real number s2 - the scale of the medium map.
The third line of each case contains nine real numbers - the scale s3 of the smallest map and the coordinates of its four corners, given in counterclockwise order, starting from the corner corresponding to the lower-left one of the largest map. It is guaranteed that the input data is correct, that is, the map is rectangular, linear sizes of the map are all in compliance with its scale and linear sizes of the largest map, and the map is completely within the largest map.
You may also assume that the smallest map has no common points with the border of the largest map (although you may put the medium map in such a way that it has common border points with either of the other maps).
The scales of the maps satisfy 102 >= s1 > s2 > s3 >= 10-2, it is guaranteed that the difference between any two scales is at least 10-2.
Output
For each test case, if it is impossible to find the requested place for the medium map, print "impossible" on a single line. In the other case print eight real numbers - the coordinates of the corners of the second map in counterclockwise order, starting from the corner corresponding to the lower-left one of the largest map. Making calculations with the precision of 10-6 is satisfactory. Do not print blank lines in output.
Sample Input
2
1.0 10.0 5.0
0.3
0.2 3.0 2.5 1.0 2.5 1.0 1.5 3.0 1.5
1.0 1.0 1.0
0.5
0.1 0.11 0.01 0.11 0.11 0.01 0.11 0.01 0.01
Sample Output
3.2500000000 2.7083333333 0.2500000000 2.7083333333 0.2500000000 1.2083333333 3.2500000000 1.2083333333
impossible
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答
1条回答
为你推荐
- 嵌套地图golang的结构
- maps
- struct
- 3个回答
- Googlemaps V3和Ajax load()菜单
- ajax
- php
- jquery
- 2个回答
- 在PHP中调用AJAX后加载Google Maps选项
- ajax
- php
- javascript
- 2个回答
- 带有形状的Google Maps Infowindows
- php
- javascript
- mysql
- 2个回答
- 使用Google Maps Api(JSON)获取两个位置之间的距离
- php
- json
- 1个回答
- 使用PHP编码Google Maps地理编码器的变量
- urlencode
- php
- 1个回答
- 获取json数据并传递给PHP字符串(Here Maps api)
- php
- json
- 2个回答
- 使用Google Maps API计算两个地址之间的距离
- php
- wordpress
- 1个回答
- Google Maps Javascript API v3函数getPlace()返回undefined
- php
- javascript
- 1个回答
- infowindow的Google Maps V3 API链接
- php
- javascript
- 1个回答
- WP排队Google Maps API语法错误[重复]
- php
- wordpress
- 1个回答
- 将Google Maps API V2升级到V3
- maps
- php
- javascript
- mysql
- 1个回答
- Google Maps嵌入html表单并在MYSQL数据库中保存用户选择的位置
- html
- php
- mysql
- 1个回答
- Google Maps API距离矩阵请求
- php
- 2个回答
- Google Maps API使用PHP和MySQL获取路线
- php
- 1个回答
- Google Maps API V3 KML图层未显示
- php
- overlay
- 1个回答
- Maps
- numbers
- 2个回答
- Merging Maps
- lines
- 1个回答
- GoogleMaps V2 中的Gps LocationListenser
- android
- java
- eclipse
- 1个回答