# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
25793 | 2017-06-24T07:19:18 Z | TAMREF | 앱 (KOI13_app) | C++11 | 3 ms | 2176 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll D[10005], E[10005]; int C[105], M[105],N,T; int main(){ scanf("%d%d",&N,&T); for(int i=0;i<N;i++) scanf("%d",&M[i]); for(int i=0;i<N;i++) scanf("%d",&C[i]); for(int i=0;i<N;i++){ for(int c=0;c+C[i]<=1e4;c++){ if(D[c]) E[c+C[i]]=max(D[c+C[i]],D[c]+M[i]); } E[C[i]]=max(D[C[i]],(ll)M[i]); copy(E,E+10001,D); } for(int c=0;c<=1e4;c++) if(D[c]>=T) return !printf("%d\n",c); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2176 KB | Output is correct |
2 | Correct | 0 ms | 2176 KB | Output is correct |
3 | Correct | 0 ms | 2176 KB | Output is correct |
4 | Correct | 0 ms | 2176 KB | Output is correct |
5 | Correct | 0 ms | 2176 KB | Output is correct |
6 | Correct | 0 ms | 2176 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2176 KB | Output is correct |
2 | Correct | 0 ms | 2176 KB | Output is correct |
3 | Correct | 0 ms | 2176 KB | Output is correct |
4 | Correct | 0 ms | 2176 KB | Output is correct |
5 | Correct | 0 ms | 2176 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2176 KB | Output is correct |
2 | Correct | 0 ms | 2176 KB | Output is correct |
3 | Correct | 0 ms | 2176 KB | Output is correct |
4 | Correct | 0 ms | 2176 KB | Output is correct |
5 | Correct | 0 ms | 2176 KB | Output is correct |
6 | Correct | 0 ms | 2176 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2176 KB | Output is correct |
2 | Correct | 0 ms | 2176 KB | Output is correct |
3 | Correct | 0 ms | 2176 KB | Output is correct |
4 | Correct | 0 ms | 2176 KB | Output is correct |
5 | Correct | 0 ms | 2176 KB | Output is correct |
6 | Correct | 0 ms | 2176 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2176 KB | Output is correct |
2 | Correct | 0 ms | 2176 KB | Output is correct |
3 | Correct | 0 ms | 2176 KB | Output is correct |
4 | Correct | 0 ms | 2176 KB | Output is correct |
5 | Correct | 0 ms | 2176 KB | Output is correct |
6 | Correct | 0 ms | 2176 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2176 KB | Output is correct |
2 | Correct | 0 ms | 2176 KB | Output is correct |
3 | Correct | 0 ms | 2176 KB | Output is correct |
4 | Correct | 3 ms | 2176 KB | Output is correct |
5 | Correct | 0 ms | 2176 KB | Output is correct |
6 | Correct | 0 ms | 2176 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2176 KB | Output is correct |
2 | Correct | 0 ms | 2176 KB | Output is correct |
3 | Correct | 0 ms | 2176 KB | Output is correct |
4 | Correct | 0 ms | 2176 KB | Output is correct |