11273 | 2024-08-03 17:29:35 | proba | Legnagyobb téglalap | python3 | Time limit exceeded 55/100 | 1.1s | 15036 KiB |
#N = 8; sor = list(map(int, '1 3 3 7 6 7 9 6'.split(' ')))
N = int(input()); sor = list(map(int, input().split(' ')))
sor.sort(reverse=True)
s, db = [], []
for i in sor:
if i not in s and sor.count(i)>1:
s += [i]
db += [sor.count(i)]
#print(s, db)
if len(db) == 0 or (len(db) == 1 and db[0] < 4):
print(0)
elif db[0] > 3:
print(s[0]**2)
else:
print(s[0]*s[1])
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 3044 KiB | ||||
2 | Accepted | 17ms | 3044 KiB | ||||
3 | Accepted | 17ms | 3044 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 17ms | 3096 KiB | ||||
5 | Accepted | 18ms | 3092 KiB | ||||
6 | Accepted | 17ms | 3064 KiB | ||||
7 | Accepted | 17ms | 2888 KiB | ||||
8 | Accepted | 17ms | 2916 KiB | ||||
subtask3 | 10/10 | ||||||
9 | Accepted | 17ms | 2964 KiB | ||||
10 | Accepted | 17ms | 2916 KiB | ||||
11 | Accepted | 18ms | 3064 KiB | ||||
12 | Accepted | 18ms | 2916 KiB | ||||
13 | Accepted | 45ms | 4840 KiB | ||||
14 | Accepted | 54ms | 4904 KiB | ||||
subtask4 | 15/15 | ||||||
15 | Accepted | 18ms | 2960 KiB | ||||
16 | Accepted | 17ms | 2996 KiB | ||||
17 | Accepted | 18ms | 3300 KiB | ||||
18 | Accepted | 17ms | 3064 KiB | ||||
19 | Accepted | 17ms | 2916 KiB | ||||
20 | Accepted | 17ms | 3044 KiB | ||||
21 | Accepted | 18ms | 2916 KiB | ||||
22 | Accepted | 17ms | 3044 KiB | ||||
23 | Accepted | 18ms | 3068 KiB | ||||
24 | Accepted | 17ms | 2928 KiB | ||||
subtask5 | 20/20 | ||||||
25 | Accepted | 63ms | 3172 KiB | ||||
26 | Accepted | 523ms | 3736 KiB | ||||
27 | Accepted | 523ms | 3556 KiB | ||||
28 | Accepted | 523ms | 3728 KiB | ||||
29 | Accepted | 523ms | 3556 KiB | ||||
30 | Accepted | 523ms | 3560 KiB | ||||
31 | Accepted | 523ms | 3848 KiB | ||||
32 | Accepted | 245ms | 3556 KiB | ||||
subtask6 | 0/15 | ||||||
33 | Accepted | 18ms | 2832 KiB | ||||
34 | Time limit exceeded | 1.093s | 14668 KiB | ||||
35 | Time limit exceeded | 1.095s | 14700 KiB | ||||
36 | Time limit exceeded | 1.093s | 14840 KiB | ||||
37 | Time limit exceeded | 1.098s | 14700 KiB | ||||
38 | Time limit exceeded | 1.097s | 14704 KiB | ||||
39 | Time limit exceeded | 1.095s | 14844 KiB | ||||
40 | Accepted | 23ms | 4344 KiB | ||||
41 | Time limit exceeded | 1.1s | 14624 KiB | ||||
subtask7 | 0/30 | ||||||
42 | Time limit exceeded | 1.093s | 14308 KiB | ||||
43 | Time limit exceeded | 1.093s | 14740 KiB | ||||
44 | Time limit exceeded | 1.093s | 14960 KiB | ||||
45 | Time limit exceeded | 1.093s | 14856 KiB | ||||
46 | Time limit exceeded | 1.095s | 14772 KiB | ||||
47 | Time limit exceeded | 1.095s | 14616 KiB | ||||
48 | Time limit exceeded | 1.095s | 14764 KiB | ||||
49 | Time limit exceeded | 1.097s | 14700 KiB | ||||
50 | Time limit exceeded | 1.097s | 14624 KiB | ||||
51 | Time limit exceeded | 1.098s | 15036 KiB |