摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3631 1 #include <iostream> 2 #include <cmath> 3 #include <cstdio> 4 #include <algorithm> 5 using namespace std; 6 int arr[50]; 7 int n,mx,m; 8 void dfs(int cur,int total) 9 {10 if(mx==m) return ;11 if(total>mx&am 阅读全文
posted @ 2012-07-30 16:23 qijinbiao1 阅读(186) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1115定理1 已知三角形△A1A2A3的顶点坐标Ai ( xi , yi ) ( i =1, 2, 3) 。它的重心坐标为: xg = (x1+x2+x3) / 3 ; yg = (y1+y2+y3) / 3 ;定理2 已知三角形△A1A2A3的顶点坐标Ai ( xi , yi ) ( i =1, 2, 3) 。该三角形的有向面积为: S =((x2 - x1) * (y3 -y1) - (x3 - x1) * (y2 - y1) ) / 2 ; △A1A2A3 边界构成逆时针回路时取+#incl... 阅读全文
posted @ 2012-07-30 15:39 qijinbiao1 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1 + 3 + 5 + ... + (2n - 1) = n^21*2 + 2*3 + 3*4 + ... + n*(n + 1) = n*(n + 1)*(n + 2) / 31*1! + 2*2! + 3*3! + ... + n*n! = (n + 1)! - 11^2 + 2^2 + 3^2 + ... + n^2 = n*(n + 1)*(2n + 1) / 61^2 - 2^2 + 3^2 -... + (-1)^n * n^2 = (-1)^(n + 1) * n * (n + 1) / 22^2 + 4^2 + ... + (2n)^2 = 2n*(n+1)*(2n+1) / 阅读全文
posted @ 2012-07-30 15:15 qijinbiao1 阅读(222) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <cmath>#include <cstdio>using namespace std;struct line{ double x1,y1; double x2,y2; bool operator < (const line &a) const { return x1 < a.x1; }}arr[110];bool cross(line a,line b){ double fa=((a.x2-a.x1)*(b.y1-a.y1)-(a.y2-a.y1)*(b.x1-a.x1))* .. 阅读全文
posted @ 2012-07-30 11:22 qijinbiao1 阅读(152) 评论(0) 推荐(0) 编辑