結果

問題 No.647 明太子
コンテスト
ユーザー mlihua09
提出日時 2020-09-01 01:14:23
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 133 ms / 4,500 ms
コード長 386 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 371 ms
コンパイル使用メモリ 84,992 KB
実行使用メモリ 82,636 KB
最終ジャッジ日時 2026-05-12 05:14:41
合計ジャッジ時間 3,235 ms
ジャッジサーバーID
(参考情報)
judge2_1 / tmp-judge_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())

AB = [list(map(int, input().split())) for i in range(N)]

M = int(input())

m = 1
ans = []
for i in range(M):
    x, y = map(int, input().split())
    z = 0
    for a, b in AB:
        if x <= a and y >= b:
            z += 1
    if m < z:
        m = z
        ans = [i + 1]
    elif m == z:
        ans += [i + 1]
if ans:
    print(*ans, sep='\n')
else:
    print(0)
0