241012026-02-04 12:07:10MangoÉrdekes túra (70 pont)python3Wrong answer 0/70497ms32000 KiB
h = int(input())
sz = input().split()
for i in range(h):
    sz[i] = int(sz[i])
s = [sz[0]]
v = 0
nagy = 0
for i in range(1,h-1):
    if sz[i] == s[len(s)-1]:
        if len(s) > 1:
            v += 1
        if len(s) > nagy:
            nagy = len(s)
        s.clear()
    s.append(sz[i])
    print(s,nagy,v)

if len(s) > nagy:
    nagy = len(s)
if len(s) > 0:
    v += 1

print(v,nagy, sep="\n")
SubtaskSumTestVerdictTimeMemory
base0/70
1Wrong answer0/016ms3140 KiB
2Time limit exceeded0/0479ms30332 KiB
3Wrong answer0/316ms3124 KiB
4Wrong answer0/316ms3124 KiB
5Wrong answer0/316ms2980 KiB
6Wrong answer0/316ms2972 KiB
7Wrong answer0/316ms3120 KiB
8Wrong answer0/316ms3120 KiB
9Wrong answer0/325ms3576 KiB
10Wrong answer0/330ms3636 KiB
11Wrong answer0/352ms4660 KiB
12Wrong answer0/392ms6564 KiB
13Wrong answer0/497ms6924 KiB
14Time limit exceeded0/4483ms30696 KiB
15Time limit exceeded0/4483ms32000 KiB
16Time limit exceeded0/4497ms29484 KiB
17Time limit exceeded0/4425ms28628 KiB
18Time limit exceeded0/4479ms28628 KiB
19Time limit exceeded0/4479ms32000 KiB
20Time limit exceeded0/4497ms31228 KiB
21Time limit exceeded0/4277ms23024 KiB
22Time limit exceeded0/4194ms16792 KiB