Submission #924032

# Submission time Handle Problem Language Result Execution time Memory
924032 2024-02-08T10:07:56 Z Danusan Best Place (NOI17_bestplace) Python 3
0 / 100
12 ms 2968 KB
import math

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[x[i]]=xval.get(x[i],0) + abs(x[i]-x[j])
        xval[x[j]]=xval.get(x[j],0) + abs(x[i]-x[j])
for i in range(num):
    for j in range(i+1,num):
        yval[y[i]]= yval.get(y[i],0) + abs(y[i]-y[j])
        yval[y[j]]= yval.get(y[j],0) + abs(y[i]-y[j])
print(x)
print(y)
print(xval)
print(yval)
ans=[]
ans.append(min(xval, key=xval.get))
ans.append(min(yval, key=yval.get))
print(ans)
# Verdict Execution time Memory Grader output
1 Runtime error 12 ms 2908 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 11 ms 2968 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 11 ms 2908 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 11 ms 2908 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 11 ms 2908 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 11 ms 2908 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -