結果

問題 No.2650 [Cherry 6th Tune *] セイジャク
ユーザー anonymously
提出日時 2024-02-23 22:19:08
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 341 bytes
コンパイル時間 359 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 22,260 KB
最終ジャッジ日時 2024-09-29 07:09:17
合計ジャッジ時間 6,721 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 2 TLE * 1 -- * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

N,A=map(int,input().split())
X=[int(x) for x in input().split()]
Y=sorted(X)
T=int(input())
ans=[-1]*N
for t in range(T):
    L,R=map(int,input().split())
    lower=bisect.bisect_left(Y,L)
    upper=bisect.bisect_right(Y,R)
    ans[lower:upper]=[t+1]*(upper-lower)
for i in range(N):
    print(ans[bisect.bisect_left(Y,X[i])])
0