minmaxtree.cpp: In member function 'char qry::scanf()':
minmaxtree.cpp:13:38: error: no matching function for call to 'qry::scanf(const char [12], char [10], int*, int*, int*)'
13 | scanf("%s %d %d %d", in, &x, &y, &z);
| ^
minmaxtree.cpp:11:7: note: candidate: 'char qry::scanf()'
11 | char scanf() {
| ^~~~~
minmaxtree.cpp:11:7: note: candidate expects 0 arguments, 5 provided
minmaxtree.cpp: At global scope:
minmaxtree.cpp:19:8: error: 'query' was not declared in this scope; did you mean 'qry'?
19 | vector<query> qs[256];
| ^~~~~
| qry
minmaxtree.cpp:19:13: error: template argument 1 is invalid
19 | vector<query> qs[256];
| ^
minmaxtree.cpp:19:13: error: template argument 2 is invalid
minmaxtree.cpp: In member function 'int matching::dfs(int)':
minmaxtree.cpp:87:68: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
87 | for (int i : edge[x]) if (rev[i] == 0 || lv[rev[i]] == lv[x] + 1 && dfs(rev[i])) {
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
minmaxtree.cpp: In function 'int main()':
minmaxtree.cpp:124:3: error: 'query' was not declared in this scope; did you mean 'qry'?
124 | query q;
| ^~~~~
| qry
minmaxtree.cpp:125:12: error: 'q' was not declared in this scope
125 | char c = q.scan();
| ^
minmaxtree.cpp:126:6: warning: array subscript has type 'char' [-Wchar-subscripts]
126 | qs[c].push_back(q);
| ^
minmaxtree.cpp:126:9: error: request for member 'push_back' in 'qs[((int)c)]', which is of non-class type 'int'
126 | qs[c].push_back(q);
| ^~~~~~~~~
minmaxtree.cpp:132:15: error: request for member 'begin' in 'qs[109]', which is of non-class type 'int'
132 | sort(qs['m'].begin(), qs['m'].end(), [&](const query &x, const query &y) {
| ^~~~~
minmaxtree.cpp:132:32: error: request for member 'end' in 'qs[109]', which is of non-class type 'int'
132 | sort(qs['m'].begin(), qs['m'].end(), [&](const query &x, const query &y) {
| ^~~
minmaxtree.cpp:132:49: error: 'query' does not name a type; did you mean 'qry'?
132 | sort(qs['m'].begin(), qs['m'].end(), [&](const query &x, const query &y) {
| ^~~~~
| qry
minmaxtree.cpp: In lambda function:
minmaxtree.cpp:134:4: error: expected '{' before ';' token
134 | });
| ^
minmaxtree.cpp: In function 'int main()':
minmaxtree.cpp:134:4: error: expected ')' before ';' token
134 | });
| ^
| )
minmaxtree.cpp:132:6: note: to match this '('
132 | sort(qs['m'].begin(), qs['m'].end(), [&](const query &x, const query &y) {
| ^
minmaxtree.cpp:135:15: error: request for member 'begin' in 'qs[77]', which is of non-class type 'int'
135 | sort(qs['M'].begin(), qs['M'].end(), [&](const query &x, const query &y) {
| ^~~~~
minmaxtree.cpp:135:32: error: request for member 'end' in 'qs[77]', which is of non-class type 'int'
135 | sort(qs['M'].begin(), qs['M'].end(), [&](const query &x, const query &y) {
| ^~~
minmaxtree.cpp:135:49: error: 'query' does not name a type; did you mean 'qry'?
135 | sort(qs['M'].begin(), qs['M'].end(), [&](const query &x, const query &y) {
| ^~~~~
| qry
minmaxtree.cpp: In lambda function:
minmaxtree.cpp:137:4: error: expected '{' before ';' token
137 | });
| ^
minmaxtree.cpp: In function 'int main()':
minmaxtree.cpp:137:4: error: expected ')' before ';' token
137 | });
| ^
| )
minmaxtree.cpp:135:6: note: to match this '('
135 | sort(qs['M'].begin(), qs['M'].end(), [&](const query &x, const query &y) {
| ^
minmaxtree.cpp:138:7: error: 'query' was not declared in this scope; did you mean 'qry'?
138 | for (query i : qs['m']) {
| ^~~~~
| qry
minmaxtree.cpp:143:2: error: expected primary-expression before 'for'
143 | for (query i : qs['M']) {
| ^~~
minmaxtree.cpp:142:3: error: expected ';' before 'for'
142 | }
| ^
| ;
143 | for (query i : qs['M']) {
| ~~~
minmaxtree.cpp:143:2: error: expected primary-expression before 'for'
143 | for (query i : qs['M']) {
| ^~~
minmaxtree.cpp:142:3: error: expected ')' before 'for'
142 | }
| ^
| )
143 | for (query i : qs['M']) {
| ~~~
minmaxtree.cpp:138:6: note: to match this '('
138 | for (query i : qs['m']) {
| ^
minmaxtree.cpp:143:12: error: expected ';' before 'i'
143 | for (query i : qs['M']) {
| ^~
| ;
minmaxtree.cpp:148:2: error: expected primary-expression before 'for'
148 | for (int i = 2; i <= n; i++) {
| ^~~
minmaxtree.cpp:147:3: error: expected ';' before 'for'
147 | }
| ^
| ;
148 | for (int i = 2; i <= n; i++) {
| ~~~
minmaxtree.cpp:148:2: error: expected primary-expression before 'for'
148 | for (int i = 2; i <= n; i++) {
| ^~~
minmaxtree.cpp:147:3: error: expected ')' before 'for'
147 | }
| ^
| )
148 | for (int i = 2; i <= n; i++) {
| ~~~
minmaxtree.cpp:143:6: note: to match this '('
143 | for (query i : qs['M']) {
| ^
minmaxtree.cpp:154:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
154 | for (int i = 1; i < cp.size(); i++) mn[mt.rev[i]] = cp[i];
| ~~^~~~~~~~~~~
minmaxtree.cpp:113:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
113 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
minmaxtree.cpp:115:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
115 | scanf("%d %d", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~
minmaxtree.cpp:121:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
121 | scanf("%d", &k);
| ~~~~~^~~~~~~~~~