shogo-library

競技プログラミング用の C++ ライブラリ

View the Project on GitHub shogo314/shogo-library

shogo-library

競技プログラミング用の C++ ライブラリです。 ソースコードは shogo314/shogo-library にあります。

src/ を include パスに追加して、必要なヘッダを include します。

#include "data_structures/segtree.hpp"
#include "math/modint.hpp"

データ構造には algebra/ のモノイドを渡します。ラムダ式から作ることもできます。

SegTree<monoid::Max<int>> seg(n);
SegTree seg2(v, Monoid([](int a, int b) { return a + b; }, 0));
LazySegTree<acted_monoid::AffineSum<mint>> lseg(v);

Library Files

src/algebra

src/base

src/data_structures

src/geometry

src/graph

src/math

src/others

src/string

Verification Files

test/aoj

test/unittest

test/yosupo

test/yukicoder