This commit is contained in:
nonstriater
2014-05-15 18:54:16 +08:00
parent c9b164bf1f
commit 3290e495d2
8 changed files with 128 additions and 32 deletions
+23
View File
@@ -51,6 +51,10 @@ int factorial(n){
#define min(a,b) ((a)>(b)?(a):(b))
#define MIN(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __a : __b; })
这里不能使用比较符号:
#define min(a,b) ((a)-(b) & (0x1<<31))?(a):(b)
@@ -213,6 +217,25 @@ int one_appear_count(int n);
两个圆相交,交点是A1,A2。现在过A1点做一直线与两个圆分别相交另外一点B1,B2。B1B2可以绕着A1点旋转。问在什么情况下,B1B2最长
题目:输入四个点的坐标,求证四个点是不是一个矩形
关键点:
1.相邻两边斜率之积等于-1,
2.矩形边与坐标系平行的情况下,斜率无穷大不能用积判断。
3.输入四点可能不按顺序,需要对四点排序。
矩阵式螺旋输出