답안 #311325

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
311325 2020-10-09T23:16:29 Z VROOM_VARUN Kitchen (BOI19_kitchen) C++14
컴파일 오류
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

kitchen.cpp:6:28: error: stray '\342' in program
    6 | supply = array.array('i', [−N∗N for i in range(N∗N+1)])
      |                            ^
kitchen.cpp:6:29: error: stray '\210' in program
    6 | supply = array.array('i', [−N∗N for i in range(N∗N+1)])
      |                             ^
kitchen.cpp:6:30: error: stray '\222' in program
    6 | supply = array.array('i', [−N∗N for i in range(N∗N+1)])
      |                              ^
kitchen.cpp:6:32: error: stray '\342' in program
    6 | supply = array.array('i', [−N∗N for i in range(N∗N+1)])
      |                                ^
kitchen.cpp:6:33: error: stray '\210' in program
    6 | supply = array.array('i', [−N∗N for i in range(N∗N+1)])
      |                                 ^
kitchen.cpp:6:34: error: stray '\227' in program
    6 | supply = array.array('i', [−N∗N for i in range(N∗N+1)])
      |                                  ^
kitchen.cpp:6:53: error: stray '\342' in program
    6 | supply = array.array('i', [−N∗N for i in range(N∗N+1)])
      |                                                     ^
kitchen.cpp:6:54: error: stray '\210' in program
    6 | supply = array.array('i', [−N∗N for i in range(N∗N+1)])
      |                                                      ^
kitchen.cpp:6:55: error: stray '\227' in program
    6 | supply = array.array('i', [−N∗N for i in range(N∗N+1)])
      |                                                       ^
kitchen.cpp:10:10: warning: missing terminating ' character
   10 |   return 'Impossible’
      |          ^
kitchen.cpp:10:10: error: missing terminating ' character
   10 |   return 'Impossible’
      |          ^~~~~~~~~~~~~~
kitchen.cpp:14:23: error: stray '\342' in program
   14 |   for i in range(bsum,−1,−1):
      |                       ^
kitchen.cpp:14:24: error: stray '\210' in program
   14 |   for i in range(bsum,−1,−1):
      |                        ^
kitchen.cpp:14:25: error: stray '\222' in program
   14 |   for i in range(bsum,−1,−1):
      |                         ^
kitchen.cpp:14:28: error: stray '\342' in program
   14 |   for i in range(bsum,−1,−1):
      |                            ^
kitchen.cpp:14:29: error: stray '\210' in program
   14 |   for i in range(bsum,−1,−1):
      |                             ^
kitchen.cpp:14:30: error: stray '\222' in program
   14 |   for i in range(bsum,−1,−1):
      |                              ^
kitchen.cpp:16:26: error: stray '\342' in program
   16 |   for i in range(sum(a),N∗N+1):
      |                          ^
kitchen.cpp:16:27: error: stray '\210' in program
   16 |   for i in range(sum(a),N∗N+1):
      |                           ^
kitchen.cpp:16:28: error: stray '\227' in program
   16 |   for i in range(sum(a),N∗N+1):
      |                            ^
kitchen.cpp:17:21: error: stray '\342' in program
   17 |    if(supply[i] >= n∗k):
      |                     ^
kitchen.cpp:17:22: error: stray '\210' in program
   17 |    if(supply[i] >= n∗k):
      |                      ^
kitchen.cpp:17:23: error: stray '\227' in program
   17 |    if(supply[i] >= n∗k):
      |                       ^
kitchen.cpp:18:13: error: stray '\342' in program
   18 |     return i−sum(a)
      |             ^
kitchen.cpp:18:14: error: stray '\210' in program
   18 |     return i−sum(a)
      |              ^
kitchen.cpp:18:15: error: stray '\222' in program
   18 |     return i−sum(a)
      |               ^
kitchen.cpp:19:9: warning: missing terminating ' character
   19 |  return 'Impossible’
      |         ^
kitchen.cpp:19:9: error: missing terminating ' character
   19 |  return 'Impossible’
      |         ^~~~~~~~~~~~~~
kitchen.cpp:1:1: error: 'import' does not name a type
    1 | import array
      | ^~~~~~
kitchen.cpp:8:1: error: 'def' does not name a type
    8 | def solve():
      | ^~~