結果

問題 No.647 明太子
ユーザー Mario
提出日時 2018-05-15 18:36:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 223 ms / 4,500 ms
コード長 482 bytes
コンパイル時間 171 ms
コンパイル使用メモリ 82,208 KB
実行使用メモリ 77,244 KB
最終ジャッジ日時 2024-06-28 12:09:37
合計ジャッジ時間 3,044 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
members = [list(map(int, input().split())) for _ in range(n)]
m = int(input())
mentaiko = [list(map(int, input().split())) for _ in range(m)]
mentaiko_count = [0] * m

for i, (x, y) in enumerate(mentaiko):
    for price, hot in members:
        if x <= price and y >= hot:
            mentaiko_count[i] += 1

max_ = max(mentaiko_count)
if max_ == 0:
    print(0)
else:
    print(*[i + 1 for i, x in enumerate(mentaiko_count) if x == max(mentaiko_count)], sep="\n")
0