Mr Zz

导航

2011年10月9日

Ignatius and the Princess III

摘要: 120 个数 求 莫个数 有多少种可能整数拆分和 和母函数有关 但是要是每次都调用母函数代码会把之前的也都求出来浪费很多时间。不能 ac , 超时。改成先求出120,在根据下标输出就行 1 #include <iostream> 2 #include<cstring> 3 #include<stdio.h> 4 #include<stdlib.h> 5 using namespace std; 6 #define lmax 150 7 int c1[lmax],c2[lmax]; 8 int main() 9 {10 int n,i,j,k;11 阅读全文

posted @ 2011-10-09 19:57 Mr Zz 阅读(249) 评论(0) 推荐(0)

Bone Collector

摘要: 背包模板题 so so easy题目原意就是 给个包 给各种骨头 都有价值和体积 求最大值 01#include<iostream>#include<cstring>#include<stdio.h>#include<stdlib.h>using namespace std;int f[1500];int v[1500];int w[1500];int main(){ int n,m,vv; //freopen("t.txt","r",stdin); while(scanf("%d",& 阅读全文

posted @ 2011-10-09 14:23 Mr Zz 阅读(113) 评论(0) 推荐(1)