백준 14183번: Key Maker #Python

ColorlessDia·2026년 1월 21일

algorithm/baekjoon

목록 보기
795/808
import sys

input = sys.stdin.readline

while True:
    M, N = map(int, input().split())

    if M == N == 0:
        break

    A = list(map(int, input().split()))

    count = 0

    for _ in range(N):
        B = list(map(int, input().split()))

        is_valid = True

        for a, b in zip(A, B):

            if (a - b) < 0:
                is_valid = False

        if is_valid:
            count += 1
    
    print(count)

0개의 댓글