43652023-03-27 10:07:11PallanekPéterKert (75 pont)python3Partially correct 61/75349ms66604 KiB
from sys import stdin, stdout
def main():
    m,n,p=[int(i) for i in input().split()]
    sorok=[]; mx=0; Ldb=0
    for i in range(m):
        db=0; elozo=0
        sorok.append(list(map(int, stdin.readline().split())))
        for j in range(n):
            if sorok[i][j]==elozo:
                db+=1
            else:
                elozo=sorok[i][j]; db=1
            if db>mx:
                mx=db
        sorok[i].sort()
        db=0; elozo=0;
        for j in range(n):
            if sorok[i][j]==elozo:
                db+=1
            else:
                if n/2<db:
                    Ldb+=1
                    break
                elozo=sorok[i][j]; db=1
    print(Ldb)
    print(mx)
main()
SubtaskSumTestVerdictTimeMemory
base61/75
1Accepted0/017ms11192 KiB
2Accepted0/0347ms53036 KiB
3Partially correct2/417ms11428 KiB
4Accepted4/417ms11868 KiB
5Partially correct2/417ms11864 KiB
6Partially correct2/417ms12316 KiB
7Accepted4/417ms12132 KiB
8Partially correct2/417ms12432 KiB
9Accepted4/417ms12516 KiB
10Accepted4/424ms13800 KiB
11Accepted6/618ms13248 KiB
12Accepted6/629ms14880 KiB
13Accepted6/654ms18440 KiB
14Accepted6/6349ms54220 KiB
15Runtime error0/6307ms66604 KiB
16Accepted6/6344ms55240 KiB
17Accepted7/7185ms34568 KiB