241022026-02-04 12:08:50MangoÉrdekes túra (70 pont)python3Wrong answer 0/70499ms32000 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

if v != 0:
    print(v,nagy, sep="\n")
else:
    print(-1)    
SubtaskSumTestVerdictTimeMemory
base0/70
1Wrong answer0/014ms3124 KiB
2Time limit exceeded0/0486ms30796 KiB
3Wrong answer0/316ms3132 KiB
4Wrong answer0/316ms3084 KiB
5Wrong answer0/317ms3136 KiB
6Wrong answer0/317ms3124 KiB
7Wrong answer0/317ms3124 KiB
8Wrong answer0/317ms3128 KiB
9Wrong answer0/325ms3380 KiB
10Wrong answer0/332ms3752 KiB
11Wrong answer0/350ms4624 KiB
12Wrong answer0/393ms6452 KiB
13Wrong answer0/498ms6988 KiB
14Time limit exceeded0/4485ms31260 KiB
15Time limit exceeded0/4486ms31992 KiB
16Time limit exceeded0/4497ms29480 KiB
17Time limit exceeded0/4497ms32000 KiB
18Time limit exceeded0/4485ms28968 KiB
19Time limit exceeded0/4492ms32000 KiB
20Time limit exceeded0/4499ms31040 KiB
21Time limit exceeded0/4481ms32000 KiB
22Time limit exceeded0/4485ms30496 KiB