結果

問題 No.647 明太子
ユーザー ああいい
提出日時 2022-05-19 09:27:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 163 ms / 4,500 ms
コード長 442 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 76,800 KB
最終ジャッジ日時 2024-09-17 14:56:53
合計ジャッジ時間 2,911 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
member = []
for _ in range(N):
    a,b = map(int,input().split())
    member.append((a,b))
M = int(input())
dat = [0] * M
m = -1
for _ in range(M):
    x,y = map(int,input().split())
    count = 0
    for a,b in member:
        if x <= a and y >= b:
            count += 1
    dat[_] = count
    if count > m:m = count
import sys
if m == 0:
    print(0)
    exit()
for i in range(M):
    if dat[i] == m:
        print(i + 1)
0