上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页
摘要: 题目链接:http://poj.org/problem?id=1631#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 40050;const int INF = 0x3f3f3f;int main(){ //freopen("E:\\acm\\input.txt","r",stdin); int T; cin>>T; while(T--){ int 阅读全文
posted @ 2013-08-23 15:42 等待最好的两个人 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1609#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 105;const int INF = 0x3f3f3f;int main(){ //freopen("E:\\acm\\input.txt","r",stdin); int N; int dp[maxn][maxn]; int B[maxn] 阅读全文
posted @ 2013-08-23 13:57 等待最好的两个人 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1198#include #include #include #include #include #include #include using namespace std;const int maxn = 150;const int maxe = 5000;const int INF = 0x3f3f3f;struct Edge{ int u,v,flow,cap,cost; int next; Edge(int u=0,int v=0,int flow=0,int... 阅读全文
posted @ 2013-08-23 12:18 等待最好的两个人 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 就像1、2元人民币可以凑成任意你想要的面值一样。由于一定会有环,只要有C[i] == 1 就可以造成任何数。够坑吧#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 1e5+5;const int INF = 0x3f3f3f;int main(){ int C[maxn],T[maxn]; int N,Q; while(cin>>N>>Q){ bool flag = ... 阅读全文
posted @ 2013-08-22 19:42 等待最好的两个人 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4705#pragma comment(linker, "/STACK:16777216")#include #include #include #include #include #include #include using namespace std;const int maxn = 110010;long long dp[maxn];vector G[maxn];long long num[maxn];long long N;long long ans;void dfs(i 阅读全文
posted @ 2013-08-22 19:38 等待最好的两个人 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1013#include #include #include #include #include #include #include using namespace std;const int maxn = 35;const int INF = 0x3f3f3f;int main(){ //freopen("E:\\acm\\input.txt","r",stdin); int T; cin>>T; for(int t=1;t dp1 阅读全文
posted @ 2013-08-21 21:18 等待最好的两个人 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4322#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 30;const int INF = 0x3f3f3f;struct Edge{ int u,v,flow,cap,cost; int next; Edge(int u=0,int v=0,int flow=0,int cap=0,... 阅读全文
posted @ 2013-08-21 19:09 等待最好的两个人 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 由于暂时不会KM算法,只能用最大费用流来做了。题目链接:http://lightoj.com/volume_showproblem.php?problem=1011#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 500;const int INF = 0x3f3f3f;struct Edge{ int u,v,flow,cap,cost; int next; Edge(int u... 阅读全文
posted @ 2013-08-21 15:25 等待最好的两个人 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1005#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 50;const int INF = 0x3f3f3f;float dp[maxn];long long C[maxn][maxn];long long A[maxn][maxn];int main(){ //freopen(" 阅读全文
posted @ 2013-08-21 14:27 等待最好的两个人 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1004#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 105;const int INF = 0x3f3f3f;int num[maxn*2][maxn];int dp[maxn*2][maxn];int main(){ // freopen("E:\\acm\\input.tx 阅读全文
posted @ 2013-08-21 11:26 等待最好的两个人 阅读(282) 评论(0) 推荐(1) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页