結果

問題 No.3085 Easy Problems
コンテスト
ユーザー vjudge1
提出日時 2026-01-03 18:06:13
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
RE  
実行時間 -
コード長 547 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 669 ms
コンパイル使用メモリ 21,412 KB
実行使用メモリ 20,784 KB
最終ジャッジ日時 2026-01-03 18:06:27
合計ジャッジ時間 14,267 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 2
other RE * 31
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# Read number of heroes and challenges
H, C = map(int, input().split())

heroes = []
for _ in range(H):
    strength, weakness = input().split()
    heroes.append((int(strength), weakness))

challenges = []
for _ in range(C):
    difficulty, ctype = input().split()
    challenges.append((int(difficulty), ctype))

# For each hero, count conquerable challenges
for strength, weakness in heroes:
    count = 0
    for difficulty, ctype in challenges:
        if strength >= difficulty and ctype != weakness:
            count += 1
    print(count)
0