Qiuqiqiu  
不管道路多么崎岖坎坷,我永远不停下追逐梦想的脚步!
上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页

2012年4月17日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4185View Code 1 //4185 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 6 const int N=610; 7 char mz[N][N]; 8 const int dx[4]={0,1,0,-1}; 9 const int dy[4]={1,0,-1,0};10 int n;11 int mat[N][N],vis[N][N];12 int h(int x,int y)13 {1 阅读全文
posted @ 2012-04-17 16:21 Qiuqiqiu 阅读(291) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1498最小点覆盖View Code 1 //1498 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 6 const int N=110; 7 int g[N][N],n; 8 int mat[N],vis[N]; 9 bool find(int u,int c)10 {11 for(int v=0;v<n;v++)12 if(g[u][v]==c && !vis[v])13 {1 阅读全文
posted @ 2012-04-17 13:20 Qiuqiqiu 阅读(161) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1281View Code 1 //1281 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 6 const int N=110; 7 int g[N][N],n,m,u[N],v[N]; 8 int mat[N],vis[N]; 9 bool find(int u)10 {11 for(int v=1;v<=m;v++)12 if(g[u][v] && !vis[v])13 {14 阅读全文
posted @ 2012-04-17 12:28 Qiuqiqiu 阅读(154) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1151DAG图的最小路径覆盖数=节点数-最大匹配数View Code 1 //1151 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 6 const int N=150; 7 int g[N][N],n; 8 int mat[N],vis[N]; 9 bool find(int u)10 {11 for(int v=1;v<=n;v++)12 if(g[u][v] && !vis 阅读全文
posted @ 2012-04-17 11:08 Qiuqiqiu 阅读(229) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1150最小顶点覆盖View Code 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 const int N=150; 6 int g[N][N],n,m; 7 int mat[N],vis[N]; 8 bool match(int u) 9 {10 for(int v=1;v<m;v++)11 if(g[u][v] && !vis[v])12 {13 v... 阅读全文
posted @ 2012-04-17 10:06 Qiuqiqiu 阅读(147) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1068View Code 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 const int N=1500; 6 int g[N][N],n; 7 int mat[N],vis[N]; 8 bool match(int u) 9 {10 for(int v=0;v<n;v++)11 if(g[u][v] && !vis[v])12 {13 vis[v]=1... 阅读全文
posted @ 2012-04-17 08:35 Qiuqiqiu 阅读(195) 评论(0) 推荐(0) 编辑

2012年4月10日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3016线段树,成段更新,区间最值View Code 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 5 #define lch (rt<<1) 6 #define rch (rt<<1|1) 7 const int N=100010; 8 struct plank 9 { 10 int h,x,y,v; 11 bool operator < (const plank & 阅读全文
posted @ 2012-04-10 20:11 Qiuqiqiu 阅读(121) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3333树状数组+离散化+离线算法读入所有区间,按右端点排序,每加入一个数时,如果已经加过,就在该数原来位置减去它,在新位置加上它View Code 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 5 typedef __int64 LL; 6 const int N=30010,Q=100010; 7 int a[N],n,vis[N]; 8 int dz[N],nd; 9 LL c[N];10 s 阅读全文
posted @ 2012-04-10 15:25 Qiuqiqiu 阅读(192) 评论(0) 推荐(0) 编辑

2012年4月8日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2871线段树的各种综合单点更新,区间合并View Code 1 #include <cstdio> 2 using namespace std; 3 4 #define lch (rt<<1) 5 #define rch (rt<<1|1) 6 const int N=50010; 7 int u[N],v[N],se; 8 struct node 9 { 10 int l,r; 11 int len() {return r-l+1;} 12 int s,ls,rs,... 阅读全文
posted @ 2012-04-08 09:27 Qiuqiqiu 阅读(188) 评论(0) 推荐(0) 编辑

2012年3月30日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2243AC自动机+dp+矩阵View Code 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 /**MATRIX**************************************************************/ 6 #define ET unsigned __int64 7 const int RC=30; 8 //const int md=9973; 9 struct 阅读全文
posted @ 2012-03-30 21:26 Qiuqiqiu 阅读(378) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 20 下一页