結果

問題 No.647 明太子
ユーザー utsumidaisuke
提出日時 2018-12-21 16:22:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 2,574 ms / 4,500 ms
コード長 492 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-09-25 09:32:50
合計ジャッジ時間 7,978 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

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)

cnt  = [0 for i in range(m)]
for l,i in enumerate(ment):
    for j in cond:
        if i[0] <= j[0] and i[1] >= j[1]:
            cnt[l] += 1
            
mx = max(cnt)
if mx == 0:
    print(0)
else:
    for i,j in enumerate(cnt):
        if j == mx:
            print(i+1)
0