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()…
快速幂+等比数列求和.... Sumdiv Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 12599 Accepted: 3057 Description Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division…
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…
Sumdiv Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 16244 Accepted: 4044 Description Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).…
Sumdiv 题目连接: http://poj.org/problem?id=1845 Description Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901). Input The only line contains the two natur…