minerals.cpp:5:24: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
5 | void dfs(int l, int r, auto b, bool on) {
| ^~~~
minerals.cpp: In function 'void dfs(int, int, auto:1, bool)':
minerals.cpp:15:7: error: 'vector' is not a member of 'std'
15 | std::vector<int> bL, bR;
| ^~~~~~
minerals.cpp:2:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
1 | #include "minerals.h"
+++ |+#include <vector>
2 |
minerals.cpp:15:14: error: expected primary-expression before 'int'
15 | std::vector<int> bL, bR;
| ^~~
minerals.cpp:19:9: error: 'bR' was not declared in this scope; did you mean 'b'?
19 | (size(bR) == r - m || (size(bL) != m - l && (prev == (last = Query(i))) ^ on) ? bL : bR).push_back(i);
| ^~
| b
minerals.cpp:19:4: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
19 | (size(bR) == r - m || (size(bL) != m - l && (prev == (last = Query(i))) ^ on) ? bL : bR).push_back(i);
| ^~~~
minerals.cpp:19:4: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
minerals.cpp:19:31: error: 'bL' was not declared in this scope; did you mean 'b'?
19 | (size(bR) == r - m || (size(bL) != m - l && (prev == (last = Query(i))) ^ on) ? bL : bR).push_back(i);
| ^~
| b
minerals.cpp:19:26: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
19 | (size(bR) == r - m || (size(bL) != m - l && (prev == (last = Query(i))) ^ on) ? bL : bR).push_back(i);
| ^~~~
minerals.cpp:21:12: error: 'bL' was not declared in this scope; did you mean 'b'?
21 | dfs(l, m, bL, on ^ 1);
| ^~
| b
minerals.cpp:22:12: error: 'bR' was not declared in this scope; did you mean 'b'?
22 | dfs(m, r, bR, on);
| ^~
| b
minerals.cpp: In function 'void Solve(int)':
minerals.cpp:26:7: error: 'vector' is not a member of 'std'
26 | std::vector<int> b;
| ^~~~~~
minerals.cpp:26:7: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
minerals.cpp:26:14: error: expected primary-expression before 'int'
26 | std::vector<int> b;
| ^~~
minerals.cpp:28:38: error: 'b' was not declared in this scope
28 | if(R == N - 1 || Query(i) < R + 2) b.push_back(i);
| ^
minerals.cpp:30:12: error: 'b' was not declared in this scope
30 | dfs(0, N, b, 1);
| ^