# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1152 |
2013-06-28T06:39:03 Z |
kriii |
앱 (KOI13_app) |
C++ |
|
0 ms |
1128 KB |
#include <stdio.h>
int N,M,V[10100];
int m[101],c[101];
int main()
{
int i,j;
for (i=1;i<=10000;i++) V[i] = -1;
scanf ("%d %d",&N,&M);
for (i=0;i<N;i++) scanf ("%d",&m[i]);
for (i=0;i<N;i++) scanf ("%d",&c[i]);
for (i=0;i<N;i++){
for (j=10000;j>=0;j--) if (V[j] != -1){
if (V[j+c[i]] < V[j] + m[i])
V[j+c[i]] = V[j] + m[i];
}
}
for (i=0;i<=10000;i++) if (V[i] >= M) break;
printf ("%d",i);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1128 KB |
Output is correct |
2 |
Correct |
0 ms |
1128 KB |
Output is correct |
3 |
Correct |
0 ms |
1128 KB |
Output is correct |
4 |
Correct |
0 ms |
1128 KB |
Output is correct |
5 |
Correct |
0 ms |
1128 KB |
Output is correct |
6 |
Correct |
0 ms |
1128 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1128 KB |
Output is correct |
2 |
Correct |
0 ms |
1128 KB |
Output is correct |
3 |
Correct |
0 ms |
1128 KB |
Output is correct |
4 |
Correct |
0 ms |
1128 KB |
Output is correct |
5 |
Correct |
0 ms |
1128 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1128 KB |
Output is correct |
2 |
Correct |
0 ms |
1128 KB |
Output is correct |
3 |
Correct |
0 ms |
1128 KB |
Output is correct |
4 |
Correct |
0 ms |
1128 KB |
Output is correct |
5 |
Correct |
0 ms |
1128 KB |
Output is correct |
6 |
Correct |
0 ms |
1128 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1128 KB |
Output is correct |
2 |
Correct |
0 ms |
1128 KB |
Output is correct |
3 |
Correct |
0 ms |
1128 KB |
Output is correct |
4 |
Correct |
0 ms |
1128 KB |
Output is correct |
5 |
Correct |
0 ms |
1128 KB |
Output is correct |
6 |
Correct |
0 ms |
1128 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1128 KB |
Output is correct |
2 |
Correct |
0 ms |
1128 KB |
Output is correct |
3 |
Correct |
0 ms |
1128 KB |
Output is correct |
4 |
Correct |
0 ms |
1128 KB |
Output is correct |
5 |
Correct |
0 ms |
1128 KB |
Output is correct |
6 |
Correct |
0 ms |
1128 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1128 KB |
Output is correct |
2 |
Correct |
0 ms |
1128 KB |
Output is correct |
3 |
Correct |
0 ms |
1128 KB |
Output is correct |
4 |
Correct |
0 ms |
1128 KB |
Output is correct |
5 |
Correct |
0 ms |
1128 KB |
Output is correct |
6 |
Correct |
0 ms |
1128 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1128 KB |
Output is correct |
2 |
Correct |
0 ms |
1128 KB |
Output is correct |
3 |
Correct |
0 ms |
1128 KB |
Output is correct |
4 |
Correct |
0 ms |
1128 KB |
Output is correct |