File tree Expand file tree Collapse file tree 1 file changed +7
-16
lines changed
Expand file tree Collapse file tree 1 file changed +7
-16
lines changed Original file line number Diff line number Diff line change 1- template <typename T>
2- class Fenwick {
3- public:
1+ template <typename T> class Fenwick {
2+ public:
43 vector<T> fenw;
54 int n;
65
7- Fenwick (int _n) : n(_n) {
8- fenw.resize (n);
9- }
6+ Fenwick (int _n) : n(_n) { fenw.resize (n); }
107 void modify (int x, T v) {
118 while (x < n) {
129 fenw[x] += v;
@@ -29,17 +26,11 @@ class Fenwick {
2926 // }
3027};
3128
32- template <typename T>
33- using fenwick = Fenwick<T>;
29+ template <typename T> using fenwick = Fenwick<T>;
3430
3531struct node {
3632 // don't forget to set default value
3733 int a = ...;
38- inline void operator +=(const node &other) {
39- ...
40- }
41- inline node operator -(const node &other) {
42- ...
43- return *this ;
44- }
45- };
34+ inline void operator +=(const node &other) { ... }
35+ inline node operator -(const node &other) { ... return *this ; }
36+ };
You can’t perform that action at this time.
0 commit comments