plants.cpp:3:1: error: 'vector' does not name a type
3 | vector<int> inc,dec;
| ^~~~~~
plants.cpp: In function 'void init(int, std::vector<int>)':
plants.cpp:7:7: error: 'inc' was not declared in this scope; did you mean 'int'?
7 | inc.resize(n); dec.resize(n);
| ^~~
| int
plants.cpp:7:18: error: 'n' was not declared in this scope
7 | inc.resize(n); dec.resize(n);
| ^
plants.cpp:7:22: error: 'dec' was not declared in this scope
7 | inc.resize(n); dec.resize(n);
| ^~~
plants.cpp:10:30: error: expected '(' before 'r'
10 | for(s=0; s<n; s++) {if r[i]=0; break;}
| ^
| (
plants.cpp:12:30: error: expected '(' before 'r'
12 | for(s=0; s<n; s++) {if r[i]=1; break;}
| ^
| (
plants.cpp: In function 'int subtask1(int, int)':
plants.cpp:19:15: error: 'dec' was not declared in this scope
19 | if (y<= dec[x] or x<= inc[y] and inc[y] <= y) return 1;
| ^~~
plants.cpp:19:29: error: 'inc' was not declared in this scope; did you mean 'int'?
19 | if (y<= dec[x] or x<= inc[y] and inc[y] <= y) return 1;
| ^~~
| int
plants.cpp:23:14: error: 'inc' was not declared in this scope; did you mean 'int'?
23 | if (y<= inc[x] or x<= dec[y] and dec[y] <= y) return 1;
| ^~~
| int
plants.cpp:23:28: error: 'dec' was not declared in this scope
23 | if (y<= inc[x] or x<= dec[y] and dec[y] <= y) return 1;
| ^~~
plants.cpp: In function 'int compare_plants(int, int)':
plants.cpp:29:8: error: 'k' was not declared in this scope
29 | if (k==2) return subtask1(x,y);
| ^