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])
return [min(xval, key=xval.get),min(yval, key=yval.get)]
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
2908 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
12 ms |
3208 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
2908 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
2908 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
2908 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
11 ms |
2908 KB |
Unexpected end of file - int64 expected |
2 |
Halted |
0 ms |
0 KB |
- |