SYMBOL INDEX (1510 symbols across 131 files) FILE: data_structures/clever_adding_intervals_set.hpp type clever_set (line 5) | struct clever_set { method init (line 8) | void init(int n) { value[{n, 1}] = (T)0; } method add (line 10) | vector, T> > add(int l, int r, T val) { FILE: data_structures/compressed_fenwick.hpp type CompressedFenwick (line 6) | struct CompressedFenwick { method get_idx (line 10) | int get_idx(int x) { method update (line 13) | void update(int x, T val) { t.update(get_idx(x), val); } method add_to_prep (line 15) | void add_to_prep(int x) { li.push_back(x); } method prepare (line 16) | void prepare() { method T (line 22) | T query(int x) { return t.query(get_idx(x) - 1); } method T (line 23) | T size() { return t.query(t.sz); } FILE: data_structures/decremental_constant_set.hpp class DecrementalConstantSet (line 19) | class DecrementalConstantSet { method small_query_prefix (line 28) | int small_query_prefix(int c, uint64_t filter_mask) { method small_query_suffix (line 33) | int small_query_suffix(int c, uint64_t filter_mask) { method DecrementalConstantSet (line 39) | DecrementalConstantSet(int _n) method remove (line 50) | void remove(int _i) { method query_right (line 75) | int query_right(int _i) { method query_left (line 96) | int query_left(int _i) { FILE: data_structures/fenwick.hpp class Fenwick (line 5) | class Fenwick { method init (line 11) | void init(int n) { method update (line 17) | void update(int idx, T val) { method T (line 27) | T query(int idx) { method T (line 36) | T query(int l, int r) { return query(r) - query(l - 1); } method find_kth (line 38) | int find_kth(T k) { FILE: data_structures/fenwick_2d.hpp class Fenwick2d (line 5) | class Fenwick2d { method update_row (line 10) | void update_row(int row, int idx, T val) { method T (line 23) | T query_row(int row, int idx) { method init (line 37) | void init(int _sz) { method update (line 42) | void update(int row, int col, T val) { method T (line 51) | T query(int row, int col) { FILE: data_structures/fenwick_range_update.hpp class FenwickRangeUpdate (line 5) | class FenwickRangeUpdate { method update (line 10) | void update(int idx, T val) { method init (line 21) | void init(int n) { method T (line 26) | T query(int idx) { method update (line 35) | void update(int l, int r, T val) { FILE: data_structures/fenwick_range_update_range_query.hpp class FenwickRangeUpdateRangeQuery (line 6) | class FenwickRangeUpdateRangeQuery { method init (line 10) | void init(int _sz) { method update (line 16) | void update(int l, int r, T val) { method T (line 22) | T query(int idx) { return t0.query(idx) * (T)idx + t1.query(idx); } method T (line 23) | T query(int l, int r) { return query(r) - query(l - 1); } FILE: data_structures/heap.hpp class Heap (line 5) | class Heap { method push_up (line 10) | void push_up(int id) { method push_down (line 19) | void push_down(int id) { method Heap (line 36) | Heap() { clear(); } method clear (line 38) | void clear() { method push (line 44) | int push(T val) { method T (line 52) | T pop() { method size (line 64) | size_t size() { return heap.size(); } method empty (line 65) | bool empty() { return heap.size() == 0; } method T (line 67) | T top() { return heap_values[heap[0]]; } method top_node (line 69) | int top_node() { return heap[0]; } method update (line 71) | void update(int node, T val) { FILE: data_structures/meldable_heap.hpp class MeldableHeap (line 5) | class MeldableHeap { method rng (line 7) | static uint32_t rng() { type Node (line 12) | struct Node { method Node (line 16) | Node(T _key) : key(_key), left(nullptr), right(nullptr) {} method Node (line 19) | Node* merge(Node* a, Node* b) { method Node (line 16) | Node(T _key) : key(_key), left(nullptr), right(nullptr) {} method pop (line 43) | pair pop(Node* a) { method MeldableHeap (line 52) | MeldableHeap() : root(nullptr) {} method MeldableHeap (line 53) | MeldableHeap(Node* _root) : root(_root) {} method MeldableHeap (line 55) | MeldableHeap copy() const { method MeldableHeap (line 61) | MeldableHeap merge(const MeldableHeap& other) { method MeldableHeap (line 67) | MeldableHeap merge( method push (line 73) | void push(T key) { method T (line 78) | T pop() { method T (line 85) | T top() const { return root->key; } method trio (line 87) | tuple, MeldableHeap> trio() const { method empty (line 93) | bool empty() const { return root == nullptr; } FILE: data_structures/merge_sort_tree.hpp class MergeSortTree (line 12) | class MergeSortTree { method update_rec (line 17) | void update_rec(int v, int tl, int tr, int pos, int y, int delta) { method query_rec (line 35) | int query_rec(int v, int tl, int tr, int ql, int qr, int k) { method init (line 48) | void init(int _n) { method update (line 53) | void update(int x, int y, int delta) { update_rec(1, 1, n, x, y, delta... method query (line 55) | int query(int qxl, int qxr, int k) { method query (line 59) | int query(int qxl, int qxr, int qyl, int qyr) { FILE: data_structures/monoids_lazy.hpp class MonoidMin (line 5) | class MonoidMin { type MinVal (line 7) | struct MinVal { type AddLazy (line 13) | struct AddLazy { method MinVal (line 23) | static MinVal merge(MinVal a, MinVal b) { return {min(a.val, b.val)}; } method MinVal (line 25) | static MinVal e() { return {numeric_limits::max()}; } method MinVal (line 27) | static MinVal lazy_apply(AddLazy f, MinVal x) { method AddLazy (line 31) | static AddLazy lazy_merge(AddLazy a, AddLazy b) { method AddLazy (line 35) | static AddLazy lazy_init(MinVal _) { return {0}; } class MonoidSum (line 48) | class MonoidSum { method Sum (line 53) | static Sum merge(Sum a, Sum b) { return a + b; } method Sum (line 55) | static Sum e() { return 0; } method Sum (line 57) | static Sum lazy_apply(AddLazy f, Sum x) { return f + x; } method AddLazy (line 59) | static AddLazy lazy_merge(AddLazy a, AddLazy b) { return a + b; } method AddLazy (line 61) | static AddLazy lazy_init(Sum _) { return 0; } method Sum (line 63) | static Sum inverse(Sum x) { return -x; } class MonoidMinWithCount (line 76) | class MonoidMinWithCount { type MinWithCount (line 78) | struct MinWithCount { type AddLazy (line 90) | struct AddLazy { method MinWithCount (line 100) | static MinWithCount merge(MinWithCount a, MinWithCount b) { method MinWithCount (line 110) | static MinWithCount e() { return {numeric_limits::max(), 0}; } method MinWithCount (line 112) | static MinWithCount lazy_apply(AddLazy f, MinWithCount x) { method AddLazy (line 116) | static AddLazy lazy_merge(AddLazy a, AddLazy b) { method AddLazy (line 119) | static AddLazy lazy_init(MinWithCount _) { return {0}; } class MonoidSumArithmeticProgression (line 132) | class MonoidSumArithmeticProgression { type Sum (line 133) | struct Sum { type AddLazy (line 141) | struct AddLazy { method Sum (line 154) | static Sum merge(Sum a, Sum b) { method Sum (line 161) | static Sum e() { return {0, 0}; } method Sum (line 162) | static Sum lazy_apply(AddLazy f, Sum x) { method AddLazy (line 169) | static AddLazy lazy_merge(AddLazy a, AddLazy b) { method AddLazy (line 175) | static AddLazy lazy_init(Sum node) { return {0, 0, node.l}; } FILE: data_structures/nonintersecting_range_tree.hpp class NonintersectingRangeTree (line 12) | class NonintersectingRangeTree { method NonintersectingRangeTree (line 17) | NonintersectingRangeTree(int n) { method add (line 33) | void add(int l, int r) { method get_parent (line 73) | int get_parent(int x) { return par[par_idx[x]]; } FILE: data_structures/offline_segment_tree_2d.hpp class OfflineSegmentTree2d (line 7) | class OfflineSegmentTree2d { method collect (line 13) | void collect(int v, int tl, int tr, int pos, int y) { method build_compression (line 26) | void build_compression(int v) { method update_rec (line 32) | void update_rec(int v, int tl, int tr, int pos, int y, T val) { method T (line 53) | T query_rec(int v, int tl, int tr, int l, int r, int yl, int yr) { method init (line 73) | void init(int _n) { method prepare_update (line 80) | void prepare_update(int x, int y) { collect(1, 1, n, x, y); } method prepare (line 82) | void prepare() { method update (line 90) | void update(int x, int y, T val) { update_rec(1, 1, n, x, y, val); } method T (line 92) | T query(int xl, int xr, int yl, int yr) { FILE: data_structures/rmq2d.hpp type rmq1d (line 4) | struct rmq1d { method init (line 7) | void init(int N) { method add (line 11) | void add(int v, int tl, int tr, int x) { method add (line 23) | void add(int x) { add(0, 0, n, x); } method get (line 24) | int get(int v, int tl, int tr, int l, int r) { method get (line 34) | int get(int l, int r) { return get(0, 0, n, l, r); } type rmq2d (line 37) | struct rmq2d { method init (line 41) | void init(int N) { method prep (line 46) | void prep(int v, int tl, int tr, int x, int y) { method prep (line 58) | void prep(int x, int y) { prep(0, 0, n, x, y); } method add (line 59) | void add(int v, int tl, int tr, int x, int y) { method add (line 72) | void add(int x, int y) { add(0, 0, n, x, y); } method build (line 73) | void build(int v, int tl, int tr) { method init2 (line 83) | void init2() { build(0, 0, n); } method get (line 84) | int get(int v, int tl, int tr, int l1, int r1, int l2, int r2) { method get (line 97) | int get(int l1, int r1, int l2, int r2) { FILE: data_structures/segment_tree.hpp class SegmentTree (line 9) | class SegmentTree { method pull (line 14) | void pull(int x) { tr[x] = merge(tr[2 * x], tr[2 * x + 1]); } method SegmentTree (line 17) | SegmentTree() { init(vector()); } method SegmentTree (line 18) | SegmentTree(int _n) { init(vector(_n, e())); } method SegmentTree (line 19) | SegmentTree(const vector& _a) { init(_a); } method init (line 21) | void init(const vector& _a) { method update (line 37) | void update(int pos, T val) { method T (line 45) | T get_pos(int pos) { return tr[pos + size]; } method T (line 47) | T query(int l, int r) { method T (line 60) | T query_all() { return tr[1]; } method max_right (line 63) | int max_right(int l) const { method max_right (line 67) | int max_right(int l, F f) const { method min_left (line 95) | int min_left(int r) const { method min_left (line 99) | int min_left(int r, F f) const { FILE: data_structures/segment_tree_lazy.hpp class SegmentTreeLazy (line 15) | class SegmentTreeLazy { method pull (line 21) | void pull(int x) { tr[x] = merge(tr[2 * x], tr[2 * x + 1]); } method push_one (line 23) | void push_one(int x, G f) { method push (line 30) | void push(int x) { method push_all_down (line 36) | void push_all_down(int x) { method push_all_open_range (line 42) | void push_all_open_range(int l, int r) { method SegmentTreeLazy (line 54) | SegmentTreeLazy() { init(vector()); } method SegmentTreeLazy (line 55) | SegmentTreeLazy(int _n) { init(vector(_n, e())); } method SegmentTreeLazy (line 56) | SegmentTreeLazy(const vector &_a) { init(_a); } method init (line 58) | void init(const vector &_a) { method update (line 78) | void update(int pos, T val) { method apply_lazy (line 87) | void apply_lazy(int l, int r, G f) { method T (line 113) | T get_pos(int pos) { method T (line 119) | T query(int l, int r) { method T (line 135) | T query_all() { return tr[1]; } method max_right (line 138) | int max_right(int l) const { method max_right (line 142) | int max_right(int l, F f) const { method min_left (line 172) | int min_left(int r) const { method min_left (line 176) | int min_left(int r, F f) const { FILE: data_structures/set_lazy.hpp class SetLazy (line 5) | class SetLazy : private Container { class Iterator (line 9) | class Iterator { method Iterator (line 15) | Iterator(typename Container::iterator it, const T& lazy_value) method T (line 18) | T operator*() const { return *it + lazy_value; } method Iterator (line 19) | Iterator& operator++() { method Iterator (line 23) | Iterator operator++(int) { method base (line 31) | typename Container::iterator base() const { return it; } method insert (line 35) | void insert(const T& value) { Container::insert(value - lazy_value); } method erase (line 37) | void erase(const T& value) { Container::erase(value - lazy_value); } method erase (line 38) | void erase(Iterator it) { Container::erase(it.base()); } method add_all (line 40) | void add_all(const T& x) { lazy_value += x; } method T (line 42) | T get_lazy_value() const { return lazy_value; } method count (line 44) | bool count(const T& value) const { method Iterator (line 48) | Iterator find(const T& value) { method Iterator (line 15) | Iterator(typename Container::iterator it, const T& lazy_value) method T (line 18) | T operator*() const { return *it + lazy_value; } method Iterator (line 19) | Iterator& operator++() { method Iterator (line 23) | Iterator operator++(int) { method base (line 31) | typename Container::iterator base() const { return it; } method Iterator (line 53) | Iterator lower_bound(const T& value) { method Iterator (line 15) | Iterator(typename Container::iterator it, const T& lazy_value) method T (line 18) | T operator*() const { return *it + lazy_value; } method Iterator (line 19) | Iterator& operator++() { method Iterator (line 23) | Iterator operator++(int) { method base (line 31) | typename Container::iterator base() const { return it; } method Iterator (line 59) | Iterator upper_bound(const T& value) { method Iterator (line 15) | Iterator(typename Container::iterator it, const T& lazy_value) method T (line 18) | T operator*() const { return *it + lazy_value; } method Iterator (line 19) | Iterator& operator++() { method Iterator (line 23) | Iterator operator++(int) { method base (line 31) | typename Container::iterator base() const { return it; } method Iterator (line 65) | Iterator begin() { return Iterator(Container::begin(), lazy_value); } method Iterator (line 15) | Iterator(typename Container::iterator it, const T& lazy_value) method T (line 18) | T operator*() const { return *it + lazy_value; } method Iterator (line 19) | Iterator& operator++() { method Iterator (line 23) | Iterator operator++(int) { method base (line 31) | typename Container::iterator base() const { return it; } method Iterator (line 66) | Iterator end() { return Iterator(Container::end(), lazy_value); } method Iterator (line 15) | Iterator(typename Container::iterator it, const T& lazy_value) method T (line 18) | T operator*() const { return *it + lazy_value; } method Iterator (line 19) | Iterator& operator++() { method Iterator (line 23) | Iterator operator++(int) { method base (line 31) | typename Container::iterator base() const { return it; } method Iterator (line 68) | const Iterator begin() const { method Iterator (line 15) | Iterator(typename Container::iterator it, const T& lazy_value) method T (line 18) | T operator*() const { return *it + lazy_value; } method Iterator (line 19) | Iterator& operator++() { method Iterator (line 23) | Iterator operator++(int) { method base (line 31) | typename Container::iterator base() const { return it; } method Iterator (line 71) | const Iterator end() const { method Iterator (line 15) | Iterator(typename Container::iterator it, const T& lazy_value) method T (line 18) | T operator*() const { return *it + lazy_value; } method Iterator (line 19) | Iterator& operator++() { method Iterator (line 23) | Iterator operator++(int) { method base (line 31) | typename Container::iterator base() const { return it; } method merge (line 78) | void merge(const SetLazy& other) { method print (line 84) | void print() const { FILE: data_structures/sparse_table.hpp class SparseTable (line 5) | class SparseTable { method SparseTable (line 12) | SparseTable() { method init (line 18) | void init(const vector& a) { method T (line 35) | T query(int l, int r) { FILE: data_structures/sparse_table_disjoint.hpp class SparseTableDisjoint (line 5) | class SparseTableDisjoint { method init_dnc (line 12) | void init_dnc(int l, int r, int lvl) { method SparseTableDisjoint (line 36) | SparseTableDisjoint() { method init (line 44) | void init(const vector& _a) { method T (line 57) | T query(int l, int r) { FILE: data_structures/treap.hpp type TreapNode (line 5) | struct TreapNode { method TreapNode (line 12) | TreapNode(KeyT key, T data) method pull (line 17) | void pull() { method split (line 30) | pair split(TreapNode* t, KeyT key) { method split_by_size (line 47) | pair split_by_size( method TreapNode (line 69) | TreapNode* merge(TreapNode* l, TreapNode* r) { method TreapNode (line 83) | TreapNode* unordered_merge(TreapNode* l, TreapNode* r) { method insert_in (line 100) | void insert_in(TreapNode*& t, TreapNode* it) { method TreapNode (line 114) | TreapNode* erase_from( class Treap (line 139) | class Treap { method rng (line 141) | static uint64_t rng() { method _pull_all (line 148) | void _pull_all(Node* t) { method Treap (line 158) | Treap() { root = nullptr; } method Treap (line 159) | Treap(const vector>& a) { build_cartesian_tree(a); } method build_cartesian_tree (line 161) | void build_cartesian_tree(const vector>& a) { method insert (line 190) | void insert(KeyT key, T data) { method Node (line 195) | Node* erase(KeyT key) { return erase_from(root, key); } method merge_treaps (line 197) | Treap merge_treaps( method count_leq (line 205) | int count_leq(KeyT max_key) { FILE: data_structures/treap_lazy.hpp type TreapNode (line 6) | struct TreapNode { method TreapNode (line 14) | TreapNode(KeyT key, T data) method pull (line 20) | void pull() { method push (line 35) | void push() { lazy.apply_lazy(this); } method push_lazy (line 37) | void push_lazy(TreapNode* t) { method split (line 43) | pair split(TreapNode* t, KeyT key) { method split_by_size (line 62) | pair split_by_size( method TreapNode (line 85) | TreapNode* merge(TreapNode* l, TreapNode* r) { method TreapNode (line 101) | TreapNode* unordered_merge(TreapNode* l, TreapNode* r) { method insert_in (line 120) | void insert_in(TreapNode*& t, TreapNode* it) { method TreapNode (line 137) | TreapNode* erase_from( class Treap (line 162) | class Treap { method rng (line 164) | static uint64_t rng() { method _pull_all (line 173) | void _pull_all(Node* t) { method Treap (line 184) | Treap() { root = nullptr; } method Treap (line 185) | Treap(const vector>& a) { build_cartesian_tree(a); } method build_cartesian_tree (line 187) | void build_cartesian_tree(const vector>& a) { method insert (line 216) | void insert(KeyT key, T data) { method erase (line 221) | void erase(KeyT key) { return erase_from(root, key); } method merge_treaps (line 223) | Treap merge_treaps( FILE: data_structures/wavelet_tree.hpp class WaveletTree (line 9) | class WaveletTree { method WaveletTree (line 17) | WaveletTree() = default; method init (line 19) | void init(const vector& arr, int x, int y) { method kth (line 44) | int kth(int l, int r, int k) const { method LTE (line 58) | int LTE(int l, int r, int k) const { method count (line 69) | int count(int l, int r, int k) const { FILE: dp_optimizations/convex_hull_trick.hpp class ConvexHullTrick (line 5) | class ConvexHullTrick { method T (line 10) | T div(T a, T b) { type Line (line 18) | struct Line { method intersect (line 28) | bool intersect(Iter x, Iter y) { method add (line 40) | void add(T k, T m) { method T (line 57) | T query(T x) { FILE: geometry/dynamic_convex_hull.hpp class DynamicConvexHull (line 8) | class DynamicConvexHull { method add_to_hull (line 19) | void add_to_hull(set& hull, coord_t& sum, const Point& p, int s... method DynamicConvexHull (line 89) | DynamicConvexHull() = default; method add (line 91) | void add(const Point& p) { method coord_t (line 96) | coord_t doubled_area() const { FILE: geometry/halfplane_intersection.hpp class HalfPlaneIntersection (line 8) | class HalfPlaneIntersection { method Point (line 14) | Point dir(int i) const { return lines[i].second - lines[i].first; } method outside (line 16) | bool outside(int i, const Point& pt) const { method Point (line 20) | Point inter(int i, int j) const { method is_parallel (line 26) | bool is_parallel(int i, int j) const { method same_direction (line 30) | bool same_direction(int i, int j) const { return (dir(i) * dir(j)) > 0; } method sort_by_angle (line 33) | static vector sort_by_angle(const vector& lines) { method HalfPlaneIntersection (line 41) | HalfPlaneIntersection(const vector& lines, bool is_sorted = false) method is_non_empty (line 82) | bool is_non_empty() const { return !empty_intersection; } method get_polygon (line 84) | vector get_polygon() const { FILE: geometry/point.hpp type Point (line 9) | struct Point { method Point (line 14) | Point(coord_t x = 0, coord_t y = 0) : x(x), y(y) {} method Point (line 16) | Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); } method Point (line 17) | Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); } method Point (line 18) | Point operator*(coord_t c) const { return Point(x * c, y * c); } method Point (line 19) | Point operator/(coord_t c) const { return Point(x / c, y / c); } method coord_t (line 21) | coord_t operator*(const Point& p) const { return x * p.x + y * p.y; } method coord_t (line 22) | coord_t operator^(const Point& p) const { return x * p.y - y * p.x; } method coord_t (line 39) | coord_t norm2() const { return x * x + y * y; } method coord_t (line 40) | coord_t norm() const { return sqrt(norm2()); } method coord_t (line 41) | coord_t angle() const { return atan2(y, x); } method Point (line 43) | Point rotate(coord_t a) const { method Point (line 47) | Point perp() const { return Point(-y, x); } method Point (line 48) | Point unit() const { return *this / norm(); } method Point (line 49) | Point normal() const { return perp().unit(); } method Point (line 50) | Point project(const Point& p) const { method Point (line 53) | Point reflect(const Point& p) const { method ostream (line 57) | ostream& operator<<(ostream& os, const Point& p) { method istream (line 60) | istream& operator>>(istream& is, Point& p) { method ccw (line 64) | int ccw(const Point& a, const Point& b, const Point& c) { method point_on_segment (line 75) | bool point_on_segment( method point_in_triangle (line 83) | bool point_in_triangle( method Point (line 93) | Point line_line_intersection( method collinear (line 100) | bool collinear(const Point& a, const Point& b) { method Point (line 104) | Point circumcenter(const Point& a, const Point& b, const Point& c) { method coord_t (line 114) | coord_t arc_area( method intersect_circles (line 130) | vector intersect_circles( method intersect_ray_segment (line 159) | optional intersect_ray_segment( FILE: geometry/polygon.hpp class Polygon (line 8) | class Polygon { method Polygon (line 12) | Polygon() {} method Polygon (line 13) | Polygon(const vector& points) : points(points) {} method size (line 15) | int size() const { return points.size(); } method Point (line 16) | const Point& operator[](int i) const { return points[i]; } method Point (line 17) | Point& operator[](int i) { return points[i]; } method coord_t (line 19) | coord_t area() const { class PointInConvexPolygon (line 28) | class PointInConvexPolygon { method prepare (line 33) | void prepare() { method PointInConvexPolygon (line 54) | PointInConvexPolygon(const Polygon& polygon) : polygon(polygon) { method contains (line 58) | bool contains(const Point& p) const { class ConvexHull (line 75) | class ConvexHull : public Polygon { method ConvexHull (line 80) | ConvexHull(const vector& points) { method tangents_from (line 139) | pair tangents_from(const Point& p) const { FILE: geometry/voronoi.hpp class VoronoiDiagram (line 12) | class VoronoiDiagram { type Arc (line 17) | struct Arc { method Arc (line 21) | Arc(const Point& p, const Point& q, int i) : p(p), q(q), i(i) {} method coord_t (line 23) | coord_t get_y(coord_t x) const { type Event (line 52) | struct Event { method Event (line 57) | Event(coord_t x, int id, Beach::iterator it) : x(x), id(id), it(it) {} method update_vertex_event (line 69) | void update_vertex_event(Beach::iterator it) { method add_edge (line 95) | void add_edge(int i, int j) { method add_point (line 102) | void add_point(int i) { method remove_arc (line 117) | void remove_arc(Beach::iterator it) { method VoronoiDiagram (line 131) | VoronoiDiagram(const vector& points, bool fix_coordinates = tru... method compute (line 149) | vector> compute(coord_t X = 1e9) { FILE: graph/bcc.hpp class biconnected_components (line 5) | class biconnected_components { method tarjan (line 9) | void tarjan(int u, int pr, int &dfs_time, vector> &st) { method add_edge (line 50) | void add_edge(int u, int v) { method init (line 55) | void init(int _n) { method compute_bcc (line 60) | void compute_bcc() { FILE: graph/bipartite_coloring.hpp type Edge (line 5) | struct Edge { method Edge (line 7) | Edge(int _u = 0, int _v = 0, int _idx = 0) : u(_u), v(_v), idx(_idx) {} class BipartiteColoring (line 10) | class BipartiteColoring { method make_larger_if_needed (line 18) | static void make_larger_if_needed(vector& v, int size) { method partition_edges_euler (line 24) | pair, vector> partition_edges_euler( method hopcroft_one_colour (line 71) | vector hopcroft_one_colour( method good_worst_case_one_colour (line 119) | vector good_worst_case_one_colour( method euler_colour (line 206) | int euler_colour( FILE: graph/bipartite_matching.hpp class BipartiteMatching (line 4) | class BipartiteMatching { method try_kuhn (line 9) | bool try_kuhn(int u) { method pre_match (line 25) | int pre_match() { method BipartiteMatching (line 47) | BipartiteMatching(int _n, int _m = -1) : n(_n), m(_m == -1 ? _n : _m) { method clear (line 52) | void clear(bool clear_adj = true) { method add_edge (line 63) | void add_edge(int u, int v) { adj[u].push_back(v); } method match_vertex (line 65) | bool match_vertex(int u) { method max_matching (line 74) | int max_matching(bool shuffle_edges = false, bool pre_matching = false) { method get_matching (line 98) | vector> get_matching() { FILE: graph/dijkstra_vlog.hpp function dijkstra (line 7) | vector dijkstra(int src, const vector>>& adj) { FILE: graph/directed_cactus.hpp class DirectedCactus (line 4) | class DirectedCactus { method dfs (line 10) | void dfs(int u, int &dfs_time, vector &used, vector &buff) { method DirectedCactus (line 24) | DirectedCactus() { method DirectedCactus (line 28) | DirectedCactus(vector _nxt) { init(_nxt); } method init (line 30) | void init(vector _nxt) { method distance (line 69) | int distance(int from, int to) { FILE: graph/dsu.hpp class DSU (line 4) | class DSU { method DSU (line 10) | DSU(int _n = 0) { init(_n); } method init (line 12) | void init(int _n) { method root (line 22) | int root(int u) { return par[u] = ((u == par[u]) ? u : root(par[u])); } method connected (line 23) | bool connected(int x, int y) { return root(x) == root(y); } method unite (line 25) | int unite(int x, int y) { method components (line 38) | vector> components() { FILE: graph/eppstein_shortest_paths.hpp class EppsteinShortestPaths (line 6) | class EppsteinShortestPaths { type Edge (line 10) | struct Edge { method Edge (line 13) | Edge(int _u = 0, int _v = 0, T _w = 0) : u(_u), v(_v), w(_w) {} method build_dijkstra_tree (line 16) | pair, vector> build_dijkstra_tree(int t) { method topsort (line 52) | vector topsort(const vector& tree) { method init (line 91) | void init(int _n) { method EppsteinShortestPaths (line 98) | EppsteinShortestPaths(int n = 0) { init(n); } method add_edge (line 100) | int add_edge(int u, int v, T w, bool directed = true) { method get_k_shortest_paths (line 115) | vector get_k_shortest_paths(int s, int t, int k) { FILE: graph/eulerian_paths.hpp class EulerianPaths (line 13) | class EulerianPaths { method dfs (line 15) | void dfs(int u, vector& path, vector& used, vector& po) { method EulerianPaths (line 32) | EulerianPaths(int _n = 0) { init(_n); } method init (line 34) | void init(int _n) { method add_edge (line 42) | int add_edge(int u, int v) { method find_paths (line 53) | vector> find_paths() { method get_edge (line 108) | pair get_edge(int edge_i) { method get_path_edges (line 116) | vector> get_path_edges(const vector& path) { method is_cycle (line 124) | bool is_cycle(const vector& path) { FILE: graph/graph.hpp class UndirectedGraph (line 5) | class UndirectedGraph { method UndirectedGraph (line 14) | UndirectedGraph(int _n = 0, bool _maintain_dsu = false) { method init (line 18) | void init(int _n, bool _maintain_dsu = false) { method read_edges (line 30) | void read_edges(int _m, int idx_offset = -1) { method add_edges (line 40) | void add_edges(const vector>& new_edges) { method add_edge (line 46) | void add_edge(int u, int v) { method DSU (line 57) | DSU& get_dsu() { FILE: graph/hopcroft_karp.hpp class HopcroftKarp (line 8) | class HopcroftKarp { method bfs (line 13) | bool bfs() { method dfs (line 41) | bool dfs(int u) { method HopcroftKarp (line 58) | HopcroftKarp(int _n, int _m = -1) : n(_n), m(_m == -1 ? _n : _m) { method clear (line 63) | void clear(bool clear_adj = true) { method add_edge (line 71) | void add_edge(int u, int v) { adj[u].push_back(v); } method max_matching (line 73) | int max_matching(bool shuffle_edges = false) { method get_matching (line 96) | vector> get_matching() { method minimum_vertex_cover (line 106) | pair, vector> minimum_vertex_cover() { FILE: graph/hungarian_algorithm.hpp class HungarianAlgorithm (line 9) | class HungarianAlgorithm { method HungarianAlgorithm (line 20) | HungarianAlgorithm(const vector>& a) { method T (line 78) | T get_cost() { FILE: graph/maxflow.hpp class MaxFlow (line 5) | class MaxFlow { type Edge (line 7) | struct Edge { method Edge (line 10) | Edge(int _to, int _rev, T _flow, T _cap, int _idx) method bfs (line 17) | bool bfs(int s, int t) { method T (line 39) | T dfs(int u, int t, T fl = inf) { method MaxFlow (line 62) | MaxFlow(int n = 0) { init(n); } method init (line 66) | void init(int _n) { method add_edge (line 73) | void add_edge(int u, int v, T w, int idx = -1) { method T (line 78) | T flow(int s, int t) { FILE: graph/mincost_circulation.hpp class MinCostCirculation (line 17) | class MinCostCirculation { type Edge (line 19) | struct Edge { method Edge (line 22) | Edge(int _from, int _to, T _capacity, T _cost, T _flow = 0) method dfs (line 36) | void dfs(int node) { method walk (line 50) | void walk(int ei, CB&& cb) { method MinCostCirculation (line 63) | MinCostCirculation(int _n = 0) { init(_n); } method init (line 65) | void init(int _n) { method size (line 74) | int size() const { return n; } method add_edge (line 76) | int add_edge(int from, int to, T capacity, T cost) { method T (line 83) | T min_circulation() { method Edge (line 137) | const Edge& get_edge(int id) const { return edges[id]; } method Edge (line 22) | Edge(int _from, int _to, T _capacity, T _cost, T _flow = 0) FILE: graph/mincost_flow.hpp class MinCostFlow (line 7) | class MinCostFlow { type Edge (line 11) | struct Edge { method Edge (line 14) | Edge(int _to, int _rev, T _capacity, T _cost, T _flow) method build_potential (line 28) | void build_potential(int source) { method dijkstra (line 49) | bool dijkstra(int source, int sink, T flow_limit, T flow) { method MinCostFlow (line 81) | MinCostFlow(int _n = 0) { init(_n); } method init (line 83) | void init(int _n) { method size (line 91) | int size() const { return n; } method add_edge (line 93) | int add_edge(int from, int to, T capacity, T cost) { method flow (line 102) | pair flow(int source, int sink, T flow_limit = inf) { FILE: graph/scc.hpp class StronglyConnectedComponents (line 4) | class StronglyConnectedComponents { method dfs1 (line 8) | void dfs1(int u) { method dfs2 (line 19) | void dfs2(int u) { method StronglyConnectedComponents (line 33) | StronglyConnectedComponents() {} method StronglyConnectedComponents (line 34) | StronglyConnectedComponents(int _n) { init(_n); } method add_edge (line 36) | void add_edge(int u, int v) { method init (line 41) | void init(int _n) { method find_components (line 49) | void find_components() { FILE: graph/st_numbering.hpp class STNumbering (line 4) | class STNumbering { method tarjan_check (line 10) | bool tarjan_check(int u, int pr) { method tarjan (line 35) | void tarjan(int u, int pr) { method STNumbering (line 56) | STNumbering() {} method STNumbering (line 57) | STNumbering(int _n) { init(_n); } method init (line 59) | void init(int _n) { method add_edge (line 65) | void add_edge(int u, int v) { method find_ordering (line 70) | bool find_ordering(int s, int t) { FILE: graph/two_sat.hpp class TwoSat (line 4) | class TwoSat { method dfs1 (line 8) | void dfs1(int u) { method dfs2 (line 19) | void dfs2(int u) { method TwoSat (line 33) | TwoSat() {} method TwoSat (line 34) | TwoSat(int _n) { init(_n); } method init (line 36) | void init(int _n) { method add_implication (line 44) | void add_implication(int u, int v, bool neg_u = false, bool neg_v = fa... method solve (line 49) | pair> solve() { FILE: math/gauss_bitset.hpp class GaussBitset (line 5) | class GaussBitset { method GaussBitset (line 12) | GaussBitset(int n_var_) : n_var(n_var_) {} method add_equation (line 14) | void add_equation(const vector& coeffs, int rhs) { method eliminate (line 25) | void eliminate() { method has_solution (line 58) | bool has_solution() const { return solvable; } method free_variables (line 60) | vector free_variables() const { method any_solution (line 70) | vector any_solution() const { FILE: old_impl/data_structures/implicit_treap.hpp type implicit_treap (line 7) | struct implicit_treap { type node (line 8) | struct node { method node (line 12) | node() { method node (line 22) | node(int _val) { method clear (line 41) | void clear() { method implicit_treap (line 46) | implicit_treap() { clear(); } method size (line 48) | int size(pnode p) { return p ? p->sz : 0; } method update_size (line 49) | void update_size(pnode &p) { method update_parent (line 55) | void update_parent(pnode &p) { method push (line 67) | void push(pnode &p) { method reset (line 91) | void reset(pnode &t) { method combine (line 97) | void combine(pnode &t, pnode l, pnode r) { method operation (line 109) | void operation(pnode &t) { method split (line 122) | void split(pnode t, pnode &l, pnode &r, int k, int add = 0) { method merge (line 142) | void merge(pnode &t, pnode l, pnode r) { method insert (line 166) | void insert(int pos, int val) { method erase (line 183) | void erase(int qL, int qR) { method query (line 191) | int query(int qL, int qR) { method update (line 205) | void update(int qL, int qR, int val) { method reverse (line 217) | void reverse(int qL, int qR) { method cyclic_shift (line 228) | void cyclic_shift(int qL, int qR, int k) { method get_pos (line 245) | int get_pos(pnode curr, pnode son = nullptr) { method get_pos (line 269) | int get_pos(int value) { return get_pos(position[value]); } function implicit_treap (line 272) | implicit_treap build(const vector &a) { type node (line 8) | struct node { method node (line 12) | node() { method node (line 22) | node(int _val) { method clear (line 41) | void clear() { method implicit_treap (line 46) | implicit_treap() { clear(); } method size (line 48) | int size(pnode p) { return p ? p->sz : 0; } method update_size (line 49) | void update_size(pnode &p) { method update_parent (line 55) | void update_parent(pnode &p) { method push (line 67) | void push(pnode &p) { method reset (line 91) | void reset(pnode &t) { method combine (line 97) | void combine(pnode &t, pnode l, pnode r) { method operation (line 109) | void operation(pnode &t) { method split (line 122) | void split(pnode t, pnode &l, pnode &r, int k, int add = 0) { method merge (line 142) | void merge(pnode &t, pnode l, pnode r) { method insert (line 166) | void insert(int pos, int val) { method erase (line 183) | void erase(int qL, int qR) { method query (line 191) | int query(int qL, int qR) { method update (line 205) | void update(int qL, int qR, int val) { method reverse (line 217) | void reverse(int qL, int qR) { method cyclic_shift (line 228) | void cyclic_shift(int qL, int qR, int k) { method get_pos (line 245) | int get_pos(pnode curr, pnode son = nullptr) { method get_pos (line 269) | int get_pos(int value) { return get_pos(position[value]); } FILE: old_impl/data_structures/implicit_treap_basic.hpp type implicit_treap (line 7) | struct implicit_treap { type node (line 8) | struct node { method node (line 11) | node() { method node (line 19) | node(int _val) { method size (line 31) | int size(pnode v) { return v ? v->sz : 0; } method update_size (line 32) | void update_size(pnode &v) { method reset (line 37) | void reset(pnode &v) { method combine (line 43) | void combine(pnode &v, pnode l, pnode r) { method operation (line 56) | void operation(pnode &v) { method merge (line 66) | void merge(pnode &t, pnode l, pnode r) { method split (line 86) | void split(pnode t, pnode &l, pnode &r, int k, int add = 0) { method implicit_treap (line 105) | implicit_treap() { root = nullptr; } method insert (line 107) | void insert(int pos, int val) { method query_max (line 121) | int query_max(int qL, int qR) { FILE: old_impl/data_structures/max_count_segment_tree.cpp type count_max_segment_tree (line 5) | struct count_max_segment_tree { type node (line 6) | struct node { method node (line 8) | node() { mx = -(int)1e9, cnt = 0, lazy = 0; } method node (line 9) | node(int v) { method node (line 16) | node merge(node a, node b) { method node (line 8) | node() { mx = -(int)1e9, cnt = 0, lazy = 0; } method node (line 9) | node(int v) { method push (line 33) | void push(int l, int r, int idx) { method init (line 44) | void init(int l, int r, int idx) { method add (line 57) | void add(int ql, int qr, int v, int l, int r, int idx) { method node (line 77) | node query(int ql, int qr, int l, int r, int idx) { method node (line 8) | node() { mx = -(int)1e9, cnt = 0, lazy = 0; } method node (line 9) | node(int v) { method walk (line 95) | void walk(int l, int r, int idx) { FILE: old_impl/data_structures/merging_segment_tree.cpp type node (line 4) | struct node { method node (line 8) | node() { method node (line 12) | node(int _s) { function size (line 20) | inline int size(pnode p) { return p ? p->sz : 0; } function update_size (line 22) | inline void update_size(pnode &p) { function pnode (line 29) | pnode init(int val, int l, int r) { function pnode (line 45) | pnode merge(pnode l, pnode r) { function split (line 60) | pair split(pnode &t, int k) { function kth (line 86) | int kth(pnode t, int k, int l, int r) { FILE: old_impl/data_structures/min_segment_tree.cpp function chkmin (line 11) | int chkmin(T &x, const T1 &y) { return x > y ? x = y, 1 : 0; } function chkmax (line 12) | int chkmax(T &x, const T1 &y) { return x < y ? x = y, 1 : 0; } type segment_tree_min (line 15) | struct segment_tree_min { type node (line 16) | struct node { method node (line 18) | node() { method node (line 23) | node(int v, int i) { method node (line 29) | node merge(node a, node b) { method node (line 18) | node() { method node (line 23) | node(int v, int i) { method init (line 37) | void init(int l, int r, int idx) { method update (line 49) | void update(int pos, int v, int l, int r, int idx) { method node (line 61) | node query(int ql, int qr, int l, int r, int idx) { method node (line 18) | node() { method node (line 23) | node(int v, int i) { function read (line 76) | void read() { function solve (line 80) | void solve() { function main (line 84) | int main() { FILE: old_impl/data_structures/monotonous_queue.cpp function chkmax (line 5) | inline void chkmax(T &x, const T2 &y) { if(x < y) x = y; } function chkmin (line 6) | inline void chkmin(T &x, const T2 &y) { if(x > y) x = y; } type monotonous_queue_max (line 10) | struct monotonous_queue_max method monotonous_queue_max (line 15) | monotonous_queue_max() { Q.clear(); current_position = 0; len = 0; } method init (line 17) | void init(int _l) method push_back (line 24) | void push_back(T x) method T (line 31) | T query() type monotonous_queue_min (line 39) | struct monotonous_queue_min method monotonous_queue_min (line 44) | monotonous_queue_min() { Q.clear(); current_position = 0; len = 0; } method init (line 46) | void init(int _l) method push_back (line 53) | void push_back(T x) method T (line 60) | T query() function read (line 67) | void read() function solve (line 72) | void solve() function main (line 77) | int main() FILE: old_impl/data_structures/persistent_segment_tree.cpp type node (line 7) | struct node { method node (line 10) | node() { method node (line 15) | node(int x) { function node (line 22) | node* merge(node* l, node* r) { method node (line 10) | node() { method node (line 15) | node(int x) { function node (line 30) | node* init(int l, int r) { method node (line 10) | node() { method node (line 15) | node(int x) { function node (line 39) | node* update(int pos, int val, int l, int r, node* nd) { method node (line 10) | node() { method node (line 15) | node(int x) { function query (line 53) | int query(int qL, int qR, int l, int r, node* nd) { function get_kth (line 65) | int get_kth(int k, int l, int r, node* nd) { function read (line 78) | void read() {} function solve (line 82) | void solve() {} function main (line 84) | int main() { FILE: old_impl/data_structures/persistent_segment_tree_lazy.cpp function chkmax (line 6) | inline void chkmax(T &x, const T2 &y) { function chkmin (line 12) | inline void chkmin(T &x, const T2 &y) { type node (line 22) | struct node { method node (line 26) | node() { method node (line 30) | node(int64_t val) { function pnode (line 39) | pnode merge(pnode a, pnode b) { function pnode (line 49) | pnode cop(pnode b) { function push (line 63) | void push(int l, int r, pnode &ver) { function pnode (line 81) | pnode init(int l, int r) { function pnode (line 89) | pnode update(int qL, int qR, int val, int l, int r, pnode prv) { function query (line 110) | int64_t query(int qL, int qR, int l, int r, pnode nd) { function read (line 123) | void read() { function solve (line 132) | void solve() { root[1] = init(0, n - 1); } function main (line 134) | int main() { FILE: old_impl/data_structures/persistent_treap.cpp type persistent_treap (line 10) | struct persistent_treap type node (line 12) | struct node method node (line 16) | node() { sz = 0; mx = 0; val = 0; l = nullptr; r = nullptr; } method node (line 17) | node(int _val) { val = _val; mx = val; sz = 1; l = nullptr; r = null... method pnode (line 22) | pnode copy_node(pnode prv) method size (line 35) | int size(pnode v) { return v ? v->sz : 0; } method update_size (line 36) | void update_size(pnode &v) { if(v) v->sz = size(v->l) + size(v->r) + 1; } method reset (line 37) | void reset(pnode &v) { if(v) v->mx = v->val; } method hey (line 38) | bool hey(int a, int b) { return (int)mt() % (a + b) < a; } method combine (line 40) | void combine(pnode &v, pnode l, pnode r) method operation (line 48) | void operation(pnode &v) method merge (line 57) | void merge(pnode &t, pnode l, pnode r) method split (line 77) | void split(pnode t, pnode &l, pnode &r, int k, int add = 0) method persistent_treap (line 102) | persistent_treap() { root = nullptr; } method insert (line 104) | void insert(int pos, int val) method query_max (line 120) | int query_max(int qL, int qR) function read (line 137) | void read() function solve (line 142) | void solve() function main (line 147) | int main() FILE: old_impl/data_structures/persistent_treap_lazy.cpp type persistent_treap (line 10) | struct persistent_treap type node (line 12) | struct node method node (line 16) | node() { sz = 0; mx = 0; lazy = 0; val = 0; l = nullptr; r = nullptr; } method node (line 17) | node(int _val) { lazy = 0; val = _val; mx = val; sz = 1; l = nullptr... method pnode (line 22) | pnode copy_node(pnode prv) method size (line 36) | int size(pnode v) { return v ? v->sz : 0; } method update_size (line 37) | void update_size(pnode &v) { if(v) v->sz = size(v->l) + size(v->r) + 1; } method reset (line 38) | void reset(pnode &v) { if(v) v->mx = v->val; } method hey (line 39) | bool hey(int a, int b) { return (int)mt() % (a + b) < a; } method push (line 41) | void push(pnode &t) method combine (line 53) | void combine(pnode &v, pnode l, pnode r) method operation (line 61) | void operation(pnode &v) method merge (line 73) | void merge(pnode &t, pnode l, pnode r) method split (line 95) | void split(pnode t, pnode &l, pnode &r, int k, int add = 0) method persistent_treap (line 122) | persistent_treap() { root = nullptr; } method insert (line 124) | void insert(int pos, int val) method query_max (line 140) | int query_max(int qL, int qR) function read (line 157) | void read() function solve (line 162) | void solve() function main (line 167) | int main() FILE: old_impl/data_structures/segment_tree.cpp type node (line 10) | struct node { method node (line 12) | node() { sum = 0; } method node (line 13) | node(int val) { function node (line 18) | node merge(node l, node r) { method node (line 12) | node() { sum = 0; } method node (line 13) | node(int val) { type segment_tree (line 24) | struct segment_tree { method init (line 27) | void init(int l, int r, int idx) { method update (line 40) | void update(int pos, int val, int l, int r, int idx) { method node (line 56) | node query(int qL, int qR, int l, int r, int idx) { function read (line 70) | void read() function solve (line 79) | void solve() function main (line 91) | int main() FILE: old_impl/data_structures/segment_tree_AP.cpp type node_ap (line 10) | struct node_ap method node_ap (line 14) | node_ap() {sum = 0; lazy = 0; lazy_ap = 0;} method node_ap (line 15) | node_ap(int val) function node_ap (line 25) | node_ap merge(node_ap l, node_ap r) method node_ap (line 14) | node_ap() {sum = 0; lazy = 0; lazy_ap = 0;} method node_ap (line 15) | node_ap(int val) type segment_tree_ap (line 33) | struct segment_tree_ap method update (line 37) | void update(int l, int r, int idx) method init (line 68) | void init(int l, int r, int idx) method update (line 83) | void update(int qL, int qR, int val, int prog, int l, int r, int idx) method node_ap (line 105) | node_ap query(int qL, int qR, int l, int r, int idx) function read (line 120) | void read() function solve (line 127) | void solve() function main (line 133) | int main() FILE: old_impl/data_structures/segment_tree_add_mult.cpp function chkmax (line 8) | inline int chkmax(T &x, const T2 &y) { return x < y ? x = y, 1 : 0; } function chkmin (line 9) | inline int chkmin(T &x, const T2 &y) { return x > y ? x = y, 1 : 0; } type node (line 13) | struct node method node (line 17) | node() {sum = 0; mult = 1; lazy = 0;} method node (line 18) | node(int val) function node (line 28) | node merge(node l, node r) method node (line 17) | node() {sum = 0; mult = 1; lazy = 0;} method node (line 18) | node(int val) type segment_tree (line 36) | struct segment_tree method push (line 40) | void push(int l, int r, int idx) method init (line 73) | void init(int l, int r, int idx) method mult (line 88) | void mult(int qL, int qR, int x, int l, int r, int idx) method add (line 108) | void add(int qL, int qR, int x, int l, int r, int idx) method node (line 128) | node query(int qL, int qR, int l, int r, int idx) function read (line 143) | void read() function solve (line 148) | void solve() function main (line 153) | int main() FILE: old_impl/data_structures/segment_tree_fast.cpp type node (line 7) | struct node { method node (line 9) | node() { mx = -1e9; } method node (line 10) | node(int val) { mx = val; } function node (line 15) | node merge(node l, node r) { method node (line 9) | node() { mx = -1e9; } method node (line 10) | node(int val) { mx = val; } type segment_tree (line 20) | struct segment_tree { method init (line 24) | void init(int sz) { method modify (line 34) | void modify(int p, const node &value) { method node (line 40) | node query(int l, int r) { function read (line 55) | void read() {} function solve (line 59) | void solve() {} function main (line 61) | int main() { FILE: old_impl/data_structures/segment_tree_lazy_min.cpp class segment_tree_min (line 6) | class segment_tree_min { type node (line 10) | struct node { method node (line 14) | node() { method node (line 19) | node(T val, int p) { method node (line 25) | node merge(node l, node r) { method node (line 14) | node() { method node (line 19) | node(T val, int p) { method push (line 37) | void push(int l, int r, int idx) { method init (line 54) | void init(int l, int r, int idx, const vector &a) { method update (line 67) | void update(int qL, int qR, T val, int l, int r, int idx) { method node (line 87) | node query(int qL, int qR, int l, int r, int idx) { method node (line 14) | node() { method node (line 19) | node(T val, int p) { method init (line 106) | void init(const vector &a) { method update (line 113) | void update(int qL, int qR, int val) { method node (line 120) | node query(int qL, int qR) { method node (line 14) | node() { method node (line 19) | node(T val, int p) { function read (line 132) | void read() { function solve (line 142) | void solve() {} function main (line 144) | int main() { FILE: old_impl/data_structures/segment_tree_lazy_sum.cpp class segment_tree_sum (line 5) | class segment_tree_sum { type node (line 7) | struct node { method node (line 10) | node() { sum = 0; } method node (line 11) | node(T val) { sum = val; } method node (line 14) | node merge(node l, node r) { method node (line 10) | node() { sum = 0; } method node (line 11) | node(T val) { sum = val; } method push (line 20) | void push(int l, int r, int idx) { method init (line 37) | void init(int l, int r, int idx, const vector &a) { method update (line 50) | void update(int qL, int qR, T val, int l, int r, int idx) { method node (line 70) | node query(int qL, int qR, int l, int r, int idx) { method node (line 10) | node() { sum = 0; } method node (line 11) | node(T val) { sum = val; } method init (line 89) | void init(vector a) { method update (line 96) | void update(int qL, int qR, int val) { method node (line 103) | node query(int qL, int qR) { method node (line 10) | node() { sum = 0; } method node (line 11) | node(T val) { sum = val; } function read (line 115) | void read() { function solve (line 125) | void solve() {} function main (line 127) | int main() { FILE: old_impl/data_structures/segment_tree_nonzero.cpp type segment_tree (line 7) | struct segment_tree method init (line 11) | void init(int l, int r, int idx) method update (line 28) | void update(int qL, int qR, int val, int l, int r, int idx) function read (line 50) | void read() function solve (line 57) | void solve() function main (line 62) | int main() FILE: old_impl/data_structures/segment_tree_with_binary_search.cpp function chkmax (line 5) | inline void chkmax(T &x, const T2 &y) { if(x < y) x = y; } function chkmin (line 6) | inline void chkmin(T &x, const T2 &y) { if(x > y) x = y; } type node (line 10) | struct node method node (line 13) | node() { mn = inf; } method node (line 14) | node(int val) { mn = val; } function node (line 19) | node merge(node l, node r) method node (line 13) | node() { mn = inf; } method node (line 14) | node(int val) { mn = val; } type segment_tree (line 26) | struct segment_tree method init (line 30) | void init(int l, int r, int idx) method update (line 47) | void update(int pos, int val, int l, int r, int idx) method get_nodes (line 65) | void get_nodes(int qL, int qR, int l, int r, int idx, vector &li) method get_right (line 79) | int get_right(int l, int r, int idx, int X) method get_left (line 87) | int get_left(int l, int r, int idx, int X) function get_left (line 99) | int get_left(int pos, int val) function get_right (line 112) | int get_right(int pos, int val) function read (line 125) | void read() function solve (line 130) | void solve() function main (line 135) | int main() FILE: old_impl/data_structures/treap.cpp type node (line 7) | struct node { method node (line 10) | node() { method node (line 17) | node(int v) { function size (line 28) | inline int size(pnode v) { return v ? v->sz : 0; } function pull (line 30) | void pull(pnode &v) { function merge (line 37) | void merge(pnode &t, pnode l, pnode r) { function split (line 56) | void split(pnode t, pnode &l, pnode &r, int k) { function merge_op (line 72) | void merge_op(pnode &t, pnode l, pnode r) { function split_sz (line 95) | void split_sz(pnode t, pnode &l, pnode &r, int k, int add = 0) { function read (line 112) | void read() {} function solve (line 114) | void solve() {} function main (line 116) | int main() { FILE: old_impl/geometry/closest_points.cpp type point (line 11) | struct point method point (line 15) | point() {x = 0; y = 0;} method point (line 16) | point(int _x, int _y) function cmpbyx (line 23) | bool cmpbyx(point a, point b) function cmpbyy (line 29) | bool cmpbyy(point a, point b) function read (line 38) | void read() function dist (line 46) | int dist(point p_i, point p_j) { return (p_i.x - p_j.x) * (p_i.x - p_j.x... function rec (line 48) | int rec(int l, int r) function solve (line 74) | void solve() function main (line 90) | int main() FILE: old_impl/geometry/convex_hull.cpp type point (line 11) | struct point { method point (line 13) | point() {x = 0; y = 0;} method point (line 14) | point(double _x, double _y) { function cmp (line 20) | bool cmp(point a, point b) { function slope (line 25) | double slope(point a, point b) { type convex_hull (line 33) | struct convex_hull { method convex_hull (line 35) | convex_hull() {st.clear();} method compute_hull (line 36) | void compute_hull(vector vec) { function read (line 61) | void read() function solve (line 75) | void solve() function main (line 80) | int main() FILE: old_impl/geometry/dynamic_upper_hull.cpp function chkmin (line 11) | int chkmin(T &x, const T1 &y) { return x > y ? x = y, 1 : 0; } function chkmax (line 12) | int chkmax(T &x, const T1 &y) { return x < y ? x = y, 1 : 0; } type PT (line 15) | struct PT method PT (line 18) | PT() { x = y = 0; } method PT (line 19) | PT(int _x, int _y) { x = _x; y = _y; } method PT (line 22) | PT operator+(const PT &other) const { return PT(x + other.x, y + other... method PT (line 23) | PT operator-(const PT &other) const { return PT(x - other.x, y - other... function eval (line 29) | int64_t eval(PT L, PT R) { return (L.y + R.y) * 1ll * (R.x - L.x); } type node (line 31) | struct node method node (line 38) | node() { sz = 0; answer = prior = 0; leftmost = rightmost = prv = l = ... method node (line 39) | node(PT a) {leftmost = rightmost = this; sz = 1; answer = 0; pnt = a; ... function size (line 44) | inline int size(pnode &t) { return t ? t->sz : 0; } function pull (line 46) | void pull(pnode &t) function merge (line 72) | void merge(pnode &t, pnode l, pnode r) function split_x (line 85) | void split_x(pnode t, pnode &l, pnode &r, int k) function split_sz (line 97) | void split_sz(pnode t, pnode &l, pnode &r, int k, int add = 0) function read (line 114) | void read() function add (line 144) | void add(int ql, int qr, int i, int l, int r, int idx) function cww (line 160) | int64_t cww(const PT &a, const PT &b, const PT &c) { return (b - a) & (c... function find_pref (line 162) | int find_pref(pnode t, PT R) function find_suff (line 171) | int find_suff(pnode t, PT L) function add (line 186) | pair add(pnode &t, PT pnt) function solve (line 217) | void solve(int l, int r, int idx) function solve (line 249) | void solve() function main (line 262) | int main() FILE: old_impl/geometry/kd-tree.cpp function sq (line 8) | inline int64_t sq(int x) { return x * 1ll * x; } type point (line 10) | struct point method point (line 13) | point() { } type cmp (line 16) | struct cmp method cmp (line 19) | cmp() { current_d = 0; } method cmp (line 20) | cmp(int d) { current_d = d; } function sq_dist (line 24) | int64_t sq_dist(point a, point b, int d) type kd_tree (line 33) | struct kd_tree type node (line 35) | struct node method node (line 39) | node() { L = -1; R = -1; } method node (line 40) | node(point _p) { L = -1; R = -1; p = _p; } method kd_tree (line 46) | kd_tree() { D = 0; psz = 0; } method kd_tree (line 47) | kd_tree(int d) { D = d; psz = 0; } method new_node (line 49) | int new_node() { return psz++; } method build (line 51) | int build(point *from, point *to, int axis) method init (line 71) | void init(point *from, point *to, int d) method query (line 78) | void query(int idx, point q, int64_t &answer) method nearest_neigbhor (line 95) | double nearest_neigbhor(point q) function read (line 106) | void read() function solve (line 116) | void solve() function main (line 132) | int main() FILE: old_impl/geometry/rectangle_union.cpp type edge (line 11) | struct edge method edge (line 14) | edge() {x = -1; y1 = -1; y2 = -1; val = -1;} method edge (line 15) | edge(int _x, int _y1, int _y2, int _val) function read (line 32) | void read() function compress (line 55) | void compress() type segment_tree (line 82) | struct segment_tree type node (line 84) | struct node method node (line 87) | node() {lazy = 0, ans = 0;} method node (line 88) | node(int v) { ans = v; lazy = 0;} method update (line 93) | void update(int qL, int qR, int val, int l, int r, int idx) function mabs (line 120) | inline int mabs(int x) { return x < 0 ? -x : x; } function rectangle_union (line 122) | int rectangle_union() function solve (line 138) | void solve() function main (line 144) | int main() FILE: old_impl/graph/dsu_bipartite.cpp function read (line 10) | void read() { function root (line 18) | int root(int u) { function unite (line 23) | void unite(int u, int v) { function solve (line 43) | void solve() { function main (line 52) | int main() { FILE: old_impl/graph/eulerian_path.cpp function chkmin (line 6) | int chkmin(T &x, const T1 &y) { function chkmax (line 11) | int chkmax(T &x, const T1 &y) { function ostream (line 16) | ostream &operator<<(ostream &out, const pair &x) { function istream (line 21) | istream &operator>>(istream &in, pair &x) { function istream (line 26) | istream &operator>>(istream &in, vector &a) { function ostream (line 34) | ostream &operator<<(ostream &out, vector &a) { function read (line 58) | void read() { function dfs (line 77) | void dfs(int u) { function get_edge (line 88) | pair get_edge(int edge_i) { function dfs_visit_nodes (line 96) | void dfs_visit_nodes(int u, vector &visited, vector &nodes) { function solve (line 106) | void solve() { function main (line 211) | int main() { FILE: old_impl/graph/max_anticlique.cpp function get_deg (line 13) | int get_deg(int u) { function dfs (line 21) | void dfs(int u) { function brute (line 29) | int brute() { function rec (line 53) | int rec() { function max_anticlique (line 80) | int max_anticlique() { function read (line 85) | void read() {} function solve (line 87) | void solve() {} function main (line 89) | int main() { FILE: old_impl/graph/maximum_closure.cpp function chkmax (line 5) | inline void chkmax(T &x, const T2 &y) { if(x < y) x = y; } function chkmin (line 6) | inline void chkmin(T &x, const T2 &y) { if(x > y) x = y; } type max_flow (line 10) | struct max_flow type edge (line 15) | struct edge method edge (line 19) | edge() { flow = 0; cap = 0; rev = 0; idx = 0; to = 0; } method edge (line 20) | edge(int _to, int _rev, FlowT _flow, FlowT _cap, int _idx) method bfs (line 31) | bool bfs(int s, int t) method FlowT (line 58) | FlowT dfs(int u, int t, FlowT fl = finf) method init (line 81) | void init(int _n) { n = _n; for(int i = 0; i <= n; i++) G[i].clear(); } method add_edge (line 83) | void add_edge(int u, int v, FlowT w, int idx = -1) method FlowT (line 89) | FlowT flow(int s, int t) type maximum_closure (line 103) | struct maximum_closure method init (line 110) | void init(int _n) method add_clause (line 117) | void add_clause(int i, int j) { adj[i].push_back(j); } method dfs_tarjan (line 123) | void dfs_tarjan(int u) method T (line 154) | T solve() function read (line 187) | void read() function solve (line 192) | void solve() function main (line 197) | int main() FILE: old_impl/graph/mincost_maxflow.cpp type edge (line 10) | struct edge { method edge (line 12) | edge() { method edge (line 19) | edge(int _to, int _rev, int _flow, int _cap, int _cost) { function add_edge (line 31) | void add_edge(int u, int v, int w, int cost) { function spfa (line 42) | bool spfa() { function min_cost_flow (line 82) | pair min_cost_flow(int flow) { function read (line 107) | void read() {} function solve (line 109) | void solve() {} function main (line 111) | int main() { function next_char (line 124) | void next_char() { function read_int (line 130) | int read_int() { FILE: old_impl/graph/persistent_dsu.cpp type persistent_dsu (line 7) | struct persistent_dsu type state (line 9) | struct state method state (line 12) | state() {u = -1; v = -1; rnkv = -1; rnku = -1;} method state (line 13) | state(int _u, int _rnku, int _v, int _rnkv) method persistent_dsu (line 24) | persistent_dsu() {memset(par, -1, sizeof(par)); memset(depth, 0, sizeo... method root (line 26) | int root(int x) method init (line 32) | void init(int n) method connected (line 41) | bool connected(int x, int y) method unite (line 46) | void unite(int x, int y) method backtrack (line 62) | void backtrack(int c) function read (line 76) | void read() function solve (line 83) | void solve() function main (line 88) | int main() FILE: old_impl/graph/scc_tarjan.cpp function read (line 10) | void read() function dfs (line 29) | void dfs(int u) function tarjan (line 68) | void tarjan() function solve (line 89) | void solve() function main (line 94) | int main() FILE: old_impl/graph/st_numbering.cpp function chkmax (line 8) | inline int chkmax(T &x, const T2 &y) { return x < y ? x = y, 1 : 0; } function chkmin (line 9) | inline int chkmin(T &x, const T2 &y) { return x > y ? x = y, 1 : 0; } function read (line 15) | void read() { function tarjan_check (line 28) | bool tarjan_check(int u, int pr = -1) { function tarjan (line 47) | void tarjan(int u, int pr = -1) { function st_numbering (line 64) | vector st_numbering() { function solve (line 105) | void solve() { function main (line 111) | int main() { FILE: old_impl/math/combinatorics.cpp function T (line 6) | T pw(T a, int pw) { class modint_t (line 20) | class modint_t { method modint_t (line 25) | modint_t() { x = 0; } method modint_t (line 26) | modint_t(unsigned _x) { x = _x; } method modint_t (line 32) | modint_t operator+=(const modint_t& m) { method modint_t (line 36) | modint_t operator-=(const modint_t& m) { method modint_t (line 40) | modint_t operator*=(const modint_t& m) { method modint_t (line 45) | modint_t operator+=(const int32_t m) { method modint_t (line 49) | modint_t operator-=(const int32_t m) { method modint_t (line 53) | modint_t operator*=(const int32_t m) { method modint_t (line 58) | modint_t operator+=(const int64_t m) { method modint_t (line 62) | modint_t operator-=(const int64_t m) { method modint_t (line 66) | modint_t operator*=(const int64_t m) { method modint_t (line 71) | modint_t operator+(const modint_t& m) const { return modint_t(*this) +... method modint_t (line 72) | modint_t operator-(const modint_t& m) const { return modint_t(*this) -... method modint_t (line 73) | modint_t operator*(const modint_t& m) const { return modint_t(*this) *... method modint_t (line 75) | modint_t operator+(const int32_t m) const { return modint_t(*this) += ... method modint_t (line 76) | modint_t operator-(const int32_t m) const { return modint_t(*this) -= ... method modint_t (line 77) | modint_t operator*(const int32_t m) const { return modint_t(*this) *= ... method modint_t (line 79) | modint_t operator+(const int64_t m) const { return modint_t(*this) += ... method modint_t (line 80) | modint_t operator-(const int64_t m) const { return modint_t(*this) -= ... method modint_t (line 81) | modint_t operator*(const int64_t m) const { return modint_t(*this) *= ... method modint_t (line 83) | modint_t inv() { return pw(modint_t(*this), mod - 2); } function precompute (line 90) | void precompute(int bound) { function mint (line 110) | mint C(int n, int k) { function main (line 117) | int main() { FILE: old_impl/math/fft.cpp type complex_base (line 8) | struct complex_base method complex_base (line 11) | complex_base(double _x = 0, double _y = 0) { x = _x; y = _y; } method complex_base (line 12) | complex_base operator-(const complex_base &a, const complex_base &b) {... method complex_base (line 13) | complex_base operator+(const complex_base &a, const complex_base &b) {... method complex_base (line 14) | complex_base operator*(const complex_base &a, const complex_base &b) {... function fft (line 22) | void fft(complex_base *a, int lg) function inv_fft (line 53) | void inv_fft(complex_base *a, int lg) function mult (line 89) | vector mult(vector a, vector b) function read (line 118) | void read() function solve (line 123) | void solve() function main (line 128) | int main() FILE: old_impl/math/fft_mod.cpp function chkmax (line 5) | inline void chkmax(T &x, const T2 &y) { if(x < y) x = y; } function chkmin (line 6) | inline void chkmin(T &x, const T2 &y) { if(x > y) x = y; } function addmod (line 11) | inline void addmod(int& x, int y, int mod) { (x += y) >= mod && (x -= mo... function mulmod (line 12) | inline int mulmod(int x, int y, int mod) { return x * 1ll * y % mod; } type complex_base (line 14) | struct complex_base method complex_base (line 17) | complex_base(double _x = 0, double _y = 0) { x = _x; y = _y; } method complex_base (line 18) | complex_base operator-(const complex_base &a, const complex_base &b) {... method complex_base (line 19) | complex_base operator+(const complex_base &a, const complex_base &b) {... method complex_base (line 20) | complex_base operator*(const complex_base &a, const complex_base &b) {... function fft (line 28) | void fft(complex_base *a, int lg) function inv_fft (line 59) | void inv_fft(complex_base *a, int lg) function mult (line 95) | vector mult(const vector &a, const vector &b) function mult_mod (line 124) | vector mult_mod(const vector &a, const vector &b) function read (line 177) | void read() function solve (line 182) | void solve() function main (line 187) | int main() FILE: old_impl/math/fft_xor.cpp function fft (line 11) | void fft(polynomial &a, int low, int high) function inv_fft (line 30) | void inv_fft(polynomial &a, int low, int high) function read (line 50) | void read() function solve (line 55) | void solve() function main (line 61) | int main() FILE: old_impl/math/fft_xor_mod.cpp function pow (line 14) | int pow(int x, int p) function inv (line 27) | int inv(int x, int mod) { return pow(x, mod - 2); } function fft (line 29) | void fft(polynomial &a, int low, int high) function inv_fft (line 48) | void inv_fft(polynomial &a, int low, int high) function read (line 68) | void read() function solve (line 73) | void solve() function main (line 80) | int main() FILE: old_impl/math/gauss_elimination_equations.cpp function gauss (line 8) | vector gauss(vector> &a) function read (line 55) | void read() function solve (line 60) | void solve() function main (line 65) | int main() FILE: old_impl/math/gauss_elimination_equations_mod.cpp function pow (line 8) | int64_t pow(int64_t base, int64_t p, int64_t MOD) function inv (line 15) | int64_t inv(int64_t x, int64_t MOD) { return pow(x, MOD - 2, MOD); } function gauss (line 17) | vector gauss(vector> &a, int64_t MOD) function read (line 69) | void read() function solve (line 74) | void solve() function main (line 79) | int main() FILE: old_impl/math/gauss_elimination_equations_mod_number_solutions.cpp function pow (line 8) | int64_t pow(int64_t base, int64_t p, int64_t MOD) function inv (line 15) | int64_t inv(int64_t x, int64_t MOD) { return pow(x, MOD - 2, MOD); } function gauss (line 17) | int64_t gauss(vector> &a, int64_t MOD) function read (line 71) | void read() function solve (line 76) | void solve() function main (line 81) | int main() FILE: old_impl/math/matrix_exponential.cpp type matrix (line 10) | struct matrix method matrix (line 15) | matrix(int _n, T val) {n = _n; t.assign(n, vector(n, val)); } method matrix (line 16) | matrix(int _n) {n = _n; t.assign(n, vector(n, 0)); } method matrix (line 17) | matrix() { n = 0; t.clear(); } method matrix (line 19) | matrix operator * (matrix b) method matrix (line 69) | matrix operator & (matrix b) function pow_min (line 82) | matrix pow_min(matrix base, int64_t p) function pow_max (line 96) | matrix pow_max(matrix base, int64_t p) function pow (line 110) | matrix pow(matrix base, int64_t p) function print (line 124) | void print(matrix mat) function read (line 134) | void read() function solve (line 139) | void solve() function main (line 144) | int main() FILE: old_impl/math/number_theory.cpp function pow (line 9) | int64_t pow(int64_t x, int64_t p, int64_t MOD) function get_divs (line 21) | vector get_divs(T x) function gcd (line 38) | int64_t gcd(int64_t a, int64_t b, int64_t &x, int64_t &y) function prepare (line 54) | void prepare() function gcd (line 67) | int64_t gcd(int64_t a, int64_t b) function get_phi (line 73) | int64_t get_phi(int64_t x) function pinv (line 88) | int64_t pinv(int64_t x, int64_t MOD) { return pow(x, MOD - 2, MOD); } function inv (line 90) | int64_t inv(int64_t x, int64_t MOD) function read (line 97) | void read() function solve (line 102) | void solve() function main (line 107) | int main() FILE: old_impl/strings/aho_corasick.cpp type aho_corasick (line 7) | struct aho_corasick method clear (line 12) | void clear() method aho_corasick (line 21) | aho_corasick() { psz = MAXN - 2; clear(); } method add_word (line 23) | void add_word(string s) method push_links (line 35) | void push_links() function read (line 68) | void read() function solve (line 77) | void solve() function main (line 85) | int main() FILE: old_impl/strings/aho_corasick_dynamic.cpp type aho_corasick_static (line 7) | struct aho_corasick_static method clear (line 12) | void clear() method aho_corasick_static (line 22) | aho_corasick_static() { psz = MAXN - 2; clear(); } method add_word (line 24) | void add_word(string s) method push_links (line 36) | void push_links() method count (line 66) | int count(string p) type aho_corasick (line 81) | struct aho_corasick method clear (line 86) | void clear() method aho_corasick (line 95) | aho_corasick() { clear(); } method add_word (line 97) | void add_word(string s) method count (line 125) | int count(string s) function read (line 138) | void read() function solve (line 147) | void solve() function main (line 157) | int main() FILE: old_impl/strings/kmp.cpp function read (line 9) | void read() { function failure_function (line 14) | vector failure_function(string p) { function match (line 38) | void match(vector f, string p, string s) { function solve (line 62) | void solve() { function main (line 67) | int main() { FILE: old_impl/strings/palindromic_tree.cpp type palindromic_tree (line 7) | struct palindromic_tree method clear (line 13) | void clear() method get_link (line 21) | int get_link(int v) method add_letter (line 28) | void add_letter(char c) function read (line 44) | void read() function solve (line 49) | void solve() function main (line 54) | int main() FILE: old_impl/strings/rabin_karp.cpp type rabin_karp (line 9) | struct rabin_karp method init (line 14) | void init(string s, int _base, int _mod) method get_hash (line 29) | int get_hash(int l, int r) function read (line 36) | void read() function solve (line 41) | void solve() function main (line 47) | int main() FILE: old_impl/strings/suffix_array.cpp type suffix_array (line 8) | struct suffix_array { method suffix_array (line 12) | suffix_array() { method suffix_array (line 18) | suffix_array(const string &s) : n(s.size()) { method lcp (line 46) | int lcp(int x, int y) { function read (line 63) | void read() { cin >> s; } function solve (line 65) | void solve() { function main (line 72) | int main() { FILE: old_impl/strings/suffix_array_hash.cpp type rabin_karp (line 9) | struct rabin_karp method init (line 14) | void init(string s, int _mod, int _base) method get_hash (line 31) | int get_hash(int l, int r) function cmp (line 42) | bool cmp(int i, int j) function kasai (line 64) | vector kasai(string s, vector sa) function build (line 92) | vector build(string s) function read (line 112) | void read() function solve (line 120) | void solve() function main (line 137) | int main() FILE: old_impl/strings/suffix_array_log2.cpp function read (line 10) | void read() function cmp (line 18) | bool cmp(int i, int j) function build_suffix_array (line 24) | void build_suffix_array() function build_lcp (line 49) | void build_lcp() function sparse_table (line 73) | void sparse_table() function LCP (line 87) | int LCP(int l, int r) function prepare (line 94) | void prepare() function solve (line 101) | void solve() function main (line 106) | int main() FILE: old_impl/strings/suffix_automaton.cpp type suffix_automaton (line 7) | struct suffix_automaton { method add_letter (line 12) | void add_letter(char c) { method clear (line 65) | void clear() { method init (line 73) | void init(string s) { method suffix_automaton (line 80) | suffix_automaton() { function read (line 86) | void read() {} function solve (line 90) | void solve() { sa.clear(); } function main (line 92) | int main() { FILE: old_impl/strings/trie.cpp type trie (line 5) | struct trie { method trie (line 9) | trie() { clear(); } method clear (line 11) | void clear() { method add (line 17) | void add(string s) { method del (line 31) | void del(string s) { method count (line 42) | int count(string s) { function read (line 57) | void read() {} function solve (line 59) | void solve() {} function main (line 61) | int main() { FILE: old_impl/tree/centroid_decomposition.cpp function read (line 10) | void read() { function pre_dfs (line 23) | void pre_dfs(int u, int pr) { function centroid (line 34) | int centroid(int u, int pr) { function decompose (line 46) | void decompose(int u, int pr = -1) { function solve (line 61) | void solve() {} function main (line 63) | int main() { FILE: old_impl/tree/dsu_on_tree.cpp function read (line 10) | void read() { function pre_dfs (line 24) | void pre_dfs(int u, int pr) { function add_vertex (line 34) | void add_vertex(int u) {} function clear (line 36) | void clear(int u, int pr) {} function add (line 38) | void add(int u, int pr) { function dfs (line 47) | void dfs(int u, int pr, int keep) { function solve (line 79) | void solve() { function main (line 84) | int main() { FILE: old_impl/tree/hld.cpp function chkmax (line 3) | inline int chkmax(T &x, const T2 &y) { return x < y ? x = y, 1 : 0; } function chkmin (line 4) | inline int chkmin(T &x, const T2 &y) { return x > y ? x = y, 1 : 0; } function read (line 10) | void read() function pre_dfs (line 24) | int pre_dfs(int u, int pr) function decompose (line 36) | void decompose(int u, int pr, int head) function upper (line 61) | inline int upper(int u, int v) { return st[u] <= st[v] && en[v] <= en[u]... function lca (line 63) | int lca(int u, int v) function hld_precompute (line 75) | void hld_precompute(int root) function get_path_up (line 81) | vector > get_path_up(int u, int anc) function get_path (line 93) | vector > get_path(int u, int v) function solve (line 112) | void solve() function main (line 117) | int main() FILE: old_impl/tree/lca-seg3.cpp function read (line 11) | void read() function pre_dfs (line 28) | void pre_dfs(int u, int pr) function upper (line 47) | inline bool upper(int u, int v) { return st[u] <= st[v] && en[v] <= en[u... function lca (line 49) | int lca(int u, int v) function get_path_up (line 61) | int get_path_up(int u, int anc) function get_path (line 76) | int get_path(int u, int v) function lca_precompute (line 83) | void lca_precompute(int root) function solve (line 89) | void solve() function main (line 94) | int main() FILE: old_impl/tree/link_cut_tree.cpp type node (line 8) | struct node { method node (line 11) | node() { method node (line 21) | node(int v) { function size (line 33) | int size(node *v) { return v ? v->sz : 0; } function push (line 35) | void push(node *&t) { function pull (line 51) | void pull(node *&v) { function merge (line 77) | void merge(node *&t, node *l, node *r) { function split (line 97) | void split(node *t, node *&l, node *&r, int k, int add = 0) { function node (line 115) | node *get_root(node *t) { method node (line 11) | node() { method node (line 21) | node(int v) { function node (line 125) | node *remove_right(node *t) { method node (line 11) | node() { method node (line 21) | node(int v) { function node (line 154) | node *remove_left(node *t) { method node (line 11) | node() { method node (line 21) | node(int v) { function node (line 179) | node *merge_trees(node *u, node *t) { method node (line 11) | node() { method node (line 21) | node(int v) { type link_cut_tree (line 188) | struct link_cut_tree { method node (line 191) | node *access(node *t) { method node (line 202) | node *find_root(node *u) { method make_root (line 212) | void make_root(node *u) { method link (line 218) | void link(node *u, node *w) { method cut (line 224) | void cut(node *p) { method depth (line 229) | int depth(node *u) { method node (line 234) | node *lca(node *u, node *v) { method init (line 249) | void init(int c) { method lca (line 254) | inline int lca(int u, int v) { return lca(ver[u], ver[v])->id; } method root (line 255) | inline int root(int u) { return find_root(ver[u])->id; } method link (line 256) | inline void link(int u, int v) { link(ver[u], ver[v]); } method make_root (line 257) | inline void make_root(int u) { make_root(ver[u]); } method depth (line 258) | inline int depth(int u) { return depth(ver[u]); } method cut (line 259) | inline void cut(int u) { cut(ver[u]); } function read (line 264) | void read() { cin >> n >> m; } function solve (line 268) | void solve() { function main (line 294) | int main() { FILE: old_impl/tree/virtual_tree.cpp function read (line 9) | void read() { function dfs_lca (line 23) | void dfs_lca(int u, int pr, int &dfs_time) { function upper (line 41) | inline bool upper(int u, int v) { function lca (line 45) | int lca(int u, int v) { function lca_precompute (line 63) | void lca_precompute(int root) { function build_tree (line 73) | int build_tree(vector vec) { function solve (line 119) | void solve() { function main (line 139) | int main() { FILE: other/bits/bit_trie.hpp class BitTrie (line 5) | class BitTrie { type node (line 7) | struct node { method node (line 11) | node() { method clear (line 19) | void clear() { trie = {node()}; } method BitTrie (line 21) | BitTrie() { clear(); } method add (line 23) | void add(T x, int cnt) { method T (line 37) | T max_xor(T x) { FILE: other/bits/xor_basis.hpp class XorBasis (line 5) | class XorBasis { method clear (line 10) | void clear() { method XorBasis (line 14) | XorBasis() { clear(); } method add (line 16) | void add(T val) { method size (line 30) | inline int size() { return sz; } method T (line 32) | T max_xor() { method can_create (line 43) | bool can_create(T val) { method get_basis (line 52) | vector get_basis() { method merge (line 62) | XorBasis merge(const XorBasis& other) { method get_bit (line 81) | typename enable_if::value, bool>::type get_bit( method is_zero (line 88) | typename enable_if::value, bool>::type is_zero(const T&... method xor_op (line 94) | typename enable_if::value, T>::type xor_op( method get_bit (line 102) | typename enable_if>::value, bool>::type get_bit( method is_zero (line 109) | typename enable_if>::value, bool>::type is_zero( method xor_op (line 116) | typename enable_if>::value, bitset>::type xor_op( FILE: other/dp_optimizations/LiChao_dynamic.cpp type LiChao_max (line 8) | struct LiChao_max type line (line 10) | struct line method line (line 13) | line() { a = 0; b = 0; } method line (line 14) | line(int _a, int _b) { a = _a; b = _b; } method eval (line 15) | int64_t eval(int x) { return a * 1ll * x + (int64_t)b; } type node (line 18) | struct node method node (line 22) | node() { f = line(); l = nullptr; r = nullptr; } method node (line 23) | node(int a, int b) { f = line(a, b); l = nullptr; r = nullptr; } method node (line 24) | node(line v) { f = v; l = nullptr; r = nullptr; } method init (line 30) | void init(int _sz) { sz = _sz + 1; root = nullptr; } method add_line (line 32) | void add_line(int a, int b) { line v = line(a, b); insert(v, -sz, sz, ... method query (line 33) | int64_t query(int x) { return query(x, -sz, sz, root); } method insert (line 35) | void insert(line &v, int l, int r, pnode &nd) method query (line 51) | int64_t query(int x, int l, int r, pnode &nd) type LiChao_min (line 62) | struct LiChao_min type line (line 64) | struct line method line (line 67) | line() { a = 0; b = 0; } method line (line 68) | line(int _a, int _b) { a = _a; b = _b; } method eval (line 69) | int64_t eval(int x) { return a * 1ll * x + (int64_t)b; } type node (line 72) | struct node method node (line 76) | node() { f = line(); l = nullptr; r = nullptr; } method node (line 77) | node(int a, int b) { f = line(a, b); l = nullptr; r = nullptr; } method node (line 78) | node(line v) { f = v; l = nullptr; r = nullptr; } method init (line 84) | void init(int _sz) { sz = _sz + 1; root = nullptr; } method add_line (line 86) | void add_line(int a, int b) { line v = line(a, b); insert(v, -sz, sz, ... method query (line 87) | int64_t query(int x) { return query(x, -sz, sz, root); } method insert (line 89) | void insert(line &v, int l, int r, pnode &nd) method query (line 105) | int64_t query(int x, int l, int r, pnode &nd) function read (line 116) | void read() function solve (line 121) | void solve() function main (line 126) | int main() FILE: other/dp_optimizations/LiChao_parabolic.cpp type LiChao_parabolic_min (line 9) | struct LiChao_parabolic_min { type Parabol (line 10) | struct Parabol { method Parabol (line 12) | Parabol() {a = 0; b = 0; c = inf;} method Parabol (line 13) | Parabol(T a, T b, T c) : a(a), b(b), c(c) {} method Parabol (line 14) | Parabol(const Parabol& rhs) { method T (line 19) | T query(T x) { type Node (line 23) | struct Node { method Node (line 26) | Node() : l(0), r(0) {} method T (line 27) | T query(T x) { method LiChao_parabolic_min (line 36) | LiChao_parabolic_min() : rt(0), offset(0) {} method Node (line 38) | Node* upd(Node* p, int l, int r, int L, int R, Parabol prb) { method Node (line 26) | Node() : l(0), r(0) {} method T (line 27) | T query(T x) { method T (line 75) | T query(Node* p, int i, int L, int R) { method upd (line 86) | void upd(T a, T b, T c) { method T (line 90) | T query(int i) { function read (line 95) | void read() function solve (line 100) | void solve() function main (line 105) | int main() FILE: other/dp_optimizations/LiChao_segment_tree_offline.cpp type LiChao_max (line 8) | struct LiChao_max type line (line 10) | struct line method line (line 13) | line() { a = 0; b = 0; } method line (line 14) | line(double _a, double _b) { a = _a; b = _b; } method eval (line 15) | double eval(int x) { return a * x + b; } method init (line 23) | void init(int l, int r, int idx) method init (line 35) | void init(vector Q) method add_line (line 47) | void add_line(double a, double b) { line v = line(a, b); insert(v, 1, ... method query (line 48) | double query(int x) { return query(x, 1, sz, 0); } method insert (line 50) | void insert(line &v, int l, int r, int idx) method query (line 65) | double query(int x, int l, int r, int idx) type LiChao_min (line 76) | struct LiChao_min type line (line 78) | struct line method line (line 81) | line() { a = 0; b = 0; } method line (line 82) | line(double _a, double _b) { a = _a; b = _b; } method eval (line 83) | double eval(int x) { return a * x + b; } method init (line 91) | void init(int l, int r, int idx) method init (line 103) | void init(vector Q) method add_line (line 115) | void add_line(double a, double b) { line v = line(a, b); insert(v, 1, ... method query (line 116) | double query(int x) { return query(x, 1, sz, 0); } method insert (line 118) | void insert(line &v, int l, int r, int idx) method query (line 133) | double query(int x, int l, int r, int idx) function read (line 144) | void read() function solve (line 149) | void solve() function main (line 154) | int main() FILE: other/dp_optimizations/convex_hull_trick_max.cpp type convex_hull_trick_max (line 8) | struct convex_hull_trick_max type line (line 10) | struct line method line (line 16) | line() {m = 0; b = 0; line_x = 0; is_query = 0; } method line (line 17) | line(int64_t _m, int64_t _b) {m = _m; b = _b; line_x = 0; is_query =... method value_at (line 25) | int64_t value_at(int64_t x) const { return m * x + b; } method parallel (line 28) | bool parallel(const line &l1, const line &l2) { return l1.m == l2.m; } method intersect_x (line 30) | double intersect_x(const line &l1, const line &l2) method clear (line 37) | void clear() { hull.clear(); } method init (line 38) | void init() { clear(); } method has_next (line 40) | bool has_next(set::iterator it) { return it != hull.end() && nex... method has_prev (line 41) | bool has_prev(set::iterator it) { return it != hull.end() && it ... method irrelevant (line 43) | bool irrelevant(const line &l1, const line &l2, const line &l3) { retu... method irrelevant (line 44) | bool irrelevant(set::iterator it) { return has_prev(it) && has_n... method update_border (line 46) | set::iterator update_border(set::iterator it) method add_line (line 61) | void add_line(int64_t m, int64_t b) method query (line 87) | int64_t query(int64_t x) function read (line 101) | void read() function solve (line 108) | void solve() function main (line 114) | int main() FILE: other/dp_optimizations/convex_hull_trick_min.cpp type convex_hull_trick_min (line 8) | struct convex_hull_trick_min type line (line 10) | struct line method line (line 16) | line() {m = 0; b = 0; line_x = 0; is_query = 0; } method line (line 17) | line(int64_t _m, int64_t _b) {m = _m; b = _b; line_x = 0; is_query =... method value_at (line 25) | int64_t value_at(int64_t x) const { return m * x + b; } method parallel (line 28) | bool parallel(const line &l1, const line &l2) { return l1.m == l2.m; } method intersect_x (line 30) | double intersect_x(const line &l1, const line &l2) method clear (line 37) | void clear() { hull.clear(); } method init (line 38) | void init() { clear(); } method has_next (line 40) | bool has_next(set::iterator it) { return it != hull.end() && nex... method has_prev (line 41) | bool has_prev(set::iterator it) { return it != hull.end() && it ... method irrelevant (line 43) | bool irrelevant(const line &l1, const line &l2, const line &l3) { retu... method irrelevant (line 44) | bool irrelevant(set::iterator it) { return has_prev(it) && has_n... method update_border (line 46) | set::iterator update_border(set::iterator it) method add_line (line 61) | void add_line(int64_t m, int64_t b) method query (line 87) | int64_t query(int64_t x) function read (line 101) | void read() function solve (line 108) | void solve() function main (line 114) | int main() FILE: other/dp_optimizations/divide_and_conquer_optimization.cpp function read (line 12) | void read() function rec (line 19) | void rec(int l, int r, int opt_l, int opt_r, int k) function solve (line 47) | void solve() function main (line 55) | int main() function Next (line 69) | void Next() { if(++pos_ind == maxl) fread(sir, 1, maxl, stdin), pos_ind ... function Read (line 70) | void Read(int &x) FILE: other/dp_optimizations/slope_trick.cpp function chkmin (line 11) | int chkmin(T &x, const T1 &y) { return x > y ? x = y, 1 : 0; } function chkmax (line 12) | int chkmax(T &x, const T1 &y) { return x < y ? x = y, 1 : 0; } type slope_trick (line 16) | struct slope_trick { method slope_trick (line 21) | slope_trick() { method T (line 27) | T zero_start() { method T (line 35) | T zero_end() { method size (line 43) | inline size_t size() { method add_simple (line 48) | void add_simple(const T ¢er, const T &height = 0) { method prefix_min (line 70) | void prefix_min() { method suffix_min (line 76) | void suffix_min() { method local_min (line 82) | void local_min(const T &strip_width) { method add (line 92) | void add(const slope_trick &other) { method add_with_destroy (line 96) | void add_with_destroy(slope_trick &other) { function read (line 104) | void read() { function solve (line 111) | void solve() { function main (line 122) | int main() { FILE: other/dp_optimizations/slope_trick_priority_queue.cpp function chkmin (line 11) | int chkmin(T &x, const T1 &y) { return x > y ? x = y, 1 : 0; } function chkmax (line 12) | int chkmax(T &x, const T1 &y) { return x < y ? x = y, 1 : 0; } type slope_trick (line 16) | struct slope_trick { method slope_trick (line 21) | slope_trick() { method T (line 27) | T zero_start() { method T (line 35) | T zero_end() { method add_simple (line 44) | void add_simple(const T ¢er, const T &height = 0) { method prefix_min (line 66) | void prefix_min() { method suffix_min (line 74) | void suffix_min() { method local_min (line 82) | void local_min(const T &strip_width) { function read (line 96) | void read() { function solve (line 103) | void solve() { function main (line 114) | int main() { FILE: other/queries/mo.cpp type query (line 7) | struct query method query (line 12) | query() {l = -1; r = -1; block = -1; idx = -1;} method query (line 13) | query(int _l, int _r, int i) function cmp (line 21) | bool cmp(query a, query b) function read (line 29) | void read() function add (line 37) | void add(int idx) function del (line 42) | void del(int idx) function solve (line 49) | void solve() function main (line 80) | int main() FILE: other/queries/mo_dsu.cpp type query (line 7) | struct query method query (line 10) | query() {l = 0; r = 0; idx = 0;} method query (line 11) | query(int _l, int _r, int _idx) type persistent_dsu (line 19) | struct persistent_dsu type state (line 21) | struct state method state (line 24) | state() {u = 0; ru = 0; v = 0; rv = 0;} method state (line 25) | state(int _u, int _ru, int _v, int _rv) method persistent_dsu (line 38) | persistent_dsu() method init (line 46) | void init(int _sz) method root (line 53) | int root(int x) method connected (line 59) | bool connected(int x, int y) method unite (line 64) | void unite(int x, int y) method snapshot (line 80) | void snapshot() { st.push(state(-1, -1, -1, -1)); } method rollback (line 82) | void rollback() type edge (line 99) | struct edge method edge (line 102) | edge() {u = 0; v = 0;} method edge (line 103) | edge(int _u, int _v) function read (line 114) | void read() function cmp (line 129) | bool cmp(query fir, query sec) function add (line 136) | void add(int idx) { d.unite(a[idx].u, a[idx].v); } function solve (line 138) | void solve() function main (line 192) | int main() FILE: other/queries/mo_online.cpp function read (line 11) | void read() type my_set (line 18) | struct my_set method my_set (line 22) | my_set() { answer = 0; cnt.clear(); } method insert (line 24) | void insert(int val) method erase (line 30) | void erase(int val) method clear (line 36) | void clear() method query (line 42) | int query() { return answer; } function query (line 49) | int query(int l, int r) function update (line 75) | void update(int mid, int pos, int val) function solve (line 81) | void solve() function main (line 125) | int main() FILE: other/queries/offline_centroid_queries.cpp function chkmin (line 8) | int chkmin(T &x, const T1 &y) { function chkmax (line 13) | int chkmax(T &x, const T1 &y) { function ostream (line 18) | ostream &operator<<(ostream &out, const pair &x) { function istream (line 23) | istream &operator>>(istream &in, pair &x) { function istream (line 28) | istream &operator>>(istream &in, vector &a) { function ostream (line 36) | ostream &operator<<(ostream &out, vector &a) { type basis (line 44) | struct basis { method init (line 48) | void init(int _max_log) { method add (line 53) | void add(T val) { method size (line 66) | inline int size() { method T (line 74) | T max_xor() { method can_create (line 85) | bool can_create(T val) { method get_basis (line 95) | vector get_basis() { method merge (line 105) | basis merge(basis other) { function read (line 126) | void read() { function get_size (line 145) | int get_size(int v, int p) { function dfs_basis (line 155) | void dfs_basis(int v, int p, basis pref_bs) { function dfs_marker (line 166) | void dfs_marker(int v, int p, int mark) { function decompose (line 175) | void decompose(int u, vector qidx) { function solve (line 236) | void solve() { function main (line 266) | int main() { FILE: other/utils/count_inversions.cpp function count_inversions (line 4) | int64_t count_inversions(int *start, int *end) { FILE: strings/aho_corasick.hpp class AhoCorasick (line 5) | class AhoCorasick { type State (line 11) | struct State { method State (line 15) | State() : link(0), word_id(-1) {} method AhoCorasick (line 21) | AhoCorasick() { clear(); } method clear (line 23) | void clear() { method add_word (line 28) | void add_word(const T& word, int id = -1) { method build (line 40) | void build() { method go (line 64) | int go(int u, const G& c) const { method link (line 71) | int link(int u) const { return states[u].link; } method word_id (line 72) | int word_id(int u) const { return states[u].word_id; } method size (line 73) | int size() const { return states.size(); } method traverse (line 75) | vector traverse(const T& text) const { method build_link_tree (line 86) | vector> build_link_tree() const { FILE: strings/hashing.hpp class HashMeta (line 4) | class HashMeta { method set_random_base (line 6) | void set_random_base() { method precompute_base_pow (line 18) | void precompute_base_pow(size_t n) { method add (line 26) | static constexpr uint64_t add(uint64_t a, uint64_t b) { method sub (line 32) | static constexpr uint64_t sub(uint64_t a, uint64_t b) { method mul (line 36) | static constexpr uint64_t mul(uint64_t a, uint64_t b) { class hash_t (line 47) | class hash_t { method hash_t (line 51) | hash_t() : h(0) {} method hash_t (line 52) | hash_t(uint64_t h) : h(h) {} method hash_t (line 55) | hash_t& operator+=(const hash_t& other) { method hash_t (line 60) | hash_t& operator-=(const hash_t& other) { method hash_t (line 65) | hash_t& operator*=(const hash_t& other) { method hash_t (line 70) | hash_t operator+(const hash_t& other) const { method hash_t (line 73) | hash_t operator-(const hash_t& other) const { method hash_t (line 76) | hash_t operator*(const hash_t& other) const { method init (line 91) | void init(size_t n) { method rabin_karp (line 97) | vector rabin_karp(const T& container) { method hash_t (line 106) | hash_t hash_range(int l, int r, const vector& h) { method hash_t (line 51) | hash_t() : h(0) {} method hash_t (line 52) | hash_t(uint64_t h) : h(h) {} method hash_t (line 55) | hash_t& operator+=(const hash_t& other) { method hash_t (line 60) | hash_t& operator-=(const hash_t& other) { method hash_t (line 65) | hash_t& operator*=(const hash_t& other) { method hash_t (line 70) | hash_t operator+(const hash_t& other) const { method hash_t (line 73) | hash_t operator-(const hash_t& other) const { method hash_t (line 76) | hash_t operator*(const hash_t& other) const { FILE: strings/suffix_array.hpp class SuffixArray (line 5) | class SuffixArray { method build_sa (line 11) | void build_sa(const T& s) { method build_lcp (line 45) | void build_lcp(const T& s) { method SuffixArray (line 69) | SuffixArray() : n(0) {} method SuffixArray (line 70) | SuffixArray(const T& s) { init(s); } method clear (line 72) | void clear() { method init (line 79) | void init(const T& s) { FILE: strings/suffix_automaton.hpp class SuffixAutomaton (line 5) | class SuffixAutomaton { type State (line 11) | struct State { method State (line 15) | State(int l = 0, int lnk = -1) : len(l), link(lnk) {} method check_replace_with_clone (line 18) | int check_replace_with_clone(int p, G c) { method SuffixAutomaton (line 39) | SuffixAutomaton() : last(0) { clear(); } method SuffixAutomaton (line 40) | SuffixAutomaton(const T& s) { init(s); } method add_letter (line 42) | void add_letter(G c) { method add_string (line 67) | void add_string(const T& s) { method clear (line 74) | void clear() { method init (line 80) | void init(const T& s) { method build_suffix_link_tree (line 85) | vector> build_suffix_link_tree() { method states_by_length (line 93) | vector> states_by_length() { FILE: tree/centroid_decomposition.hpp class CentroidDecomposition (line 6) | class CentroidDecomposition { method dfs (line 13) | int dfs(int u, int pr) { method find_centroid (line 23) | int find_centroid(int u, int pr, int n) { method CentroidDecomposition (line 35) | CentroidDecomposition(vector> adj = {}, int root = 0) method decompose (line 47) | void decompose(int u, int prev_cen = -1, int depth = 0) { FILE: tree/euler_order_segment_tree.cpp function chkmin (line 4) | int chkmin(T &x, const T1 &y) { function chkmax (line 8) | int chkmax(T &x, const T1 &y) { function read (line 17) | void read() { function pre_dfs (line 29) | void pre_dfs(int u, int pr, int d = 0) { type segment_tree (line 46) | struct segment_tree { type node (line 47) | struct node { method node (line 49) | node() { l = m = r = lm = mr = lmr = -inf; } method node (line 51) | node(int d) { method node (line 61) | node merge(node a, node b) { method node (line 49) | node() { l = m = r = lm = mr = lmr = -inf; } method node (line 51) | node(int d) { method push (line 81) | void push(int l, int r, int idx) { method init (line 91) | void init(int l, int r, int idx, const vector> &dat) { method update (line 104) | void update(int pos, int l, int r, int idx) { method update (line 120) | void update(int ql, int qr, int l, int r, int idx) { function solve (line 141) | void solve() { function main (line 146) | int main() { FILE: tree/lca.hpp class LCAUtils (line 4) | class LCAUtils { method dfs_lca (line 9) | void dfs_lca(int u, int pr, int& dfs_time) { method LCAUtils (line 30) | LCAUtils() : n(0) {} method LCAUtils (line 31) | LCAUtils(int _n) { init(_n); } method LCAUtils (line 32) | LCAUtils(int _n, const vector>& _adj, int root = 0) { method init (line 38) | void init(int _n) { method add_edge (line 43) | void add_edge(int u, int v) { method prepare (line 48) | void prepare(int root = 1) { method lca (line 62) | int lca(int u, int v) { method upper (line 80) | inline bool upper(int u, int v) { FILE: tree/lca_sparse_table.hpp class LCAUtilsRMQ (line 5) | class LCAUtilsRMQ { method _min_custom (line 7) | static pair _min_custom(pair a, pair b) { method pre_dfs (line 15) | void pre_dfs(int u, int pr = -1, int d = 0) { method LCAUtilsRMQ (line 32) | LCAUtilsRMQ() { n = 0; } method LCAUtilsRMQ (line 33) | LCAUtilsRMQ(int _n) { init(_n); } method LCAUtilsRMQ (line 34) | LCAUtilsRMQ(int _n, const vector>& _adj) { method add_edge (line 39) | void add_edge(int u, int v) { method init (line 44) | void init(int _n) { method prepare (line 50) | void prepare(int root = 0) { method lca (line 58) | int lca(int u, int v) { method dist (line 65) | int dist(int u, int v) { return dep[u] + dep[v] - 2 * dep[lca(u, v)]; } FILE: tree/line_tree.hpp class LineTree (line 6) | class LineTree { method LineTree (line 16) | LineTree() {} method LineTree (line 17) | LineTree( method init (line 23) | void init( method min_value (line 57) | int min_value(int u, int v) { return vals[helper_lca.lca(u, v)]; } method min_node (line 59) | int min_node(int u, int v) { return helper_lca.lca(u, v); } FILE: tree/link_cut_tree.hpp class LinkCutTree (line 10) | class LinkCutTree { type Node (line 14) | struct Node { method Node (line 23) | Node(T val = e(), int id = -1) method push (line 36) | void push(Node* x) { method pull (line 63) | void pull(Node* x) { method state (line 79) | inline int state(Node* n) { method is_root (line 92) | bool is_root(Node* x) { return state(x) == 0; } method rotate (line 94) | void rotate(Node* x) { method splay (line 124) | void splay(Node* x) { method Node (line 147) | Node* expose(Node* x) { method Node (line 23) | Node(T val = e(), int id = -1) method apply_lazy_to_node (line 165) | void apply_lazy_to_node(Node* node, const G& lazy_val) { method add_light (line 173) | void add_light(Node* c, Node* light) { method erase_light (line 177) | void erase_light(Node* c, Node* light) { method LinkCutTree (line 182) | LinkCutTree(int n) : nodes(n) { method LinkCutTree (line 188) | LinkCutTree(const vector& values) : nodes(values.size()) { method Node (line 194) | Node* access(int x) { method Node (line 23) | Node(T val = e(), int id = -1) method reroot (line 200) | void reroot(int x) { method link (line 206) | void link(int u, int v) { method cut (line 215) | void cut(int u, int v) { method connected (line 224) | bool connected(int u, int v) { method lca (line 233) | int lca(int u, int v) { method T (line 242) | T path_query(int u, int v) { method update (line 248) | void update(int u, const T& val) { method path_update (line 254) | void path_update(int u, int v, const G& lazy_val) { method T (line 260) | T get(int u) { method get_root (line 265) | int get_root(int u) { method jump (line 277) | int jump(int u, int v, int k) { method Node (line 299) | Node* get_node(int idx) { return &nodes[idx]; } method Node (line 23) | Node(T val = e(), int id = -1) method size (line 301) | int size() const { return nodes.size(); } method change_light (line 304) | void change_light(Node* pp, Node* p, Node* x) { method print_node (line 309) | void print_node(Node* node, int indent = 0) { method print_tree (line 324) | void print_tree(Node* node, int indent = 0) { FILE: tree/vertex_add_path_sum.hpp class VertexAddPathSum (line 7) | class VertexAddPathSum : LCAUtils { method VertexAddPathSum (line 12) | VertexAddPathSum() {} method prepare (line 14) | void prepare(int root = 1) { method query (line 19) | int query(int u, int v) { method update (line 30) | void update(int u, int x) { ft.update(in_time[u], out_time[u], x); } FILE: tree/virtual_tree.hpp class VirtualTree (line 5) | class VirtualTree : public LCAUtils { method VirtualTree (line 7) | VirtualTree() : LCAUtils() {} method VirtualTree (line 8) | VirtualTree(int n) : LCAUtils(n) {} method VirtualTree (line 9) | VirtualTree(int n, const vector>& adj, int root = 0) method add_edge (line 14) | void add_edge(int u, int v) { LCAUtils::add_edge(u, v); } method build (line 16) | pair>, vector> build(const vector& vertic...