Submission #924023

#TimeUsernameProblemLanguageResultExecution timeMemory
924023DanusanBest Place (NOI17_bestplace)Cpython 3
0 / 100
10 ms2908 KiB
import math def main(): num=input() x=[] y=[] xval={} yval={} for i in range(num): x.append(input()) y.append(input()) for i in range(num): for j in range(i+1,num): xval[i]=xval.get(0,i) + abs(x[i]-x[j]) xval[j]=xval.get(0,j) + abs(x[i]-x[j]) for i in range(num): for j in range(i+1,num): yval[i]= yval.get(0,i) + abs(y[i]-y[j]) yval[j]= yval.get(0,j) + 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...