2012年9月22日

HDU 4405 Aeroplane chess

摘要: 算法:概率DP, dp[i] 表示到达i后还需要多少次可使游戏结束。。。#include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespace std;#define Pe (1.0 / 6. 阅读全文

posted @ 2012-09-22 21:44 more think, more gains 阅读(113) 评论(0) 推荐(0) 编辑

HDU 4407 sum 容斥原理

摘要: 算法:利用数据1...N的性质,求与P的互质的个数,位运算,容斥定理。。#include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespace std;struct info{ int s,e 阅读全文

posted @ 2012-09-22 21:07 more think, more gains 阅读(329) 评论(0) 推荐(0) 编辑

导航