#include<iostream> #include<memory.h> using namespace std; int dp[10010]; int max(int a,int b) { return a>b?a:b; } int main() { int n,v,vi[10100],wi[10100],i,j; while(cin>>n>>v) { memset(vi,0,sizeof(vi)); memset(wi,0,sizeof(wi))…
#include<iostream> #include<memory.h> #define N 10020 using namespace std; int dp[N],pi[N],wi[N]; int max(int a,int b) { return a>b? a:b; } int main() { int n,v,i,j; while(cin>>n>>v) { memset(dp,0,sizeof(dp)); memset(pi,0,sizeof…
Pick apples Time Limit: 1000MS Memory limit: 165536K 题目描写叙述 Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a big bag comes into the yard. She is so surprised because s…
链接:http://poj.org/problem?id=1384 Piggy-Bank Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 8893 Accepted: 4333 Description Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main incom…