# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
651014 | 2022-10-16T13:11:34 Z | dooompy | Kitchen (BOI19_kitchen) | PyPy 3 | 65 ms | 20160 KB |
import array N = 300 n,m,k = [int(x) for x in input().split()] a = [int(x) for x in input().split()] b = [int(x) for x in input().split()] supply = array.array(’i’, [−N∗N for i in range(N∗N+1)]) supply[0] = 0; def solve(): if(min(a) < k): return ’Impossible’ bsum = 0 for x in b: bsum += x for i in range(bsum,−1,−1): supply[i+x] = max(supply[i+x],supply[i]+min(x,n)) for i in range(sum(a),N∗N+1): if(supply[i] >= n∗k): return i−sum(a) return ’Impossible’ print(solve())
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 65 ms | 20080 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 65 ms | 20080 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 64 ms | 20160 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 65 ms | 20056 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 65 ms | 20080 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |