上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 59 下一页
摘要: #include#include#define inf 1000000000#include#define N 300using namespace std;int map[N][N],n,pre[N];int min(int a,int b) {return a>b?b:a;}int spfa()... 阅读全文
posted @ 2014-04-14 17:20 HYDhyd 阅读(110) 评论(0) 推荐(0) 编辑
摘要: http://hi.baidu.com/nicker2010/item/4fa83c4c5050b3e5a4c066ec另一个Lastnon-zeroDigitinN!TimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Ot... 阅读全文
posted @ 2014-04-14 15:33 HYDhyd 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 假若求从1-6的最大流从图中看有两条路1)1--2--5--6(流量:32)1--3--4--6 (流量:6但是如果我们搜这条路1--2--4--6(流量:6那么最大流就只是6但是如果建一个退边后我们还可以搜从1--3--4--2--5--6(流量:3这条路最后的结果也是正确的。. 阅读全文
posted @ 2014-04-12 16:39 HYDhyd 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 这篇文章主要是介绍指向指针的指针的一种用法所以这里不谈指针或指向指针的指针他们的基础直接上代码(用途:使用一个函数动态申请内存,并赋值。跳出调用函数后输出赋值内容)[cpp]view plaincopyprint?#include#includetypedefstructData{intda;}Da... 阅读全文
posted @ 2014-04-09 15:40 HYDhyd 阅读(789) 评论(0) 推荐(0) 编辑
摘要: #include#include#include//只需判断是否有正环路径就可以了using namespace std;#define N 200struct node {double r,c;}map[N][N];double maxvalue[N],h;int n,cou[N];int bel... 阅读全文
posted @ 2014-04-09 14:40 HYDhyd 阅读(181) 评论(0) 推荐(0) 编辑
摘要: #include#includechars[11000],t[1100000];intnext[11000];voidgetkmp(intlen) {intj,k;next[0]=-1;j=0;k=-1;while(j<len) {if(k==-1||s[k]==s[j]) {j++;k++;if(... 阅读全文
posted @ 2014-04-08 16:14 HYDhyd 阅读(190) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#define N 200double co(double a,double b) { return (a-b)*(a-b);}struct node { double x,y,z,r;}a[N];struct nodee{ double len; i... 阅读全文
posted @ 2014-04-08 10:01 HYDhyd 阅读(139) 评论(0) 推荐(0) 编辑
摘要: #include#define N 30int visit[N];struct node { int prenum,index,count,pre;}a[N];int b[N];int main() { int t,m,n,i,j,k,sum; scanf("%d",&t); while(t--) ... 阅读全文
posted @ 2014-04-08 09:55 HYDhyd 阅读(129) 评论(0) 推荐(0) 编辑
摘要: char*strncpy(char*dest,char*src, size_tnum );功能:(c/c++)复制src中的内容(字符,数字、汉字....)到dest,复制多少由num的值决定,返回指向dest的指针。如果遇到null字符('\0'),且还没有到num个字符时,就用(num - n)... 阅读全文
posted @ 2014-03-31 09:51 HYDhyd 阅读(242) 评论(0) 推荐(0) 编辑
摘要: http://blog.163.com/qhx_405/blog/static/6338992620098140352928/ 阅读全文
posted @ 2014-03-30 19:20 HYDhyd 阅读(112) 评论(0) 推荐(0) 编辑
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 59 下一页