carnival.cpp: In function 'int query(std::vector<int>&)':
carnival.cpp:10:5: error: expected ';' before 'for'
for(int el : v) {
^~~
carnival.cpp: In function 'bool hasmatch(std::vector<int>&, int)':
carnival.cpp:27:17: error: 'i' was not declared in this scope
v.push_back(i);
^
carnival.cpp:28:21: error: invalid initialization of reference of type 'std::vector<int>&' from expression of type 'int'
int a2 = query(x);
^
carnival.cpp:8:5: note: in passing argument 1 of 'int query(std::vector<int>&)'
int query(vector<int> &v) {
^~~~~
carnival.cpp: In function 'void solve(std::vector<int>&, int, int)':
carnival.cpp:38:12: error: no match for 'operator[]' (operand types are 'int [151]' and 'std::vector<int>')
col[v][0] = currcol;
^
carnival.cpp:43:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < v.size()/2; i++) {
~~^~~~~~~~~~~~
carnival.cpp:46:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < v.size()-v.size()/2; i++) {
~~^~~~~~~~~~~~~~~~~~~~~