結果

問題 No.647 明太子
ユーザー naotoman
提出日時 2018-07-15 19:33:15
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 3,064 ms / 4,500 ms
コード長 408 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 12,928 KB
最終ジャッジ日時 2024-11-06 23:51:46
合計ジャッジ時間 9,929 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
seqN = [list(map(int, input().split())) for _ in range(N)]
M = int(input())
seqM = [list(map(int, input().split())) for _ in range(M)]
cnt = [0 for _ in range(M)]
for m in range(M):
    for n in seqN:
        if seqM[m][0] <= n[0] and seqM[m][1] >= n[1]:
            cnt[m] += 1
p = max(cnt)
if p == 0:
    print(0)
else:
    for m in range(M):
        if cnt[m] == p:
            print(m+1)
0