Submission #19369789


Source Code Expand

Copy
import sys
input = sys.stdin.buffer.readline

N = int(input())
A = list(map(int, input().rstrip().split()))

m = max(A)
m2 = -1
for a in A:
    m2 = max(m2, min(a, m-a))

m2 = m2 if m2 in A else m-m2

print(m, m2)

Submission Info

Submission Time
Task D - Binomial Coefficients
User wattaihei
Language Python (3.8.2)
Score 400
Code Size 226 Byte
Status AC
Exec Time 93 ms
Memory 18888 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 2
AC × 17
Set Name Test Cases
Sample sample1.txt, sample2.txt
All even0.txt, even1.txt, float.txt, odd0.txt, odd1.txt, rnd_0.txt, rnd_1.txt, rnd_2.txt, rnd_3.txt, rnd_4.txt, rnd_5.txt, rnd_6.txt, rnd_7.txt, rnd_8.txt, rnd_9.txt, sample1.txt, sample2.txt
Case Name Status Exec Time Memory
even0.txt AC 93 ms 18888 KB
even1.txt AC 85 ms 18728 KB
float.txt AC 84 ms 18192 KB
odd0.txt AC 83 ms 18824 KB
odd1.txt AC 85 ms 18736 KB
rnd_0.txt AC 80 ms 17404 KB
rnd_1.txt AC 72 ms 16652 KB
rnd_2.txt AC 82 ms 17080 KB
rnd_3.txt AC 74 ms 16452 KB
rnd_4.txt AC 66 ms 15388 KB
rnd_5.txt AC 86 ms 18144 KB
rnd_6.txt AC 69 ms 16032 KB
rnd_7.txt AC 72 ms 15880 KB
rnd_8.txt AC 80 ms 17036 KB
rnd_9.txt AC 77 ms 16736 KB
sample1.txt AC 23 ms 8820 KB
sample2.txt AC 17 ms 9032 KB