93492024-02-20 19:00:16DohajovDanielKert (75 pont)python3Runtime error 38/75601ms69208 KiB
sdb, vdb, szkdb = [int(i) for i in input().split()]
virdbL = szkdb * [0]
vt = 0
lhsz = 0; e,u = [0,0]
for i in range(sdb):
    virL = [int(i) for i in input().split()]
    virL.append(0)
    for j in range(len(virL)-1):
        virdbL[virL[j]-1] += 1
        if virL[j-1] != virL[j] and virL[j+1] == virL[j]:
            e=j+1
        if virL[j-1] == virL[j] and virL[j+1] != virL[j]:
            u = j+1
            jsz = u-e+1
            if jsz>lhsz: lhsz=jsz 
    if max(virdbL) > vdb-max(virdbL) : vt+=1
    virdbL = szkdb * [0]
print(vt)
print(lhsz)
SubtaskSumTestVerdictTimeMemory
base38/75
1Accepted0/018ms11084 KiB
2Runtime error0/045ms69208 KiB
3Accepted4/417ms11512 KiB
4Accepted4/418ms11920 KiB
5Accepted4/461ms14860 KiB
6Accepted4/461ms15244 KiB
7Accepted4/461ms15348 KiB
8Accepted4/459ms15708 KiB
9Accepted4/461ms17276 KiB
10Accepted4/471ms17972 KiB
11Accepted6/663ms17476 KiB
12Time limit exceeded0/6601ms29124 KiB
13Runtime error0/643ms67456 KiB
14Runtime error0/639ms67412 KiB
15Runtime error0/637ms67296 KiB
16Runtime error0/639ms66996 KiB
17Runtime error0/743ms67140 KiB