摘要: A.题意:给一个有向图无环连通图,求添加一条边X->Y后有向生成树的方案数。(nusing namespace std;typedef long long ll;const int N=100005, mo=1000000007;int ihead[N], cnt, n, m, X, Y;struc... 阅读全文
posted @ 2015-04-26 18:48 iwtwiioi 阅读(311) 评论(0) 推荐(0) 编辑
摘要: A.题意:求去掉d物品后容量为e最大背包。每个物品有三种属性,权值、容量、数量。#include using namespace std;const int V=1000, N=1005;void zop(int *d, int w, int v) { for(int i=V; i>=v; --i)... 阅读全文
posted @ 2015-04-26 07:32 iwtwiioi 阅读(245) 评论(0) 推荐(0) 编辑