背包
MEIdeblog
这个作者很懒,什么都没留下…
展开
-
背包,特基本,一开始却非常迷惑
#include #include #include int t,N;int max(int x,int y){ return x>y?x:y;}int main(){ int i,j; int w[3]={150,200,350}; int c[3]={150,200,350}; int f[10005];原创 2014-08-21 11:00:43 · 512 阅读 · 0 评论 -
01背包,最基础的,看着模板敲的,交上还错了5次,不懂为什么用C交就不对呢。还是不懂
#include #include #include int f[10005];int v[10005],w[10005];int max(int x,int y){ return x>y?x:y;}int main(){ int i,j; int t,n,V; scanf("%d",&t); while(t-原创 2014-08-20 20:48:48 · 353 阅读 · 0 评论