結果
| 問題 | No.3472 ジャッジキューの待ち時間クエリ |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2026-03-06 21:36:08 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 362 ms / 2,000 ms |
| + 850µs | |
| コード長 | 230 bytes |
| 記録 | |
| コンパイル時間 | 671 ms |
| コンパイル使用メモリ | 95,856 KB |
| 実行使用メモリ | 117,248 KB |
| 最終ジャッジ日時 | 2026-07-27 07:39:06 |
| 合計ジャッジ時間 | 4,565 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| サンプル | 10 % | AC * 3 |
| Small | 30 % | AC * 7 |
| Large | 60 % | AC * 7 |
| 合計 | 100 点 |
ソースコード
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)
Kude