11188 | 2024-07-15 20:39:38 | proba | Legnagyobb téglalap | python3 | Wrong answer 0/100 | 1.1s | 14932 KiB |
N = input()
sor = [int(i) for i in input().strip().split(' ')]
sor.sort(reverse=True)
h = len(sor)
i, a, b, ok = 0, None, None, True
while i < h-3 and h > 3:
if sor.count(sor[i]) > 3:
print(sor[i]**2)
ok = False
if sor[i] == sor[i+1] and a == None:
a, j = sor[i], 1
while i+j < h-3 and sor[i+j] == a:
j += 1
i += j+1
#print(i, sor[i])
if sor[i] == sor[i+1] and b == None:
print(a*sor[i])
ok = False
break
i += 1
if ok:
print(0)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 17ms | 3044 KiB | ||||
2 | Accepted | 17ms | 3044 KiB | ||||
3 | Wrong answer | 17ms | 3044 KiB | ||||
subtask2 | 0/10 | ||||||
4 | Wrong answer | 17ms | 3044 KiB | ||||
5 | Accepted | 17ms | 3044 KiB | ||||
6 | Accepted | 17ms | 3044 KiB | ||||
7 | Accepted | 17ms | 3088 KiB | ||||
8 | Accepted | 17ms | 3044 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Accepted | 17ms | 3192 KiB | ||||
10 | Accepted | 17ms | 3044 KiB | ||||
11 | Wrong answer | 17ms | 3044 KiB | ||||
12 | Accepted | 17ms | 3044 KiB | ||||
13 | Wrong answer | 82ms | 4808 KiB | ||||
14 | Wrong answer | 70ms | 4924 KiB | ||||
subtask4 | 0/15 | ||||||
15 | Wrong answer | 18ms | 2952 KiB | ||||
16 | Wrong answer | 18ms | 3192 KiB | ||||
17 | Accepted | 18ms | 3084 KiB | ||||
18 | Accepted | 18ms | 2916 KiB | ||||
19 | Accepted | 18ms | 3044 KiB | ||||
20 | Accepted | 18ms | 3044 KiB | ||||
21 | Wrong answer | 17ms | 2876 KiB | ||||
22 | Wrong answer | 17ms | 3192 KiB | ||||
23 | Wrong answer | 17ms | 2992 KiB | ||||
24 | Accepted | 17ms | 2916 KiB | ||||
subtask5 | 0/20 | ||||||
25 | Accepted | 18ms | 3236 KiB | ||||
26 | Wrong answer | 526ms | 3496 KiB | ||||
27 | Accepted | 524ms | 3556 KiB | ||||
28 | Accepted | 524ms | 3656 KiB | ||||
29 | Wrong answer | 524ms | 3652 KiB | ||||
30 | Wrong answer | 523ms | 3560 KiB | ||||
31 | Wrong answer | 523ms | 3556 KiB | ||||
32 | Accepted | 19ms | 3556 KiB | ||||
subtask6 | 0/15 | ||||||
33 | Wrong answer | 17ms | 3044 KiB | ||||
34 | Time limit exceeded | 1.093s | 14932 KiB | ||||
35 | Time limit exceeded | 1.093s | 14700 KiB | ||||
36 | Time limit exceeded | 1.095s | 14700 KiB | ||||
37 | Time limit exceeded | 1.098s | 14848 KiB | ||||
38 | Time limit exceeded | 1.097s | 14736 KiB | ||||
39 | Time limit exceeded | 1.098s | 14700 KiB | ||||
40 | Wrong answer | 26ms | 4196 KiB | ||||
41 | Accepted | 61ms | 14624 KiB | ||||
subtask7 | 0/30 | ||||||
42 | Wrong answer | 83ms | 14384 KiB | ||||
43 | Time limit exceeded | 1.097s | 14700 KiB | ||||
44 | Time limit exceeded | 1.087s | 14732 KiB | ||||
45 | Time limit exceeded | 1.093s | 14704 KiB | ||||
46 | Time limit exceeded | 1.1s | 14700 KiB | ||||
47 | Time limit exceeded | 1.097s | 14824 KiB | ||||
48 | Time limit exceeded | 1.095s | 14828 KiB | ||||
49 | Time limit exceeded | 1.095s | 14848 KiB | ||||
50 | Accepted | 87ms | 14624 KiB | ||||
51 | Accepted | 87ms | 14524 KiB |