結果

問題 No.647 明太子
ユーザー mlihua09
提出日時 2020-09-01 01:14:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 222 ms / 4,500 ms
コード長 386 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 82,540 KB
実行使用メモリ 77,440 KB
最終ジャッジ日時 2024-11-17 03:02:03
合計ジャッジ時間 3,477 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

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