plants.cpp:1:14: error: 'vector' in namespace 'std' does not name a template type
1 | static std:: vector<int> inc,dec;
| ^~~~~~
plants.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
+++ |+#include <vector>
1 | static std:: vector<int> inc,dec;
plants.cpp:4:23: error: 'std::vector' has not been declared
4 | void init(int k, std::vector<int> r) {
| ^~~~~~
plants.cpp:4:29: error: expected ',' or '...' before '<' token
4 | void init(int k, std::vector<int> r) {
| ^
plants.cpp: In function 'void init(int, int)':
plants.cpp:5:13: error: 'r' was not declared in this scope
5 | int n = r.size();
| ^
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:22: error: 'dec' was not declared in this scope
7 | inc.resize(n); dec.resize(n);
| ^~~
plants.cpp: In function 'int subtask1(int, int)':
plants.cpp:20:15: error: 'dec' was not declared in this scope
20 | if (y<= dec[x] or x<= inc[y] and inc[y] < y) return 1;
| ^~~
plants.cpp:20:29: error: 'inc' was not declared in this scope; did you mean 'int'?
20 | if (y<= dec[x] or x<= inc[y] and inc[y] < y) return 1;
| ^~~
| int
plants.cpp:24:14: error: 'inc' was not declared in this scope; did you mean 'int'?
24 | if (y<= inc[x] or x<= dec[y] and dec[y] < y) return 1;
| ^~~
| int
plants.cpp:24:28: error: 'dec' was not declared in this scope
24 | 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:30:8: error: 'k' was not declared in this scope
30 | if (k==2) return subtask1(x,y);
| ^