team.cpp: In member function 'void seg::upd2(int, int, int, int, int, int)':
team.cpp:83:9: error: base operand of '->' is not a pointer
83 | if(!v->l)v->l = new tdnode();
| ^~
team.cpp:83:14: error: base operand of '->' is not a pointer
83 | if(!v->l)v->l = new tdnode();
| ^~
team.cpp:84:24: error: invalid conversion from 'node*' to 'int' [-fpermissive]
84 | upd2(x, y, z, t[v]->l, tl, m);
| ~~~~~~^
| |
| node*
team.cpp:76:37: note: initializing argument 4 of 'void seg::upd2(int, int, int, int, int, int)'
76 | void upd2(int x, int y, int z, int v = 1, int tl = 0, int tr = g2.size()) {
| ~~~~^~~~~
team.cpp:86:9: error: base operand of '->' is not a pointer
86 | if(!v->r)v->r = new tdnode();
| ^~
team.cpp:86:14: error: base operand of '->' is not a pointer
86 | if(!v->r)v->r = new tdnode();
| ^~
team.cpp:87:24: error: invalid conversion from 'node*' to 'int' [-fpermissive]
87 | upd2(x, y, z, t[v]->r, m + 1, tr);
| ~~~~~~^
| |
| node*
team.cpp:76:37: note: initializing argument 4 of 'void seg::upd2(int, int, int, int, int, int)'
76 | void upd2(int x, int y, int z, int v = 1, int tl = 0, int tr = g2.size()) {
| ~~~~^~~~~
team.cpp: In member function 'int seg::get2(int, int, int, int, int, int, int)':
team.cpp:97:41: error: invalid conversion from 'node*' to 'int' [-fpermissive]
97 | return max(get2(lx, rx, ly, ry, t[v]->l, tl , m), get2(lx, rx, ly, ry, t[v]->r, m + 1, tr));
| ~~~~~~^
| |
| node*
team.cpp:91:47: note: initializing argument 5 of 'int seg::get2(int, int, int, int, int, int, int)'
91 | int get2(int lx, int rx, int ly, int ry, int v, int tl = 0, int tr = g2.size()) {
| ~~~~^
team.cpp:97:80: error: invalid conversion from 'node*' to 'int' [-fpermissive]
97 | return max(get2(lx, rx, ly, ry, t[v]->l, tl , m), get2(lx, rx, ly, ry, t[v]->r, m + 1, tr));
| ~~~~~~^
| |
| node*
team.cpp:91:47: note: initializing argument 5 of 'int seg::get2(int, int, int, int, int, int, int)'
91 | int get2(int lx, int rx, int ly, int ry, int v, int tl = 0, int tr = g2.size()) {
| ~~~~^
team.cpp: In function 'int main()':
team.cpp:132:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
132 | for(int i = 1; i <= g.size(); i++) {
| ~~^~~~~~~~~~~
team.cpp:134:47: error: no matching function for call to 'seg::get2(int, const int&, int, const int&)'
134 | int z = rot.get2(sb[u] + 1, M, sc[u] + 1, M);
| ^
team.cpp:91:6: note: candidate: 'int seg::get2(int, int, int, int, int, int, int)'
91 | int get2(int lx, int rx, int ly, int ry, int v, int tl = 0, int tr = g2.size()) {
| ^~~~
team.cpp:91:6: note: candidate expects 7 arguments, 4 provided