http://www.cogs.top/cogs/problem/problem.php?pid=254 dist[i]表示能最早到达i点的时间.这样就可以用最短路模型来转移了. #include<queue> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N = 1003; const int K = 2003; int in()…
http://cojs.tk/cogs/problem/problem.php?pid=894 题意:n个点m条边的加权网络,求最少边数的按编号字典序最小的最小割.(n<=32, m<=1000) #include <bits/stdc++.h> using namespace std; typedef long long ll; struct Gr { static const int N=33, M=1005, oo=~0u>>1; struct E { int n…
1755: [Usaco2005 qua]Bank Interest Time Limit: 5 Sec Memory Limit: 64 MBSubmit: 187 Solved: 162[Submit][Status][Discuss] Description Farmer John made a profit last year! He would like to invest it well but wonders how much money he will make. He kn…