Submission #3581815


Source Code Expand

import collections
N = int(input())
A = list(map(int,input().split()))
c = collections.Counter(A)
c_l = c.most_common()
l = []
for e in c_l:
    if e[1] >= 4:
        l.append(e[0])
        l.append(e[0])
    elif e[1] >= 2:
        l.append(e[0])
l.sort()
if len(l) >= 2:
    print(l[-1]*l[-2])
else:
    print(0)

Submission Info

Submission Time
Task C - Make a Rectangle
User pynomi
Language Python (3.4.3)
Score 300
Code Size 330 Byte
Status AC
Exec Time 105 ms
Memory 21668 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 15
Set Name Test Cases
Sample sample1.txt, sample2.txt, sample3.txt
All sample1.txt, sample2.txt, sample3.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
1.txt AC 105 ms 16808 KB
2.txt AC 36 ms 8876 KB
3.txt AC 105 ms 21668 KB
4.txt AC 91 ms 14508 KB
5.txt AC 36 ms 8972 KB
6.txt AC 52 ms 14628 KB
7.txt AC 52 ms 14628 KB
8.txt AC 33 ms 7752 KB
9.txt AC 60 ms 12336 KB
sample1.txt AC 20 ms 3316 KB
sample2.txt AC 20 ms 3316 KB
sample3.txt AC 20 ms 3316 KB