結果
問題 |
No.1093 区間の和 / Sum of Range
|
ユーザー |
|
提出日時 | 2020-07-02 06:55:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 701 ms / 2,000 ms |
コード長 | 258 bytes |
コンパイル時間 | 333 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 20,560 KB |
最終ジャッジ日時 | 2024-09-14 17:34:14 |
合計ジャッジ時間 | 14,768 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 36 |
ソースコード
import bisect N,K=map(int,input().split()) a=[int(x) for x in input().split()] S=[0]*(N-K+1) S[0]=sum(a[:K]) for i in range(1,len(S)): S[i]=S[i-1]-a[i-1]+a[K+i-1] S.sort() Q=int(input()) for i in range(Q): x=int(input()) print(bisect.bisect(S,x))