254852026-02-20 11:51:32MangoKert (75 pont)python3Időlimit túllépés 28/75602ms27548 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
            mosth = 0
        if tomb[virags[i][f]] > sorh / 2:
            vantobblet = True
    if vantobblet:
        tobblet += 1

print(tobblet, legh, sep="\n")
RészfeladatÖsszpontTesztVerdiktIdőMemória
base28/75
1Elfogadva0/017ms3128 KiB
2Időlimit túllépés0/0586ms22012 KiB
3Részben helyes2/416ms2976 KiB
4Részben helyes2/417ms3164 KiB
5Részben helyes2/416ms3052 KiB
6Részben helyes2/416ms3048 KiB
7Részben helyes2/416ms3124 KiB
8Részben helyes2/417ms3124 KiB
9Részben helyes2/417ms3212 KiB
10Részben helyes2/428ms3628 KiB
11Részben helyes3/617ms3260 KiB
12Részben helyes3/641ms4052 KiB
13Részben helyes3/693ms5720 KiB
14Időlimit túllépés0/6601ms21920 KiB
15Időlimit túllépés0/6602ms27548 KiB
16Időlimit túllépés0/6595ms22208 KiB
17Részben helyes3/7342ms13392 KiB