towns.cpp:1:1: error: 'vector' does not name a type
1 | vector<int> vec;
| ^~~~~~
towns.cpp:2:5: error: expected unqualified-id before 'while'
2 | while (ids.size() > 1) {
| ^~~~~
towns.cpp:14:5: error: expected unqualified-id before 'if'
14 | if (ids.empty()) {
| ^~
towns.cpp:17:13: error: 'ids' was not declared in this scope
17 | int e = ids.back();
| ^~~
towns.cpp:18:9: error: expected constructor, destructor, or type conversion before '(' token
18 | iota(par.begin(), par.end(), 0);
| ^
towns.cpp:19:5: error: 'sz' does not name a type
19 | sz = vector<int>(n, 1);
| ^~
towns.cpp:20:5: error: expected unqualified-id before 'for'
20 | for (int i = 0; i < n; i++) {
| ^~~
towns.cpp:20:21: error: 'i' does not name a type
20 | for (int i = 0; i < n; i++) {
| ^
towns.cpp:20:28: error: 'i' does not name a type
20 | for (int i = 0; i < n; i++) {
| ^
towns.cpp:28:5: error: expected unqualified-id before 'return'
28 | return *max_element(sz.begin(), sz.end()) <= n / 2;
| ^~~~~~