제출 #924029

#제출 시각아이디문제언어결과실행 시간메모리
924029DanusanBest Place (NOI17_bestplace)Cpython 3
0 / 100
12 ms2908 KiB
import math def main(): num=int(input()) x=[] y=[] xval={} yval={} for i in range(num): xn = int(input()) yn =int(input()) x.append(xn) y.append(yn) for i in range(num): for j in range(i+1,num): xval[i]=xval.get(i,0) + abs(x[i]-x[j]) xval[j]=xval.get(j,0) + abs(x[i]-x[j]) for i in range(num): for j in range(i+1,num): yval[i]= yval.get(i,0) + abs(y[i]-y[j]) yval[j]= yval.get(j,0) + abs(y[i]-y[j]) print [min(xval, key=xval.get),min(yval, key=yval.get)] return 0
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...