I and OI
Past...
摘要: 1.0/1背包var v,p:array[0..1000] of longint; f:array[0..100000] of longint; n,m,i,j:longint; function max(a,b:longint):longint; begin if a>b then exit(a); exit(b); end;begin readln(n,m); for i:=1 to n do readln(v[i],p[i]); for i:=1 to n do for j:=m downto v[i] do f[j]:=max(f[j],f[j-v[i]]+p[i]); writ 阅读全文
posted @ 2011-08-05 21:50 exponent 阅读(258) 评论(0) 推荐(0) 编辑
摘要: NOIP在即,暑假还剩半月,是时候好好整理下基础知识了.forward~. 阅读全文
posted @ 2011-08-05 20:39 exponent 阅读(109) 评论(0) 推荐(0) 编辑