plants.cpp: In function 'void init(int, std::vector<int>)':
plants.cpp:20:9: error: 'queue' was not declared in this scope
20 | queue<int> q;
| ^~~~~
plants.cpp:2:1: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
1 | #include "plants.h"
+++ |+#include <queue>
2 |
plants.cpp:20:15: error: expected primary-expression before 'int'
20 | queue<int> q;
| ^~~
plants.cpp:23:18: error: 'q' was not declared in this scope
23 | if (!q.empty() && j - q.front() > k - 1) q.pop();
| ^
plants.cpp:24:28: error: 'q' was not declared in this scope
24 | if (r[j] == 0) q.push(r[j]);
| ^
plants.cpp:30:18: error: 'q' was not declared in this scope
30 | if (!q.empty() && j - q.front() > k - 1) q.pop();
| ^
plants.cpp:31:30: error: 'q' was not declared in this scope
31 | if (r[j] == 0 && q.empty()){
| ^
plants.cpp:35:28: error: 'q' was not declared in this scope
35 | if (r[j] == 0) q.push(r[j]);
| ^
plants.cpp:38:22: error: 'exit' was not declared in this scope
38 | if (cur < n) exit(5);
| ^~~~