제출 #815753

#제출 시각아이디문제언어결과실행 시간메모리
815753beaconmcGarden (JOI23_garden)C++14
컴파일 에러
0 ms0 KiB
from itertools import combinations n,m,d = map(int, input().split()) a = [] b = [] for i in range(n): a.append(list(map(int, input().split()))) for i in range(m): b.append(list(map(int, input().split()))) X = [] Y = [] for i in a: X.append(i[0]) Y.append(i[1]) ans = 1000000000 for i in range(2**(len(b))): x = list(X) y = list(Y) for j in range(len(b)): if (i&(2**j)): x.append(b[j][0]) else: y.append(b[j][1]) x.sort() y.sort() xx = 1000000000 yy = 1000000000 for i in range(len(x)-1): xx = min(xx, d-(x[i+1]-x[i])+1) xx = min(xx, x[-1]-x[0]+1) for i in range(len(y)-1): yy = min(yy, d-(y[i+1]-y[i])+1) yy = min(yy, y[-1]-y[0]+1) ans = min(ans, xx*yy) print(ans)

컴파일 시 표준 에러 (stderr) 메시지

garden.cpp:1:1: error: 'from' does not name a type
    1 | from itertools import combinations
      | ^~~~