11274 | 2024-08-03 17:42:46 | proba | Legnagyobb téglalap | python3 | Wrong answer 0/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)
#print(sor)
s, db = [], []
i = 0
while i < len(sor) and len(db) < 3:
if sor[i] not in s and sor.count(sor[i])>1:
s += [sor[i]]
db += [sor.count(i)]
i += 1
#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 | 3064 KiB | ||||
3 | Wrong answer | 17ms | 3120 KiB | ||||
subtask2 | 0/10 | ||||||
4 | Wrong answer | 18ms | 2968 KiB | ||||
5 | Accepted | 17ms | 2844 KiB | ||||
6 | Accepted | 17ms | 2976 KiB | ||||
7 | Accepted | 17ms | 2916 KiB | ||||
8 | Accepted | 17ms | 3064 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Accepted | 17ms | 3044 KiB | ||||
10 | Accepted | 17ms | 3044 KiB | ||||
11 | Accepted | 17ms | 2972 KiB | ||||
12 | Accepted | 17ms | 3192 KiB | ||||
13 | Wrong answer | 82ms | 4880 KiB | ||||
14 | Wrong answer | 92ms | 4880 KiB | ||||
subtask4 | 0/15 | ||||||
15 | Accepted | 18ms | 3044 KiB | ||||
16 | Accepted | 17ms | 2972 KiB | ||||
17 | Accepted | 18ms | 3188 KiB | ||||
18 | Accepted | 17ms | 3044 KiB | ||||
19 | Accepted | 17ms | 2844 KiB | ||||
20 | Wrong answer | 17ms | 3088 KiB | ||||
21 | Accepted | 17ms | 2916 KiB | ||||
22 | Accepted | 17ms | 3064 KiB | ||||
23 | Wrong answer | 17ms | 2916 KiB | ||||
24 | Wrong answer | 17ms | 3044 KiB | ||||
subtask5 | 0/20 | ||||||
25 | Accepted | 19ms | 3044 KiB | ||||
26 | Accepted | 85ms | 3688 KiB | ||||
27 | Accepted | 524ms | 3624 KiB | ||||
28 | Wrong answer | 524ms | 3696 KiB | ||||
29 | Accepted | 524ms | 3556 KiB | ||||
30 | Wrong answer | 526ms | 3556 KiB | ||||
31 | Accepted | 317ms | 3556 KiB | ||||
32 | Accepted | 19ms | 3368 KiB | ||||
subtask6 | 0/15 | ||||||
33 | Accepted | 17ms | 3044 KiB | ||||
34 | Accepted | 71ms | 14816 KiB | ||||
35 | Time limit exceeded | 1.093s | 14844 KiB | ||||
36 | Time limit exceeded | 1.095s | 14876 KiB | ||||
37 | Time limit exceeded | 1.1s | 14716 KiB | ||||
38 | Time limit exceeded | 1.098s | 14704 KiB | ||||
39 | Time limit exceeded | 1.098s | 14704 KiB | ||||
40 | Wrong answer | 27ms | 4200 KiB | ||||
41 | Accepted | 64ms | 14624 KiB | ||||
subtask7 | 0/30 | ||||||
42 | Wrong answer | 85ms | 14272 KiB | ||||
43 | Accepted | 187ms | 14704 KiB | ||||
44 | Time limit exceeded | 1.095s | 14704 KiB | ||||
45 | Time limit exceeded | 1.092s | 14844 KiB | ||||
46 | Time limit exceeded | 1.098s | 14704 KiB | ||||
47 | Time limit exceeded | 1.095s | 14852 KiB | ||||
48 | Time limit exceeded | 1.098s | 14700 KiB | ||||
49 | Time limit exceeded | 1.098s | 14704 KiB | ||||
50 | Accepted | 92ms | 14624 KiB | ||||
51 | Accepted | 93ms | 15036 KiB |