ABC246Ex 01? Queries

Cxny

[ABC246Ex] 01? Queries

link

先不考虑修改操作。

表示前 位以 结尾的本质不同子序列数,则有

线性递推,转化为矩乘的形式。设 ,则有

初始状态为 。线段树维护修改操作即可。

  • Post title:ABC246Ex 01? Queries
  • Post author:Cxny
  • Create time:2022-12-16 21:54:13
  • Post link:https://cxny.github.io/2022/12/16/ABC246Ex/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.