11182 | 2024-07-15 18:42:39 | proba | Legnagyobb téglalap | python3 | Wrong answer 0/100 | 173ms | 14864 KiB |
N = input()
sor = [int(i) for i in input().split(' ')]
sor.sort(reverse=True)
h = len(sor)
i, a, b, ok = 0, None, None, True
while i < h-3:
if sor[i] == sor[i+1] and sor[i+1] == sor[i+2] and sor[i+2] == sor[i+3]:
print(sor[i]**2)
ok = False
break
elif sor[i] == sor[i+1] and a == None:
a = sor[i]
elif 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 | Accepted | 18ms | 3088 KiB | ||||
2 | Accepted | 17ms | 3104 KiB | ||||
3 | Accepted | 17ms | 3044 KiB | ||||
subtask2 | 0/10 | ||||||
4 | Accepted | 17ms | 3044 KiB | ||||
5 | Wrong answer | 17ms | 3044 KiB | ||||
6 | Accepted | 18ms | 2980 KiB | ||||
7 | Accepted | 17ms | 3192 KiB | ||||
8 | Accepted | 17ms | 3064 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Wrong answer | 17ms | 3044 KiB | ||||
10 | Wrong answer | 18ms | 3044 KiB | ||||
11 | Accepted | 17ms | 3088 KiB | ||||
12 | Wrong answer | 17ms | 2972 KiB | ||||
13 | Accepted | 41ms | 4752 KiB | ||||
14 | Accepted | 46ms | 5028 KiB | ||||
subtask4 | 0/15 | ||||||
15 | Accepted | 17ms | 2964 KiB | ||||
16 | Accepted | 18ms | 3044 KiB | ||||
17 | Accepted | 17ms | 3220 KiB | ||||
18 | Accepted | 17ms | 3032 KiB | ||||
19 | Wrong answer | 17ms | 3088 KiB | ||||
20 | Accepted | 17ms | 2972 KiB | ||||
21 | Accepted | 17ms | 3192 KiB | ||||
22 | Wrong answer | 17ms | 3044 KiB | ||||
23 | Accepted | 17ms | 2916 KiB | ||||
24 | Wrong answer | 17ms | 2936 KiB | ||||
subtask5 | 0/20 | ||||||
25 | Wrong answer | 19ms | 3216 KiB | ||||
26 | Accepted | 21ms | 3712 KiB | ||||
27 | Wrong answer | 20ms | 3652 KiB | ||||
28 | Accepted | 24ms | 3552 KiB | ||||
29 | Accepted | 24ms | 3556 KiB | ||||
30 | Accepted | 21ms | 3560 KiB | ||||
31 | Accepted | 21ms | 3560 KiB | ||||
32 | Wrong answer | 20ms | 3704 KiB | ||||
subtask6 | 0/15 | ||||||
33 | Wrong answer | 17ms | 3088 KiB | ||||
34 | Accepted | 61ms | 14728 KiB | ||||
35 | Accepted | 136ms | 14740 KiB | ||||
36 | Accepted | 130ms | 14696 KiB | ||||
37 | Accepted | 101ms | 14696 KiB | ||||
38 | Accepted | 71ms | 14744 KiB | ||||
39 | Accepted | 59ms | 14824 KiB | ||||
40 | Accepted | 21ms | 4196 KiB | ||||
41 | Wrong answer | 61ms | 14624 KiB | ||||
subtask7 | 0/30 | ||||||
42 | Accepted | 86ms | 14236 KiB | ||||
43 | Accepted | 89ms | 14704 KiB | ||||
44 | Accepted | 172ms | 14700 KiB | ||||
45 | Accepted | 96ms | 14700 KiB | ||||
46 | Wrong answer | 89ms | 14852 KiB | ||||
47 | Accepted | 97ms | 14700 KiB | ||||
48 | Wrong answer | 90ms | 14864 KiB | ||||
49 | Accepted | 173ms | 14732 KiB | ||||
50 | Wrong answer | 82ms | 14624 KiB | ||||
51 | Wrong answer | 83ms | 14652 KiB |