結果

問題 No.1093 区間の和 / Sum of Range
ユーザー KeroruKeroru
提出日時 2020-06-25 19:32:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 377 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 96,800 KB
最終ジャッジ日時 2023-09-16 22:55:43
合計ジャッジ時間 11,269 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,340 KB
testcase_01 AC 253 ms
83,208 KB
testcase_02 AC 183 ms
77,572 KB
testcase_03 AC 160 ms
93,648 KB
testcase_04 AC 109 ms
91,740 KB
testcase_05 AC 319 ms
81,964 KB
testcase_06 AC 162 ms
80,716 KB
testcase_07 AC 229 ms
81,680 KB
testcase_08 AC 212 ms
93,556 KB
testcase_09 AC 294 ms
78,692 KB
testcase_10 AC 214 ms
87,964 KB
testcase_11 AC 280 ms
82,712 KB
testcase_12 AC 221 ms
87,976 KB
testcase_13 AC 91 ms
76,312 KB
testcase_14 AC 311 ms
80,740 KB
testcase_15 AC 162 ms
82,028 KB
testcase_16 AC 346 ms
86,364 KB
testcase_17 AC 295 ms
78,244 KB
testcase_18 AC 243 ms
80,808 KB
testcase_19 AC 131 ms
77,572 KB
testcase_20 AC 221 ms
77,516 KB
testcase_21 AC 339 ms
81,120 KB
testcase_22 AC 336 ms
86,292 KB
testcase_23 AC 274 ms
77,748 KB
testcase_24 AC 153 ms
88,708 KB
testcase_25 AC 299 ms
81,760 KB
testcase_26 AC 251 ms
89,124 KB
testcase_27 AC 312 ms
80,432 KB
testcase_28 AC 244 ms
88,184 KB
testcase_29 AC 377 ms
96,800 KB
testcase_30 AC 148 ms
78,060 KB
testcase_31 AC 159 ms
82,692 KB
testcase_32 AC 183 ms
83,188 KB
testcase_33 AC 325 ms
87,460 KB
testcase_34 AC 128 ms
77,916 KB
testcase_35 AC 323 ms
78,244 KB
testcase_36 AC 298 ms
92,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
n,k=map(int,input().split())
a=[0]
s=[]
for i in map(int,input().split()):
    a+=a[-1]+i,
for i in range(n-k+1):
    s+=a[k+i]-a[i],
s.sort()
q=int(input())
for i in range(q):
    x=int(input())
    print(bisect.bisect(s,x))
0