結果
問題 |
No.1093 区間の和 / Sum of Range
|
ユーザー |
![]() |
提出日時 | 2020-07-01 06:22:36 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,331 ms / 2,000 ms |
コード長 | 254 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 50,484 KB |
最終ジャッジ日時 | 2024-09-13 20:48:11 |
合計ジャッジ時間 | 35,566 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 36 |
ソースコード
import numpy as np import bisect n, k = map(int,input().split()) A = list(map(int,input().split())) Q = int(input()) c = np.cumsum([0]+A) wide = c[k:] - c[:-k] wide.sort() for i in range(Q): x = int(input()) print(bisect.bisect_right(wide, x))