Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[問題案] Persistent Range Affine Range Sum #760

Open
NachiaVivias opened this issue Feb 26, 2022 · 2 comments · May be fixed by #1294
Open

[問題案] Persistent Range Affine Range Sum #760

NachiaVivias opened this issue Feb 26, 2022 · 2 comments · May be fixed by #1294
Labels
contributions-welcome 審査済み work in progress 担当者が決定した

Comments

@NachiaVivias
Copy link
Collaborator

NachiaVivias commented Feb 26, 2022

問題ID: persistent_range_affine_range_sum
問題名: Persistent Range Affine Range Sum

想定アルゴリズム: 遅延セグメント木の path copying
参考資料: https://37zigen.com/persistent-segment-tree/

問題概要

Range Affine Range Sum を永続化 + α

初期状態を X[-1] とする

クエリ 0 t l r c d : X[t] の a[l..r] に x←cx+d を作用して X[i] とする
クエリ 1 t s l r : X[t] の a[l..r] を、 X[s] の a[l..r] で置き換えたものを X[i] とする
クエリ 2 t l r : X[t] で a[l..r] の総和を出力

入力

N Q
a[0] a[1] ... a[N-1]
0 t l r c d
1 t s l r
2 t l r
 :

出力はクエリ通り

制約

N,Q <= 10^5 とかじゃないと、たぶん RAM 使用量が大きい

@maspypy
Copy link
Collaborator

maspypy commented Apr 16, 2023

よいと思います。

@maspypy
Copy link
Collaborator

maspypy commented Apr 19, 2023

作業者募集で。

@maspypy maspypy added the contributions-welcome 審査済み label Apr 19, 2023
@NachiaVivias NachiaVivias linked a pull request Dec 4, 2024 that will close this issue
@NachiaVivias NachiaVivias added the work in progress 担当者が決定した label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions-welcome 審査済み work in progress 担当者が決定した
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants