kirk

........

2011年9月18日

J Tourism Planning

摘要: 网络流、貌似很多人状态DP >_<最大权闭合子图 The 36th ACM/ICPC Asia Regional Beijing Site Online Contesthttp://acm.bupt.edu.cn/onlinejudge/newoj/showProblem/show_problem.php?problem_id=220int ins[100];int val[50][50], comp[50][50];int main(){ int n, m; while(scanf("%d %d", &n, &m) && (n| 阅读全文

posted @ 2011-09-18 21:43 kirk 阅读(575) 评论(0) 推荐(0) 编辑

2011年8月10日

hdu 3929

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3929Lucas定理代码import java.util.*;public class Main { static Scanner in = new Scanner(System.in); static long find(long[] a) { if(a.length==1) return 1l<<Long.bitCount(a[0]); long[] b = new long[a.length-1]; for(int i=0; i... 阅读全文

posted @ 2011-08-10 13:35 kirk 阅读(270) 评论(1) 推荐(0) 编辑

2011年7月24日

hdu 3832 即dijkstra新模板

摘要: 1 // hdu 3832 2 #include <iostream> 3 #include <cstring> 4 #include <queue> 5 #include <algorithm> 6 using namespace std; 7 8 /////二维数组建边 9 #define maxn 205 10 #define MP make_pair 11 const int inf=0x3f3f3f3f; 12 13 int N; //N顶点数 14 int dist[maxn][maxn],mp[maxn][maxn]; 15 voi 阅读全文

posted @ 2011-07-24 21:48 kirk 阅读(290) 评论(0) 推荐(0) 编辑

2011年7月23日

北邮邀请赛J区间回文串

摘要: 1 //O(n)回文串 2 # include <stdio.h> 3 # include <algorithm> 4 # include <iostream> 5 # include <string> 6 # include <cmath> 7 8 # define For(i,a) for(int (i)=0;i<(a);++(i)) 9 using namespace std; 10 const int N=200100; 11 12 int lg[N<<1]; 13 char s[N],str[N<&l 阅读全文

posted @ 2011-07-23 05:51 kirk 阅读(157) 评论(0) 推荐(0) 编辑


kirk