上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 37 下一页
摘要: 题意就是让你求两次1到n的最短路。这题应该可以用最短路来求解吧,只需要将第一次用到的边删去即可。我这里是按照算法竞赛入门经典里面提到拆点+最小费最大流。#includeusing namespace std;const int N=1024*4;const int inf=1edge... 阅读全文
posted @ 2015-08-18 22:28 xryz 阅读(116) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;typedef long long ll;int main(){ int _,n,i,p; scanf("%d",&_); while(_--) { scanf("%d",&n); ... 阅读全文
posted @ 2015-08-17 17:05 xryz 阅读(99) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int s[100],k;int fnc(int x){ int ret=0; while(x>0) { s[k++]=x%10; ret+=x%10; x/=10; ... 阅读全文
posted @ 2015-08-17 17:03 xryz 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题意是告诉你全部一张图点与点之间的最短路,问你原图最少有几个点?#includeusing namespace std;int mp[100+5][100+5],d[100+5][100+5];int main(){ int _,n,i,j,k,p,ans; scanf(... 阅读全文
posted @ 2015-08-17 17:01 xryz 阅读(95) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;const double i... 阅读全文
posted @ 2015-08-16 17:55 xryz 阅读(94) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;const... 阅读全文
posted @ 2015-08-16 16:55 xryz 阅读(111) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;const int N=200000+5;const int inf=1edges;vectorG[N];int n,m,s,t;int vis[N];int d[N];int c... 阅读全文
posted @ 2015-08-16 13:25 xryz 阅读(129) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#includeusing namespace std;const int N=1024;const int inf=0x7fffffff;struct Edge{ int u,v,w,use,del;};vectoredge;v... 阅读全文
posted @ 2015-08-14 19:45 xryz 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#includeusing namespace std;const int N=1024;const int inf=1edges... 阅读全文
posted @ 2015-08-13 19:20 xryz 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include using namespace std;int gcd(int u,int v){ if(u10*180) difms=10*360-difms; if(d... 阅读全文
posted @ 2015-08-13 17:13 xryz 阅读(115) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 37 下一页