254712026-02-20 11:22:16MangoKert (75 pont)python3Wrong answer 0/75601ms28288 KiB
a = input().split()
sorsz,sorh,szinek = int(a[0]),int(a[1]),int(a[2])


virags = []
tobblet = 0
tomb = {}

mosth = 0
legh = 1

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

print(tobblet, legh, sep="\n")
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/016ms3140 KiB
2Time limit exceeded0/0573ms21416 KiB
3Wrong answer0/416ms2940 KiB
4Wrong answer0/416ms3124 KiB
5Wrong answer0/417ms3132 KiB
6Wrong answer0/416ms3160 KiB
7Wrong answer0/417ms3144 KiB
8Wrong answer0/417ms3072 KiB
9Wrong answer0/417ms3320 KiB
10Wrong answer0/429ms3608 KiB
11Wrong answer0/619ms3124 KiB
12Wrong answer0/643ms3892 KiB
13Wrong answer0/693ms5844 KiB
14Time limit exceeded0/6601ms21596 KiB
15Time limit exceeded0/6591ms28288 KiB
16Time limit exceeded0/6586ms22340 KiB
17Wrong answer0/7354ms13720 KiB