摘要:
#include #include #include #include #include #include #include using namespace std;const int maxe = 100000;const int maxn = 205;const int INF = 0x3f3f3f3f;struct Edge{ int u,v,flow,cap,cost; int next; Edge(int u=0,int v=0,int flow=0,int cap=0,int cost=0,int next=0): u(u), v(v), flow... 阅读全文
摘要:
#include #include #include #include #include #include #include using namespace std;const int maxe = 100000;const int maxn = 305;const int INF = 0x3f3f3f3f;int dist[maxn][maxn];int N,M,K;const int Max = 1000000;struct Edge{ int u,v,flow,cap,cost; int next; Edge(int u=0,int v=0,int flow=0,in... 阅读全文
摘要:
题目链接:http://lightoj.com/volume_showproblem.php?problem=1037#include#include#include#includeusing namespace std;const int maxn = 1>T; for(int cas=1; cas>N; for(int i=0; i0) add++; dp[S|1<<j] = min(dp[S|1<<j],dp[S] + add); } } } prin... 阅读全文
摘要:
#include #include #include #include #include #include #include using namespace std;const int maxe = 200010;const int maxn = 100010;const int INF = 0x3f3f3f3f;struct Edge{ int u,v,w; int next; Edge(int u=0,int v=0,int w=0,int next=0): u(u), v(v), w(w) ,next(next){}};struct Heap{ int u,le... 阅读全文