254992026-02-20 12:20:49MangoKert (75 pont)python3Wrong answer 0/75588ms19828 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
        else:
            mosth = 0
            if mosth > legh:
                print(i,f,mosth)
                legh = mosth
        print("*", mosth, virags[i][f], virags[i][f-1])
        if tomb[virags[i][f]] > sorh / 2:
            vantobblet = True
    if vantobblet:
        tobblet += 1
    if mosth > legh:
        legh = mosth

print(tobblet, legh, sep="\n")
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/016ms3312 KiB
2Time limit exceeded0/0583ms15020 KiB
3Wrong answer0/417ms3120 KiB
4Wrong answer0/416ms3124 KiB
5Wrong answer0/416ms2984 KiB
6Wrong answer0/417ms3124 KiB
7Wrong answer0/417ms3040 KiB
8Wrong answer0/417ms3452 KiB
9Wrong answer0/418ms3068 KiB
10Wrong answer0/446ms3888 KiB
11Wrong answer0/621ms3172 KiB
12Wrong answer0/679ms4408 KiB
13Wrong answer0/6199ms6964 KiB
14Time limit exceeded0/6584ms14644 KiB
15Time limit exceeded0/6588ms19828 KiB
16Time limit exceeded0/6575ms15652 KiB
17Time limit exceeded0/7582ms15008 KiB