結果

問題 No.647 明太子
ユーザー maspy
提出日時 2020-01-29 21:40:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 523 ms / 4,500 ms
コード長 486 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 44,592 KB
最終ジャッジ日時 2024-09-16 02:39:27
合計ジャッジ時間 14,545 ms
ジャッジサーバーID
(参考情報)
judge6 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np

N = int(readline())
data = np.array(read().split(),np.int64)
AB = data[:N+N]
A = AB[::2]
B = AB[1::2]
XY = data[N+N+1:]
X = XY[::2]
Y = XY[1::2]

count = np.array([np.count_nonzero((A >= x) & (B <= y)) for x,y in zip(X,Y)])

x = count.max()
answer = np.where(count == x)[0] + 1

if x == 0:
    print(0)
else:
    print('\n'.join(answer.astype(str)))
0