結果
| 問題 |
No.2942 Sigma Music Game Level Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-03 10:53:38 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 652 bytes |
| コンパイル時間 | 626 ms |
| コンパイル使用メモリ | 82,184 KB |
| 実行使用メモリ | 67,380 KB |
| 最終ジャッジ日時 | 2025-03-03 10:54:05 |
| 合計ジャッジ時間 | 5,693 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 24 |
ソースコード
from sortedcontainers import SortedList
from atcoder.segtree import SegTree
n,q,l0=map(int,input().split())
lst=SortedList(map(int,input().split()))
l=[]
l.append(l0)
op=lambda a,b:a+b
e=0
cnt=0
for _ in range(q):
query=list(map(int,input().split()))
if query[0]==3:
que,m=query
l.append(m)
elif query[0]==1:
que,ll=query
l.append(l[-1])
lst.add(ll)
else:
que,left,right=query
cnt+=1
st=SegTree(op,e,list(lst))
ll=lst.bisect_left(left)
rr=lst.bisect_right(right)
print(rr-ll,end=" ")
print(st.prod(ll,rr))
if cnt==0:
print("Not Found!")