11179 | 2024-07-15 16:31:14 | proba | Legnagyobb téglalap | python3 | Wrong answer 0/100 | 1.1s | 14988 KiB |
N = int(input())
sor = [int(i) for i in input().split(' ')]
sor.sort(reverse=True)
i = 0
a, b = 0, 0
while i < len(sor):
if sor.count(sor[i]) > 3:
print(sor[i]**2)
break
elif sor.count(sor[i]) > 1:
if a == 0:
a = sor[i]
elif b == 0:
b = sor[i]
break
while i < len(sor) and sor[i] == a:
i += 1
else:
i += 1
if a*b != 0:
print(a*b)
else:
print(0)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 18ms | 3048 KiB | ||||
2 | Accepted | 17ms | 3044 KiB | ||||
3 | Wrong answer | 17ms | 2968 KiB | ||||
subtask2 | 0/10 | ||||||
4 | Wrong answer | 17ms | 2960 KiB | ||||
5 | Accepted | 18ms | 2976 KiB | ||||
6 | Accepted | 17ms | 3064 KiB | ||||
7 | Accepted | 17ms | 3044 KiB | ||||
8 | Accepted | 17ms | 2912 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Wrong answer | 17ms | 2916 KiB | ||||
10 | Wrong answer | 17ms | 3192 KiB | ||||
11 | Wrong answer | 17ms | 3172 KiB | ||||
12 | Wrong answer | 17ms | 3044 KiB | ||||
13 | Wrong answer | 41ms | 4880 KiB | ||||
14 | Wrong answer | 48ms | 5028 KiB | ||||
subtask4 | 0/15 | ||||||
15 | Accepted | 18ms | 3188 KiB | ||||
16 | Accepted | 17ms | 3096 KiB | ||||
17 | Accepted | 18ms | 3172 KiB | ||||
18 | Accepted | 18ms | 3044 KiB | ||||
19 | Accepted | 18ms | 2944 KiB | ||||
20 | Wrong answer | 18ms | 3172 KiB | ||||
21 | Accepted | 17ms | 3044 KiB | ||||
22 | Accepted | 17ms | 3192 KiB | ||||
23 | Wrong answer | 17ms | 2912 KiB | ||||
24 | Wrong answer | 17ms | 3192 KiB | ||||
subtask5 | 0/20 | ||||||
25 | Wrong answer | 19ms | 3448 KiB | ||||
26 | Accepted | 138ms | 3664 KiB | ||||
27 | Time limit exceeded | 1.026s | 3560 KiB | ||||
28 | Wrong answer | 495ms | 3556 KiB | ||||
29 | Time limit exceeded | 1.006s | 3556 KiB | ||||
30 | Wrong answer | 164ms | 3684 KiB | ||||
31 | Accepted | 456ms | 3556 KiB | ||||
32 | Wrong answer | 19ms | 3556 KiB | ||||
subtask6 | 0/15 | ||||||
33 | Accepted | 17ms | 3088 KiB | ||||
34 | Accepted | 76ms | 14672 KiB | ||||
35 | Time limit exceeded | 1.092s | 14700 KiB | ||||
36 | Time limit exceeded | 1.095s | 14840 KiB | ||||
37 | Time limit exceeded | 1.1s | 14572 KiB | ||||
38 | Time limit exceeded | 1.098s | 14700 KiB | ||||
39 | Time limit exceeded | 1.098s | 14732 KiB | ||||
40 | Wrong answer | 20ms | 4340 KiB | ||||
41 | Wrong answer | 71ms | 14624 KiB | ||||
subtask7 | 0/30 | ||||||
42 | Wrong answer | 79ms | 14168 KiB | ||||
43 | Accepted | 238ms | 14756 KiB | ||||
44 | Time limit exceeded | 1.09s | 14876 KiB | ||||
45 | Time limit exceeded | 1.09s | 14988 KiB | ||||
46 | Time limit exceeded | 1.098s | 14700 KiB | ||||
47 | Time limit exceeded | 1.098s | 14700 KiB | ||||
48 | Time limit exceeded | 1.098s | 14848 KiB | ||||
49 | Time limit exceeded | 1.098s | 14700 KiB | ||||
50 | Wrong answer | 92ms | 14624 KiB | ||||
51 | Wrong answer | 87ms | 14520 KiB |