上一页 1 ··· 6 7 8 9 10 11 12 13 下一页
摘要: 我对边表的理解和边表的建立://结构struct node{ int u,v,w; int next;}g[M];int head[N],t = 0;//初始化void init(){ t = 0; memset(head,-1,sizeof(head));}//加边void... 阅读全文
posted @ 2014-08-19 18:57 HuberyQian 阅读(2289) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include using namespace std;const int INF=0x3f3f3f3f;int he... 阅读全文
posted @ 2014-08-19 11:15 HuberyQian 阅读(121) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#includeusing namespace std;int pre[500],flow[500][500],dis[500];int map[500][500];int maxflow;int n,m;int ek(int begi... 阅读全文
posted @ 2014-08-18 16:42 HuberyQian 阅读(145) 评论(0) 推荐(0) 编辑
摘要: http://wenku.baidu.com/view/7ed3c241a8956bec0975e32b.html 阅读全文
posted @ 2014-08-18 10:14 HuberyQian 阅读(76) 评论(0) 推荐(0) 编辑
摘要: KMP :http://www.cnblogs.com/dolphin0520/archive/2011/08/24/2151846.html 阅读全文
posted @ 2014-08-14 15:58 HuberyQian 阅读(85) 评论(0) 推荐(0) 编辑
摘要: #include#includechar s1[1000005],s2[1000005];int next[1000005];void get_next(char s[1000005]){ int i = 0; int len = strlen(s); next[0] = -1;... 阅读全文
posted @ 2014-08-14 15:19 HuberyQian 阅读(132) 评论(0) 推荐(0) 编辑
摘要: //BF 算法int BFmatch(char *s,char *p){ int i,j; i = 0; while(i<strlen(s)) { j = 0; while(s[i] == p[j] && j<strlen(p)) {... 阅读全文
posted @ 2014-08-14 14:45 HuberyQian 阅读(110) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn:8080/vjudge/contest/view.action?cid=232#problem/BWe all know that a pair of distinct points on a plane defines a line and that ... 阅读全文
posted @ 2014-08-14 10:24 HuberyQian 阅读(143) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std;struct node{ int l,r; int c; double cnt,lf,rf;}seg[603];double y[201];struct Line{ double x... 阅读全文
posted @ 2014-08-12 08:55 HuberyQian 阅读(107) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;int a[10];int main(){ int i; for(i = 0;i#include using namespace std;int cmp(int a,int b){ return a>b;}... 阅读全文
posted @ 2014-08-11 14:09 HuberyQian 阅读(163) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页