Submission #7412

#TimeUsernameProblemLanguageResultExecution timeMemory
7412gs13068앱 (KOI13_app)C++98
21 / 21
0 ms1128 KiB
#include<cstdio> #include<algorithm> int d[10001]; int a[100]; int b[100]; int main() { int i,j,n,m; scanf("%d%d",&n,&m); for(i=0;i<n;i++)scanf("%d",&a[i]); for(i=0;i<n;i++)scanf("%d",&b[i]); for(i=0;i<n;i++)for(j=i*100;j>=0;j--)if(d[j+b[i]]<d[j]+a[i])d[j+b[i]]=d[j]+a[i]; for(j=0;d[j]<m;j++); printf("%d",j); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...