plants.cpp: In function 'void init(int, std::vector<int>)':
plants.cpp:18:30: error: expected '(' before 'r'
18 | for(s=0; s<n; s++) {if r[i]=0; break;}
| ^
| (
plants.cpp:20:30: error: expected '(' before 'r'
20 | for(s=0; s<n; s++) {if r[i]=1; break;}
| ^
| (
plants.cpp: In function 'int subtask1(int, int)':
plants.cpp:27:36: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
27 | if (y<= dec[x] or x<= inc[y] and inc[y] <= y) return 1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
plants.cpp:28:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
28 | else if (y <= inc[x] or x<= dec[y] and dec[y] <= y) return -1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
plants.cpp:31:35: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
31 | if (y<= inc[x] or x<= dec[y] and dec[y] <= y) return 1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
plants.cpp:32:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
32 | else if (y <= dec[x] or x<= inc[y] and inc[y] <= y) return -1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~
plants.cpp: At global scope:
plants.cpp:6:18: warning: 'q' defined but not used [-Wunused-variable]
6 | static int n, k, q;
| ^