11185 | 2024-07-15 18:49:37 | proba | Legnagyobb téglalap | python3 | Wrong answer 0/100 | 172ms | 14844 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 and h > 3:
if sor[i] == sor[i+1] and sor[i] == sor[i+2] and sor[i] == sor[i+3]:
print(sor[i]*sor[i])
ok = False
break
if sor[i] == sor[i+1] and a == None:
a = sor[i]
i += 1
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 | 3116 KiB | ||||
2 | Accepted | 18ms | 3044 KiB | ||||
3 | Accepted | 17ms | 3044 KiB | ||||
subtask2 | 0/10 | ||||||
4 | Accepted | 18ms | 3188 KiB | ||||
5 | Wrong answer | 17ms | 3088 KiB | ||||
6 | Accepted | 17ms | 3220 KiB | ||||
7 | Accepted | 17ms | 3100 KiB | ||||
8 | Accepted | 17ms | 2936 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Wrong answer | 18ms | 3084 KiB | ||||
10 | Wrong answer | 17ms | 3220 KiB | ||||
11 | Accepted | 17ms | 3044 KiB | ||||
12 | Wrong answer | 18ms | 2892 KiB | ||||
13 | Accepted | 41ms | 5024 KiB | ||||
14 | Accepted | 48ms | 4896 KiB | ||||
subtask4 | 0/15 | ||||||
15 | Accepted | 17ms | 3044 KiB | ||||
16 | Accepted | 18ms | 3048 KiB | ||||
17 | Accepted | 17ms | 3044 KiB | ||||
18 | Accepted | 18ms | 3200 KiB | ||||
19 | Accepted | 18ms | 3044 KiB | ||||
20 | Accepted | 17ms | 3044 KiB | ||||
21 | Accepted | 17ms | 3316 KiB | ||||
22 | Accepted | 17ms | 3088 KiB | ||||
23 | Accepted | 17ms | 3044 KiB | ||||
24 | Wrong answer | 17ms | 2916 KiB | ||||
subtask5 | 0/20 | ||||||
25 | Wrong answer | 18ms | 3436 KiB | ||||
26 | Accepted | 20ms | 3560 KiB | ||||
27 | Accepted | 25ms | 3576 KiB | ||||
28 | Accepted | 23ms | 3580 KiB | ||||
29 | Accepted | 25ms | 3684 KiB | ||||
30 | Accepted | 23ms | 3556 KiB | ||||
31 | Accepted | 21ms | 3556 KiB | ||||
32 | Wrong answer | 19ms | 3556 KiB | ||||
subtask6 | 0/15 | ||||||
33 | Accepted | 17ms | 3044 KiB | ||||
34 | Accepted | 57ms | 14844 KiB | ||||
35 | Accepted | 136ms | 14740 KiB | ||||
36 | Accepted | 135ms | 14604 KiB | ||||
37 | Accepted | 97ms | 14728 KiB | ||||
38 | Accepted | 71ms | 14716 KiB | ||||
39 | Accepted | 57ms | 14700 KiB | ||||
40 | Accepted | 20ms | 4196 KiB | ||||
41 | Wrong answer | 57ms | 14496 KiB | ||||
subtask7 | 0/30 | ||||||
42 | Accepted | 82ms | 14236 KiB | ||||
43 | Accepted | 82ms | 14840 KiB | ||||
44 | Accepted | 160ms | 14672 KiB | ||||
45 | Accepted | 98ms | 14832 KiB | ||||
46 | Accepted | 96ms | 14700 KiB | ||||
47 | Accepted | 104ms | 14764 KiB | ||||
48 | Accepted | 83ms | 14700 KiB | ||||
49 | Accepted | 172ms | 14696 KiB | ||||
50 | Wrong answer | 86ms | 14644 KiB | ||||
51 | Wrong answer | 82ms | 14540 KiB |