-
いわゆる Binary Indexed Tree。長さ n の配列 a に対して
- a[i] に x を加算
- 区間和 a[l]+...a[r-1] を求める
をそれぞれ O(log N) で行うデータ構造。
## 参考資料
- [AtCoder Liblary](https://github.com/atcoder/ac-library/blob/master/a…
-
種類が多すぎるので分離
- 加算, 減算: とりあえず省略
- 乗算: #42
- 除算: #120
- exp: #65
- log: #66
- sqrt: #73
- 合成: ???
exp, log, sqrt: https://github.com/yosupo06/library-checker-problems/issues/63
除算, 合…
-
長さ n の文字列 s に対して、s[0,n) と s[i,n) の最長共通接頭辞(Longest Common Prefix)の長さ z[i] の配列を求める。
## 計算量
O(n)
## 参考資料
- https://github.com/atcoder/ac-library/blob/master/atcoder/string.hpp ([CC0](https://…
-
問題名: 彩色数, 頂点彩色, グラフの彩色 (復元有なら後者 2 つが適切?)
想定アルゴリズム: 乱択 (correct.cpp をどうするか検討)
# 問題概要
無向グラフが与えられるので彩色数を出力
- 自己ループ?(有りでもよいと思う)
- 多重辺?(有りが良いと思う)
- 復元?(復元で計算量が少し悪くなるかもしれない)
## 入力
```
n…
-
-
-
書くぞ
-
This submission fails to compile https://judge.yosupo.jp/submission/58508
But it compiles and works normally in custom test on atcoder.jp
The code compile on my local machine with the latest ver…
-
https://github.com/ei1333/library/blob/d1b0d478f92b7fefc587686bb8d73726aa23111f/docs/lazy-segment-tree.md#L8
https://github.com/ei1333/library/blob/d1b0d478f92b7fefc587686bb8d73726aa23111f/structur…
-
(任意) 問題ID: Fibonacci
問題名: Fibonacci
# 問題概要
Given `n` find the nth Fibonacci number modulo P (prime)
## 入力
```
50
```
## 出力
```
586268941
```
## 制約
$ n