This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
def median(a):
n = len(a);a = sorted(a)
if len(a)%2 == 0:return (a[n//2]+a[n//2-1])//2
else:return a[n//2]
n = int(input())
xes = [];yes = []
for _ in range(n):
x, y = map(int, input().split())
xes.append(x);yes.append(y)
print(median(xes), median(yes))
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |