結果

問題 No.647 明太子
ユーザー maspymaspy
提出日時 2020-01-29 21:40:12
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 165 ms / 4,500 ms
コード長 486 bytes
コンパイル時間 385 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 31,256 KB
最終ジャッジ日時 2023-10-14 07:31:46
合計ジャッジ時間 7,505 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
29,652 KB
testcase_01 AC 135 ms
29,760 KB
testcase_02 AC 138 ms
29,584 KB
testcase_03 AC 134 ms
29,748 KB
testcase_04 AC 133 ms
29,716 KB
testcase_05 AC 133 ms
29,816 KB
testcase_06 AC 136 ms
29,652 KB
testcase_07 AC 135 ms
29,704 KB
testcase_08 AC 134 ms
29,788 KB
testcase_09 AC 156 ms
29,876 KB
testcase_10 AC 139 ms
29,872 KB
testcase_11 AC 138 ms
29,648 KB
testcase_12 AC 140 ms
29,792 KB
testcase_13 AC 141 ms
29,844 KB
testcase_14 AC 154 ms
30,912 KB
testcase_15 AC 139 ms
29,864 KB
testcase_16 AC 133 ms
29,748 KB
testcase_17 AC 150 ms
30,836 KB
testcase_18 AC 156 ms
30,700 KB
testcase_19 AC 142 ms
31,028 KB
testcase_20 AC 146 ms
30,720 KB
testcase_21 AC 138 ms
30,120 KB
testcase_22 AC 165 ms
31,256 KB
testcase_23 AC 138 ms
29,768 KB
権限があれば一括ダウンロードができます

ソースコード

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