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

[問題案] Point Set Range Composite (Linear Functions) (point_set_range_composite) #122

Closed
yosupo06 opened this issue Oct 4, 2019 · 4 comments
Assignees

Comments

@yosupo06
Copy link
Owner

yosupo06 commented Oct 4, 2019

問題概要

  • 問題ID: point_set_range_composite
  • 問題名: Point Set Range Composite (Linear Functions)

1次関数、1点変更 / 区間関数合成

N個の一次関数f_0, f_1, ..., f_{N - 1}が与えられる。f_i = a_i x + b_i。Q個のクエリを処理

  • 0 p c d: f_p(x) = (cx + d)に変更
  • 1 l, r, x: f_r(f_{r-1}(...f_{l+1}(f_l(x))...)を出力

全てmod 998244353

入力

N Q
a_0 b_0
a_1 b_1
:
a_{N - 1} b_{N - 1}
query 0
query 1
:

制約

N, Q <= 500,000
0 <= 値 < 998244353

@yosupo06
Copy link
Owner Author

yosupo06 commented Oct 4, 2019

  • 名前をどうするか(Fenwick Treeをpoint_add_range_sumにしたが、これと対応づけられる気がしないなァ)

  • 合成の向きをどっちにするか

@yosupo06
Copy link
Owner Author

f_r( ... ( f_l(x) )..)の方向の合成が自然でしょう

@yosupo06 yosupo06 self-assigned this Nov 11, 2019
@yosupo06 yosupo06 changed the title [問題案] 一次関数の一点変更, 区間合成 [問題案] Point Set Range Composite (Linear Functions) Nov 11, 2019
@yosupo06 yosupo06 changed the title [問題案] Point Set Range Composite (Linear Functions) [問題案] Point Set Range Composite (Linear Functions) (point_set_range_composite) Nov 11, 2019
@yosupo06
Copy link
Owner Author

yosupo06 commented Nov 25, 2019

(adhocにやればa=0でも逆元があるかのように扱えるはずだし)逆元消す理由がないので0<a

@yosupo06
Copy link
Owner Author

#183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant