結果
| 問題 | No.3472 ジャッジキューの待ち時間クエリ |
| コンテスト | |
| ユーザー |
koheijkt
|
| 提出日時 | 2026-03-06 21:49:37 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 135 ms / 2,000 ms |
| コード長 | 1,036 bytes |
| 記録 | |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 85,452 KB |
| 実行使用メモリ | 117,500 KB |
| 最終ジャッジ日時 | 2026-03-06 23:25:32 |
| 合計ジャッジ時間 | 2,389 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| サンプル | 10 点 | AC * 3 |
| Small | 30 点 | AC * 7 |
| Large | 60 点 | AC * 7 |
| 合計 | 100 点 |
ソースコード
import sys, math
sys.setrecursionlimit(10**8)
sys.set_int_max_str_digits(0)
INF = 1e18
MOD = 998244353
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict, Counter
from itertools import product, combinations, permutations, groupby, accumulate
from heapq import heapify, heappop, heappush
input = sys.stdin.readline
def I(): return input().rstrip()
def II(): return int(input().rstrip())
def IS(): return input().rstrip().split()
def MII(): return map(int, input().rstrip().split())
def LI(): return list(input().rstrip())
def TII(): return tuple(map(int, input().rstrip().split()))
def LII(): return list(map(int, input().rstrip().split()))
def LSI(): return list(map(str, input().rstrip().split()))
def GMI(): return list(map(lambda x: int(x) - 1, input().rstrip().split()))
def kiriage(a, b): return (a+b-1)//b
def cnt_ika(li, x): # x 以下の要素数
return bisect_right(li, x)
N, Q = MII()
T = LII()
rT = list(accumulate(T))
for i in range(Q):
x = II()
print(cnt_ika(rT, x))
koheijkt