split.cpp:6:9: error: 'pair' does not name a type
6 | typedef pair<int, int> pii;
| ^~~~
split.cpp:17:8: error: 'pii' was not declared in this scope
17 | vector<pii> f;
| ^~~
split.cpp:17:11: error: template argument 1 is invalid
17 | vector<pii> f;
| ^
split.cpp:17:11: error: template argument 2 is invalid
split.cpp: In function 'int dfs(int)':
split.cpp:33:14: error: invalid types 'int[int]' for array subscript
33 | if((ret >= f[0].ff && n - ret >= f[1].ff) || (ret >= f[1].ff && n - ret >= f[0].ff)) v = a;
| ^
split.cpp:33:36: error: invalid types 'int[int]' for array subscript
33 | if((ret >= f[0].ff && n - ret >= f[1].ff) || (ret >= f[1].ff && n - ret >= f[0].ff)) v = a;
| ^
split.cpp:33:56: error: invalid types 'int[int]' for array subscript
33 | if((ret >= f[0].ff && n - ret >= f[1].ff) || (ret >= f[1].ff && n - ret >= f[0].ff)) v = a;
| ^
split.cpp:33:78: error: invalid types 'int[int]' for array subscript
33 | if((ret >= f[0].ff && n - ret >= f[1].ff) || (ret >= f[1].ff && n - ret >= f[0].ff)) v = a;
| ^
split.cpp:34:14: error: invalid types 'int[int]' for array subscript
34 | if((ret >= f[1].ff && n - ret >= f[0].ff)) r = 1;
| ^
split.cpp:34:36: error: invalid types 'int[int]' for array subscript
34 | if((ret >= f[1].ff && n - ret >= f[0].ff)) r = 1;
| ^
split.cpp: In function 'std::vector<int> find_split(int, int, int, int, std::vector<int>, std::vector<int>)':
split.cpp:51:29: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment
51 | f = {{a, 1}, {b, 2}, {c, 3}};
| ^
split.cpp:10:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
10 | #define FOR(i, n) for (int i = 0; i < n; i++)
......
57 | FOR(i, p.size()){
| ~~~~~~~~~~~
split.cpp:57:2: note: in expansion of macro 'FOR'
57 | FOR(i, p.size()){
| ^~~
split.cpp:9:18: error: request for member 'begin' in 'f', which is of non-class type 'int'
9 | #define all(v) v.begin(), v.end()
| ^~~~~
split.cpp:61:7: note: in expansion of macro 'all'
61 | sort(all(f));
| ^~~
split.cpp:9:29: error: request for member 'end' in 'f', which is of non-class type 'int'
9 | #define all(v) v.begin(), v.end()
| ^~~
split.cpp:61:7: note: in expansion of macro 'all'
61 | sort(all(f));
| ^~~
split.cpp:67:14: error: invalid types 'int[int]' for array subscript
67 | coldfs(v, f[1].ss);
| ^
split.cpp:68:14: error: invalid types 'int[int]' for array subscript
68 | coldfs(0, f[0].ss);
| ^
split.cpp:71:14: error: invalid types 'int[int]' for array subscript
71 | coldfs(v, f[0].ss);
| ^
split.cpp:72:14: error: invalid types 'int[int]' for array subscript
72 | coldfs(0, f[1].ss);
| ^
split.cpp:74:38: error: invalid types 'int[int]' for array subscript
74 | FOR(i, n) if(res[i] == 0) res[i] = f[2].ss;
| ^