111qqz的小窝

老年咸鱼冲锋!

hdu 5365 (bc #50 1002 )Run

Run

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 594    Accepted Submission(s): 265

Problem Description
AFA is a girl who like runing.Today,he download an app about runing .The app can record the trace of her runing.AFA will start runing in the park.There are many chairs in the park,and AFA will start his runing in a chair and end in this chair.Between two chairs,she running in a line.she want the the trace can be a regular triangle or a square or a regular pentagon or a regular hexagon.
Please tell her how many ways can her find.
Two ways are same if the set of chair that they contains are same.

 

Input
There are multiply case.
In each case,there is a integer n(1 < = n < = 20)in a line.
In next n lines,there are two integers xi,yi(0 < = xi,yi < 9) in each line.

 

Output
Output the number of ways.

 

Sample Input
4
0 0
0 1
1 0
1 1

 

Sample Output
1

 

Source
证明在这里: http://www.zhihu.com/question/25304120/answer/30445478
然后就暴力做就行,枚举四个点
正方形判断的条件是四条边相等且对角线相等,且对角线的平方等于边长平方的2倍

说点什么

您将是第一位评论人!

提醒
wpDiscuz
粤ICP备18103363