結果
| 問題 |
No.1093 区間の和 / Sum of Range
|
| ユーザー |
330Xs
|
| 提出日時 | 2022-02-05 14:56:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 352 bytes |
| コンパイル時間 | 310 ms |
| コンパイル使用メモリ | 82,816 KB |
| 実行使用メモリ | 100,608 KB |
| 最終ジャッジ日時 | 2024-06-11 13:33:47 |
| 合計ジャッジ時間 | 10,365 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 6 WA * 30 |
ソースコード
from bisect import bisect_right
n,k = map(int,input().split())
a = list(map(int,input().split()))
aa = a[:k]
aa_sum = sum(aa)
s = set()
s.add(aa_sum)
for i in range(n-k):
s.add(aa_sum - a[i] + a[k+i])
aa_sum = aa_sum - a[i] + a[k+i]
s = sorted(list(s))
q = int(input())
for _ in range(q):
m = int(input())
print(bisect_right(s,m))
330Xs