art.cpp:18:1: error: expected unqualified-id before 'for'
18 | for (int i = 0; i < n; i++)
| ^~~
art.cpp:18:17: error: 'i' does not name a type
18 | for (int i = 0; i < n; i++)
| ^
art.cpp:18:24: error: 'i' does not name a type
18 | for (int i = 0; i < n; i++)
| ^
art.cpp:23:22: error: 'n' was not declared in this scope
23 | vector<int> solution(n, 0);
| ^
art.cpp:24:1: error: expected unqualified-id before 'for'
24 | for (int i = n; i >= 2; i--)
| ^~~
art.cpp:24:17: error: 'i' does not name a type
24 | for (int i = n; i >= 2; i--)
| ^
art.cpp:24:25: error: 'i' does not name a type
24 | for (int i = n; i >= 2; i--)
| ^
art.cpp:41:1: error: expected unqualified-id before 'for'
41 | for (int i = 0; i < n; i++)
| ^~~
art.cpp:41:17: error: 'i' does not name a type
41 | for (int i = 0; i < n; i++)
| ^
art.cpp:41:24: error: 'i' does not name a type
41 | for (int i = 0; i < n; i++)
| ^
art.cpp:46:7: error: expected constructor, destructor, or type conversion before '(' token
46 | answer(solution);
| ^
art.cpp:47:1: error: expected declaration before '}' token
47 | }
| ^
interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
20 | if(v.size() != N) {
| ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
36 | if(v.size() != N) {
| ~~~~~~~~~^~~~