162432025-04-15 14:07:47MangoÉrdekes túra (70 pont)python3Runtime error 12/7083ms15188 KiB
d = int(input())
sz = [int(i) for i in input().split()]
a = 0
zs = []
s = []

for i in range(d):
    if len(zs) == 0:
        zs.append(sz[i])
    else:
        if zs[-1] == sz[i]:
            if len(zs) > 1:
                s.append(zs)
            zs = [sz[i]]
        else:
            zs.append(sz[i])

if len(zs) > 1:
    s.append(sz[i])



print(len(s))
print(max([len(a) for a in s]))
SubtaskSumTestVerdictTimeMemory
base12/70
1Accepted0/016ms3128 KiB
2Runtime error0/079ms13364 KiB
3Runtime error0/316ms3332 KiB
4Runtime error0/316ms3080 KiB
5Accepted3/317ms2916 KiB
6Accepted3/316ms3152 KiB
7Accepted3/314ms3076 KiB
8Accepted3/317ms3120 KiB
9Runtime error0/317ms3320 KiB
10Runtime error0/317ms3084 KiB
11Runtime error0/317ms3120 KiB
12Runtime error0/318ms3400 KiB
13Runtime error0/417ms3528 KiB
14Runtime error0/446ms8684 KiB
15Runtime error0/457ms9944 KiB
16Runtime error0/464ms10340 KiB
17Runtime error0/457ms10276 KiB
18Runtime error0/467ms11220 KiB
19Runtime error0/476ms13688 KiB
20Runtime error0/483ms13428 KiB
21Runtime error0/478ms15188 KiB
22Runtime error0/471ms12116 KiB