摘要: 凸包算法+枚举View Code 1 /* 2 凸包 3 顺时针!!!! 4 */ 5 #include<stdio.h> 6 #include<string.h> 7 #include<stdlib.h> 8 #include<algorithm> 9 #include<iostream>10 #include<queue>11 #include<stack>12 #include<math.h>13 #include<map>14 using namespace std;15 con 阅读全文
posted @ 2013-03-10 13:51 xxx0624 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 水~分析:n,m。对于第一个人不抽到m号座位概率为(n-1)/n,第二个人为(n-2)/(n-1).。。。第m个人为1/(n-m+1).。。。相乘之后则为 1/nView Code 1 /* 2 水~ 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<stack>11 #include& 阅读全文
posted @ 2013-03-10 12:50 xxx0624 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 水题~~~View Code 1 /* 2 C(N,M) 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<stack>11 #include<math.h>12 #include<map>13 typedef __int64 int64;14 using nam 阅读全文
posted @ 2013-03-10 11:50 xxx0624 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题意:给定一张无向图,求最小的奇数环。注意:状态的设定 vis[ i ][ 0 ] and vis[ i ][ 1 ] 很重要!!!View Code 1 /* 2 BFS+最小奇数环 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 #include<stack>11 #include<math. 阅读全文
posted @ 2013-03-10 11:29 xxx0624 阅读(518) 评论(0) 推荐(0) 编辑