結果

問題 No.647 明太子
コンテスト
ユーザー c-yan
提出日時 2020-08-26 02:01:24
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 2,345 ms / 4,500 ms
コード長 378 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 480 ms
コンパイル使用メモリ 20,700 KB
実行使用メモリ 15,832 KB
最終ジャッジ日時 2026-05-06 16:03:25
合計ジャッジ時間 12,034 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
AB = [tuple(map(int, input().split())) for _ in range(N)]
M = int(input())
XY = [tuple(map(int, input().split())) for _ in range(M)]

c = [0] * M
for a, b in AB:
    for i in range(M):
        x, y = XY[i]
        if x <= a and y >= b:
            c[i] += 1

m = max(c)
if m == 0:
    print(0)
else:
    print(*(i + 1 for i in range(M) if c[i] == m), sep='\n')
0