Encounter a problem hdu 5365
Run
Time limit:2000/1000 MS (java/others) Memory limit:65536/65536 K (java/others)
Total Submission (s): 1081 Accepted Submission (s): 478
Problem Descriptionafa is a girl who like runing. Today,he download an app about runing. The app can record the trace of her runing. AFA'll start runing in the park. There is many chairs in the Park,and AFA would start his runing in a chair and end in this chair. Between Chairs,she running in a line.she want the the trace can be a regular triangle or a square or a regular pentago N or a regular hexagon.
Many ways can her find.
Ways is same if the set of chair that they contains is same.
Inputthere is multiply case.
In each case,there are a integer n (1 < = n < =) in a line.
In next n lines,there is integers xi,yi (0 < = Xi,yi < 9) in each line.
Outputoutput the number of ways.
Sample Input
40 00 11) 01 1
Sample Output
1
See a blog that people know the earth can not construct the whole point is 3.5.6 edge shape;
However, I thought about it and found an astonishing fact;
turns out I'm an alien!
So I looked for it and found a particularly elegant proof:
Dean City
Links: https://www.zhihu.com/question/25304120/answer/30445478
Source: Know
If the whole point is hexagonal existence, there must be the smallest side length, remember that if the whole point is hexagonal existence, there must be the smallest side length, remember.
Think center, will rotate counterclockwise 90 degrees, get. Obviously it is the whole point. Similar definitions ~, they are all the same hour.
As you can see, is a smaller whole point of the hexagonal, contradictory.
It can also be explained that the whole point triangle does not exist. Because as long as there is a positive triangle, there must be a positive hexagon.
It is worth noting that such proof can be generalized (when). The following is the case of Pentagon.
In addition, it can be proved that the positive side shape of the rational number coordinate does not exist. Because if there is a positive edge of the rational number coordinate, take all the least common multiple of the denominator of the horizontal ordinate, all the coordinates are enlarged times, the whole point is given a positive edge shape, which contradicts the above proof.
Mathematics is a very beautiful thing, but I can do nothing.
Why there are no lattice triangles, positive pentagon, and positive hexagons