結果

問題 No.647 明太子
コンテスト
ユーザー convexineq
提出日時 2021-03-08 01:39:05
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 132 ms / 4,500 ms
+ 416µs
コード長 335 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 76 ms
コンパイル使用メモリ 80,640 KB
実行使用メモリ 85,120 KB
最終ジャッジ日時 2026-09-12 14:09:23
合計ジャッジ時間 2,778 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
ab = [list(map(int,input().split())) for _ in range(n)]
m = int(input())
cnt = [0]*m
for _ in range(m):
    x,y = map(int,input().split())
    c = 0
    for a,b in ab:
        if x <= a and y >= b: c += 1
    cnt[_] = c
v = max(cnt)
if v == 0:
    print(0)
else:
    for i in range(m):
        if cnt[i]==v: print(i+1)
0