답안 #651015

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
651015 2022-10-16T13:11:55 Z dooompy Kitchen (BOI19_kitchen) Python 3
컴파일 오류
0 ms 0 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

File "kitchen.py", line 6
    supply = array.array(’i’, [−N∗N for i in range(N∗N+1)])
                         ^
SyntaxError: invalid character '’' (U+2019)