본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 5246번 Checkerboard Rows

by 현장 2025. 2. 7.

-Code

for _ in range(int(input())):
    p_list = list(map(int, input().split()))
    column = {}

    for i in range(1, len(p_list), 2):
        x, y = p_list[i], p_list[i + 1]

        if y not in column:
            column[y] = 1
        else:
            column[y] += 1
    print(max(column.values()))