chameleon.cpp:6:24: error: 'N' was not declared in this scope
std::vector<int> edges[N];
^
chameleon.cpp:7:9: error: 'N' was not declared in this scope
int col[N];
^
chameleon.cpp: In function 'void dfs(int, int)':
chameleon.cpp:10:7: error: 'col' was not declared in this scope
if (col[u] != -1) return;
^~~
chameleon.cpp:10:7: note: suggested alternative: 'bool'
if (col[u] != -1) return;
^~~
bool
chameleon.cpp:11:3: error: 'col' was not declared in this scope
col[u] = c;
^~~
chameleon.cpp:11:3: note: suggested alternative: 'bool'
col[u] = c;
^~~
bool
chameleon.cpp:12:17: error: 'edges' was not declared in this scope
for (auto &v: edges[u]) dfs(v, c ^ 1);
^~~~~
chameleon.cpp: In function 'bool check(std::vector<int>, int)':
chameleon.cpp:17:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return Query(v) == v.size();
~~~~~~~~~^~~~~~~~~~~
chameleon.cpp: In function 'void Solve(int)':
chameleon.cpp:22:33: error: 'col' was not declared in this scope
for (int j = 1; j < i; ++j) col[j] = -1;
^~~
chameleon.cpp:22:33: note: suggested alternative: 'bool'
for (int j = 1; j < i; ++j) col[j] = -1;
^~~
bool
chameleon.cpp:24:11: error: 'col' was not declared in this scope
if (col[j] == -1) dfs(j, 0);
^~~
chameleon.cpp:24:11: note: suggested alternative: 'bool'
if (col[j] == -1) dfs(j, 0);
^~~
bool
chameleon.cpp:28:11: error: 'col' was not declared in this scope
if (col[j] == 0) X.push_back(j);
^~~
chameleon.cpp:28:11: note: suggested alternative: 'bool'
if (col[j] == 0) X.push_back(j);
^~~
bool
chameleon.cpp:39:9: error: 'edges' was not declared in this scope
edges[i].push_back(X[left - 1]);
^~~~~
chameleon.cpp:49:9: error: 'edges' was not declared in this scope
if (edges[i].size() == 3) {
^~~~~
chameleon.cpp:52:22: error: 'u2' was not declared in this scope
if (Query({u1, u2, i}) == 1) v = u3;
^~
chameleon.cpp:52:22: note: suggested alternative: 'u1'
if (Query({u1, u2, i}) == 1) v = u3;
^~
u1
chameleon.cpp:52:28: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type '<brace-enclosed initializer list>'
if (Query({u1, u2, i}) == 1) v = u3;
^
In file included from chameleon.cpp:1:0:
chameleon.h:9:5: note: in passing argument 1 of 'int Query(const std::vector<int>&)'
int Query(const std::vector<int> &p);
^~~~~
chameleon.cpp:52:40: error: 'u3' was not declared in this scope
if (Query({u1, u2, i}) == 1) v = u3;
^~
chameleon.cpp:52:40: note: suggested alternative: 'u1'
if (Query({u1, u2, i}) == 1) v = u3;
^~
u1
chameleon.cpp:53:18: error: 'u2' was not declared in this scope
if (Query({u2, u3, i}) == 1) v = u1;
^~
chameleon.cpp:53:18: note: suggested alternative: 'u1'
if (Query({u2, u3, i}) == 1) v = u1;
^~
u1
chameleon.cpp:53:22: error: 'u3' was not declared in this scope
if (Query({u2, u3, i}) == 1) v = u1;
^~
chameleon.cpp:53:22: note: suggested alternative: 'u1'
if (Query({u2, u3, i}) == 1) v = u1;
^~
u1
chameleon.cpp:53:28: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type '<brace-enclosed initializer list>'
if (Query({u2, u3, i}) == 1) v = u1;
^
In file included from chameleon.cpp:1:0:
chameleon.h:9:5: note: in passing argument 1 of 'int Query(const std::vector<int>&)'
int Query(const std::vector<int> &p);
^~~~~
chameleon.cpp:54:18: error: 'u3' was not declared in this scope
if (Query({u3, u1, i}) == 1) v = u2;
^~
chameleon.cpp:54:18: note: suggested alternative: 'u1'
if (Query({u3, u1, i}) == 1) v = u2;
^~
u1
chameleon.cpp:54:28: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type '<brace-enclosed initializer list>'
if (Query({u3, u1, i}) == 1) v = u2;
^
In file included from chameleon.cpp:1:0:
chameleon.h:9:5: note: in passing argument 1 of 'int Query(const std::vector<int>&)'
int Query(const std::vector<int> &p);
^~~~~
chameleon.cpp:54:40: error: 'u2' was not declared in this scope
if (Query({u3, u1, i}) == 1) v = u2;
^~
chameleon.cpp:54:40: note: suggested alternative: 'u1'
if (Query({u3, u1, i}) == 1) v = u2;
^~
u1
chameleon.cpp:60:40: error: 'edges' was not declared in this scope
for (int i = 1; i <= N * 2; ++i) if (edges[i].size() == 3) {
^~~~~