結果

問題 No.647 明太子
ユーザー rykaw
提出日時 2018-02-20 12:55:37
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 548 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-12-26 08:09:44
合計ジャッジ時間 13,590 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 15 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
members = [list(map(int, input().rstrip().split(' '))) for i in range(0, N)]

M = int(input())
mentaiko = [list(map(int, input().rstrip().split(' '))) for i in range(0, M)]

counts = [0 for _ in range(0, M)]
miracle_idx = 0
max_val = 0

for member in members:
    for (idx, m) in enumerate(mentaiko):
        if (member[0] >= m[0] and member[1] <= m[1]):
            counts[idx] += 1
            if max_val < counts[idx]:
                max_val = counts[idx]
                miracle_idx = idx

print("{}".format(miracle_idx + 1))
0