plants.cpp:6:1: error: 'vector' does not name a type
6 | vector<int> v;
| ^~~~~~
plants.cpp:7:1: error: 'vector' does not name a type
7 | vector<int> rc;
| ^~~~~~
plants.cpp: In function 'void init(int, std::vector<int>)':
plants.cpp:14:5: error: 'rc' was not declared in this scope; did you mean 'r'?
14 | rc.resize(nn*2);
| ^~
| r
plants.cpp:15:5: error: 'v' was not declared in this scope
15 | v.resize(nn,0);
| ^
plants.cpp: In function 'int compare_plants(int, int)':
plants.cpp:35:14: error: 'v' was not declared in this scope
35 | if(x+v[x]>=y){
| ^
plants.cpp:36:12: error: 'rc' was not declared in this scope
36 | if(rc[x]==1)return -1;
| ^~
plants.cpp:39:15: error: 'v' was not declared in this scope
39 | if((y+v[y])>=nn && (y+v[y])%nn>=x){
| ^
plants.cpp:40:12: error: 'rc' was not declared in this scope
40 | if(rc[y]==1)return 1;
| ^~