art.cpp:7:2: error: expected initializer before 'std'
7 | std::vector<int> p(n);
| ^~~
art.cpp:9:2: error: expected unqualified-id before 'for'
9 | for (int i = 0; i < n; ++i) {
| ^~~
art.cpp:9:18: error: 'i' does not name a type
9 | for (int i = 0; i < n; ++i) {
| ^
art.cpp:9:25: error: expected unqualified-id before '++' token
9 | for (int i = 0; i < n; ++i) {
| ^~
art.cpp:13:21: error: 'p' was not declared in this scope
13 | int orig = publish(p);
| ^
art.cpp:15:23: error: 'n' was not declared in this scope
15 | std::vector<int> ans(n, 0);
| ^
art.cpp:17:2: error: expected unqualified-id before 'for'
17 | for (int i = 0; i < n - 1; ++i) {
| ^~~
art.cpp:17:18: error: 'i' does not name a type
17 | for (int i = 0; i < n - 1; ++i) {
| ^
art.cpp:17:29: error: expected unqualified-id before '++' token
17 | for (int i = 0; i < n - 1; ++i) {
| ^~
art.cpp:40:2: error: expected unqualified-id before 'for'
40 | for (int j = 0; j < n; ++j) {
| ^~~
art.cpp:40:18: error: 'j' does not name a type
40 | for (int j = 0; j < n; ++j) {
| ^
art.cpp:40:25: error: expected unqualified-id before '++' token
40 | for (int j = 0; j < n; ++j) {
| ^~
art.cpp:47:8: error: expected constructor, destructor, or type conversion before '(' token
47 | answer(ans);
| ^
art.cpp:48:1: error: expected declaration before '}' token
48 | }
| ^
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) {
| ~~~~~~~~~^~~~