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://acm.hdu.edu.cn/showproblem.php?pid=2057 For each test case,print the sum of A and B in hexadecimal in one line. Sample Input +A -A +1A 12 1A -9 -1A -12 1A -AA Sample Output 0 2C 11 -2C -90 #include <cstdio> #include <iostream> #i…
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…