Time Limit:1s | Memory limit:32M |
Accepted Submit:46 | Total Submit:126 |
Lmy is the lovely cousin of zmq, and she's a junior high school student. One day she came back from school. Zmq: What did you learn in your class today? It seems that little lmy got into troubles. Can you help her out by designing a program? InputThere are several test cases in the input.The first line of each case is an n (3 ≤ n ≤ 300), indicating that each polygon has n points. And in the following 2n lines, each line represents a point. The first n point represents the first polygon in anti-clockwise order, and so the second. Please note that all the polygons are simple. You can try to rotate them, then tell whether they are similar or not. OutputFor each case, output "Yes" or "No", showing whether they are similar.Sample Input3 0 0 1 1 0 1 0 0 2 2 0 2 3 0 0 1 1 0 1 0 0 2 2 0 1 Sample OutputYes No |
http://acm.fzu.edu.cn/problem.php?pid=1785
求多边形相似的问题,如果对应的每一条边的倍数关系相同则相似