Submission #3454597


Source Code Expand

N = int(input())
a = list(map(int, input().split()))

cnt = [0]*(int(1e9)+1)
for ai in a:
    cnt[ai] += 1

ans = 0
condi = 0
for ai in a[::-1]:
    if cnt[ai] >= 4:
        ans = max(ans, ai*ai)
        break
    else:
        if condi==0:
            condi = ai
        else:
            ans = condi * ai
            break
            
print(ans)

Submission Info

Submission Time
Task C - Make a Rectangle
User odanny
Language Python (3.4.3)
Score 0
Code Size 368 Byte
Status RE
Exec Time 42 ms
Memory 14252 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
RE × 3
RE × 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 RE 41 ms 14252 KB
2.txt RE 30 ms 8488 KB
3.txt RE 41 ms 14252 KB
4.txt RE 42 ms 14224 KB
5.txt RE 29 ms 8588 KB
6.txt RE 42 ms 14080 KB
7.txt RE 42 ms 14084 KB
8.txt RE 27 ms 7372 KB
9.txt RE 29 ms 8508 KB
sample1.txt RE 17 ms 3064 KB
sample2.txt RE 17 ms 3064 KB
sample3.txt RE 17 ms 3060 KB