254802026-02-20 11:48:37MangoKert (75 pont)python3Wrong answer 0/75601ms27368 KiB
a = input().split()
sorsz,sorh,szinek = int(a[0]),int(a[1]),int(a[2])


virags = []
tobblet = 0
tomb = {}


legh = 1

for i in range(sorsz):
    vantobblet = False
    tomb = {}
    mosth = 0
    sor = input().split()
    sor = [0] + sor
    virags.append(sor)
    for f in range(1,sorh+1):
        virags[i][f] = int(virags[i][f])
        if virags[i][f] not in tomb:
            tomb[virags[i][f]] = 0
        tomb[virags[i][f]] += 1
        if virags[i][f] == virags[i][f-1]:
            mosth += 1
        elif mosth > legh:
            legh = mosth
        if tomb[virags[i][f]] > sorh / 2:
            vantobblet = True
    if vantobblet:
        tobblet += 1

print(0, legh, sep="\n")
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/016ms3160 KiB
2Time limit exceeded0/0587ms22352 KiB
3Wrong answer0/417ms3124 KiB
4Wrong answer0/416ms3124 KiB
5Wrong answer0/417ms3116 KiB
6Wrong answer0/416ms3032 KiB
7Wrong answer0/417ms3020 KiB
8Wrong answer0/417ms3004 KiB
9Wrong answer0/417ms3128 KiB
10Wrong answer0/429ms3732 KiB
11Wrong answer0/619ms3280 KiB
12Wrong answer0/643ms3972 KiB
13Wrong answer0/6100ms5692 KiB
14Time limit exceeded0/6601ms21772 KiB
15Time limit exceeded0/6601ms27368 KiB
16Time limit exceeded0/6587ms22308 KiB
17Wrong answer0/7351ms13464 KiB