11173 | 2024-07-08 12:40:56 | proba | Legnagyobb téglalap | python3 | Wrong answer 0/100 | 1.097s | 17976 KiB |
# rudak
N = input()
rudak =[int(i) for i in input().split(' ')]
H = set()
for i in rudak:
H.add(i)
D = []
for i in list(H):
if rudak.count(i) > 1:
D += [[i, rudak.count(i)]]
sor = sorted(D, key = lambda x: x[1])
if len(D)==0 or (len(D) == 1 and D[0][1] < 4):
print(0)
elif len(D) == 1 and D[0][1] >3:
print(D[0][1]**2)
elif D[-1][1] > 3:
print(D[-1][0]**2)
else:
print(D[-1][0]*D[-2][0])
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 17ms | 3044 KiB | ||||
2 | Accepted | 18ms | 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 | 3196 KiB | ||||
7 | Accepted | 17ms | 3196 KiB | ||||
8 | Accepted | 17ms | 3044 KiB | ||||
subtask3 | 0/10 | ||||||
9 | Accepted | 18ms | 3044 KiB | ||||
10 | Accepted | 17ms | 3044 KiB | ||||
11 | Wrong answer | 17ms | 3104 KiB | ||||
12 | Accepted | 17ms | 3104 KiB | ||||
13 | Wrong answer | 52ms | 5064 KiB | ||||
14 | Accepted | 59ms | 5012 KiB | ||||
subtask4 | 0/15 | ||||||
15 | Accepted | 17ms | 3068 KiB | ||||
16 | Wrong answer | 18ms | 2992 KiB | ||||
17 | Accepted | 17ms | 2952 KiB | ||||
18 | Accepted | 17ms | 3044 KiB | ||||
19 | Accepted | 17ms | 3044 KiB | ||||
20 | Wrong answer | 17ms | 3080 KiB | ||||
21 | Accepted | 17ms | 3192 KiB | ||||
22 | Accepted | 18ms | 3044 KiB | ||||
23 | Accepted | 17ms | 2960 KiB | ||||
24 | Accepted | 17ms | 2916 KiB | ||||
subtask5 | 0/20 | ||||||
25 | Accepted | 57ms | 3300 KiB | ||||
26 | Wrong answer | 524ms | 4324 KiB | ||||
27 | Accepted | 523ms | 4476 KiB | ||||
28 | Wrong answer | 523ms | 4232 KiB | ||||
29 | Accepted | 523ms | 4324 KiB | ||||
30 | Accepted | 523ms | 4328 KiB | ||||
31 | Wrong answer | 523ms | 4196 KiB | ||||
32 | Accepted | 216ms | 3556 KiB | ||||
subtask6 | 0/15 | ||||||
33 | Accepted | 17ms | 3104 KiB | ||||
34 | Time limit exceeded | 1.093s | 15488 KiB | ||||
35 | Time limit exceeded | 1.088s | 16776 KiB | ||||
36 | Time limit exceeded | 1.088s | 16808 KiB | ||||
37 | Time limit exceeded | 1.097s | 16668 KiB | ||||
38 | Time limit exceeded | 1.097s | 16676 KiB | ||||
39 | Time limit exceeded | 1.095s | 16736 KiB | ||||
40 | Wrong answer | 24ms | 4324 KiB | ||||
41 | Time limit exceeded | 1.097s | 15264 KiB | ||||
subtask7 | 0/30 | ||||||
42 | Time limit exceeded | 1.095s | 14744 KiB | ||||
43 | Time limit exceeded | 1.088s | 16616 KiB | ||||
44 | Time limit exceeded | 1.087s | 16728 KiB | ||||
45 | Time limit exceeded | 1.085s | 16852 KiB | ||||
46 | Time limit exceeded | 1.09s | 16928 KiB | ||||
47 | Time limit exceeded | 1.085s | 16812 KiB | ||||
48 | Time limit exceeded | 1.085s | 17700 KiB | ||||
49 | Time limit exceeded | 1.093s | 17976 KiB | ||||
50 | Time limit exceeded | 1.095s | 15260 KiB | ||||
51 | Time limit exceeded | 1.095s | 15312 KiB |