254612026-02-20 10:35:37MangoKert (75 pont)python3Futási hiba 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")
RészfeladatÖsszpontTesztVerdiktIdőMemória
base22/75
1Elfogadva0/016ms3112 KiB
2Futási hiba0/043ms32000 KiB
3Részben helyes2/416ms3112 KiB
4Részben helyes2/416ms3124 KiB
5Részben helyes2/421ms4660 KiB
6Részben helyes2/424ms4656 KiB
7Részben helyes2/424ms4660 KiB
8Részben helyes2/421ms4708 KiB
9Részben helyes2/423ms4660 KiB
10Részben helyes2/432ms5828 KiB
11Részben helyes3/627ms5676 KiB
12Részben helyes3/6156ms27140 KiB
13Futási hiba0/635ms32000 KiB
14Futási hiba0/641ms32000 KiB
15Futási hiba0/635ms32000 KiB
16Futási hiba0/641ms32000 KiB
17Futási hiba0/735ms32000 KiB