結果

問題 No.647 明太子
コンテスト
ユーザー utsumidaisuke
提出日時 2018-12-21 15:26:07
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 4,074 ms / 4,500 ms
+ 433µs
コード長 536 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 303 ms
コンパイル使用メモリ 21,468 KB
実行使用メモリ 17,068 KB
最終ジャッジ日時 2026-09-04 00:01:12
合計ジャッジ時間 13,989 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())

cond = []
for i in range(n):
    inp = list(map(int,input().split()))
    cond.append(inp)
    
m = int(input())
ment = []
for i in range(m):
    inp = list(map(int,input().split()))
    ment.append(inp)

dct = {}
for i in range(m):
    for j in range(n):
        if ment[i][0] <= cond[j][0] and ment[i][1] >= cond[j][1]:
            dct.setdefault(i+1, 0)
            dct[i+1] += 1

if len(dct) == 0:
    print(0)
else:
    res = [i for i,j in dct.items() if j == max(dct.values())]
    for i in res:
        print(i)
0