摘要: Problem DescriptionHappy New Term! As having become a junior, xiaoA recognizes that there is not much time for her to AC problems, because there are some other things for her to do, which makes her nearly mad. What's more, her boss tells her that for some sets of duties, she must choose at least 阅读全文
posted @ 2013-10-07 18:56 forevermemory 阅读(426) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int p[105][105]; int pp[105][105]; int des[105]; int sum[12][10005]; int n,v,g; int maxi(int a,int b) { return ab?a:b; } int main() { int i,j,k,l,a,b,c; while(scanf("%d %d %d",&n,&v,&g)!=EOF) { memset(p,0,sizeof(p)); memset(pp,0,sizeof(pp)); memset(des,0,sizeof(des)); memset(sum,-1,sizeof(sum)); for(i=0;i=v;i++) sum[0][i]=0; for(i=0;in;i++) { scanf("%d %d %d" 阅读全文
posted @ 2013-10-07 11:39 forevermemory 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Description 殷犇有很多队员。他们都认为自己是最强的,于是,一场比赛开始了~ 于是安叔主办了一场比赛,比赛有n个题目,每个题目都有一个价值Pi和相对能力消耗Wi,但是有些题目因为太坑不能同时做出来,并且坑题具有传递性。(a和b一起做会坑、b和c会坑则a和c也会坑) ACM队员们想知道,于是他们想知道在能力范围内,它们最多可以作出多少价值的题目。 聪明的你,告诉我,能帮帮他们吗?Input 第1行两个整数,n,Wmax,k(0#include#include#include#includeusingnamespacestd;intfather[1005];intpri[1005];in 阅读全文
posted @ 2013-10-07 00:32 forevermemory 阅读(189) 评论(0) 推荐(0) 编辑