結果

問題 No.3472 ジャッジキューの待ち時間クエリ
コンテスト
ユーザー Kude
提出日時 2026-03-06 21:36:08
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 532 ms / 2,000 ms
コード長 230 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,533 ms
コンパイル使用メモリ 85,076 KB
実行使用メモリ 113,620 KB
最終ジャッジ日時 2026-03-06 23:25:23
合計ジャッジ時間 7,690 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
サブタスク 配点 結果
サンプル 10 点 AC * 3
Small 30 点 AC * 7
Large 60 点 AC * 7
合計 100 点
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from bisect import bisect_right
from itertools import accumulate
n, q = map(int, input().split())
t = list(accumulate(map(int, input().split()), initial=0))
for _ in range(q):
    x = int(input())
    print(bisect_right(t, x) - 1)
0