communication.cpp: In function 'void encode(int, int)':
communication.cpp:20:14: error: 'x' was not declared in this scope
20 | send(x%2);
| ^
communication.cpp: In function 'void brute_force(int, int, bool)':
communication.cpp:28:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
28 | if(i*3 == a.size()){
| ~~~~^~~~~~~~~~~
communication.cpp: In function 'std::pair<int, int> decode(int)':
communication.cpp:62:13: error: 'rnd' was not declared in this scope; did you mean 'rand'?
62 | int i = rnd() % res.size(), j;
| ^~~
| rand
communication.cpp:63:12: error: 'j' was not declared in this scope
63 | while((j = rnd() % res.size()) != i);
| ^
communication.cpp:64:25: error: 'j' was not declared in this scope
64 | return {res[i], res[j]};
| ^
communication.cpp:64:27: error: could not convert '{res.std::vector<int>::operator[](((std::vector<int>::size_type)i)), <expression error>}' from '<brace-enclosed initializer list>' to 'std::pair<int, int>'
64 | return {res[i], res[j]};
| ^
| |
| <brace-enclosed initializer list>