254612026-02-20 10:35:37MangoKert (75 pont)python3Runtime error 22/75156ms32000 KiB
a = input().split()
sorsz,sorh,szinek = int(a[0]),int(a[1]),int(a[2])


virags = []
tobblet = 0

mosth = 0
legh = 1

for i in range(sorsz):
    tomb = [0]*(szinek+1)
    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] == 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
base22/75
1Accepted0/016ms3112 KiB
2Runtime error0/043ms32000 KiB
3Partially correct2/416ms3112 KiB
4Partially correct2/416ms3124 KiB
5Partially correct2/421ms4660 KiB
6Partially correct2/424ms4656 KiB
7Partially correct2/424ms4660 KiB
8Partially correct2/421ms4708 KiB
9Partially correct2/423ms4660 KiB
10Partially correct2/432ms5828 KiB
11Partially correct3/627ms5676 KiB
12Partially correct3/6156ms27140 KiB
13Runtime error0/635ms32000 KiB
14Runtime error0/641ms32000 KiB
15Runtime error0/635ms32000 KiB
16Runtime error0/641ms32000 KiB
17Runtime error0/735ms32000 KiB