上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: #include "stdio.h" //poj 2135 最小费用最大流模板#include "string.h"#include using namespace std;#define N 1005#define INF 0x3fffffffstruct node { int u,v; int ... 阅读全文
posted @ 2013-11-28 14:13 ruo_yu 阅读(225) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" //最大流模板 poj 1273#include "queue"using namespace std;int n,m;#define N 205#define INF 0x3fffffffint map[N][N];int maxf[N];int route... 阅读全文
posted @ 2013-11-27 15:58 ruo_yu 阅读(177) 评论(0) 推荐(0) 编辑
摘要: #include "cstdio" //邻接表+spfa算法(不断松弛操作) hdu 2544#include "queue"#include "string.h"using namespace std;struct node { int x; int value; //价值 int next... 阅读全文
posted @ 2013-11-27 15:30 ruo_yu 阅读(181) 评论(0) 推荐(0) 编辑
摘要: #include"stdio.h"#include"string.h"const int N=105;int n,m;int indegree[N],map[N][N];int top_sort(){ int i,l,k; for(k=0;k<n;k++) { for... 阅读全文
posted @ 2013-11-18 17:52 ruo_yu 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdio.h" //二分+并查集,,想想道理何在! 2 #include "stdlib.h" 3 #include "algorithm" 4 using namespace std; 5 #define INF 0x3fffffff 6 struct node{ 7... 阅读全文
posted @ 2013-11-18 17:43 ruo_yu 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 鉴于在网上找的代码和我心中的好代码相差较大,贴个自己写的,不好莫怪哈~~题目链接:http://poj.org/problem?id=3468代码实现: 1 #include "stdio.h" //线段树成段更新 poj 3468 2 #include "string.h" 3 #incl... 阅读全文
posted @ 2013-08-06 08:57 ruo_yu 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1016代码示例: 1 #include "stdio.h" 2 #include "string.h" 3 4 #define N 100 5 int n,a[100],t; 6 int mark[25... 阅读全文
posted @ 2013-07-14 19:40 ruo_yu 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 只是练练手!#include "stdio.h"#include "string.h"char map[105][105];int m,n;int dis[8][2]={{1,-1,},{1,0},{1,1},{0,-1},{0,1},{-1,-1},{-1,0},{-1,1}};void DFS(... 阅读全文
posted @ 2013-07-14 08:32 ruo_yu 阅读(252) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"#include "math.h"int queen[11]={0},coun;void DFS(int num);int check(int p);int main(){ coun=0; DFS(0); printf("%d\n",coun); return 0... 阅读全文
posted @ 2013-07-13 10:46 ruo_yu 阅读(1045) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"int DFS(int n,int m);int main(){ int T; int n,m; int s; scanf("%d",&T); while(T--) { scanf("%d%d",&m,&n); s=DFS(m,n); printf("%d\... 阅读全文
posted @ 2013-07-09 19:41 ruo_yu 阅读(253) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页