Problem deforestation
User Ash
Submission Time 2024-11-29 05:44:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

deforestation.cpp:1:17: error: ‘vector’ has not been declared
1 | bool can(int h, vector<pair<int, int>> &a, int n) {
| ^~~~~~
deforestation.cpp:1:23: error: expected ‘,’ or ‘...’ before ‘<’ token
1 | bool can(int h, vector<pair<int, int>> &a, int n) {
| ^
deforestation.cpp: In function ‘bool can(int, int)’:
deforestation.cpp:2:5: error: ‘vector’ was not declared in this scope
2 | vector<int> l;
| ^~~~~~
deforestation.cpp:2:12: error: expected primary-expression before ‘int’
2 | vector<int> l;
| ^~~
deforestation.cpp:3:25: error: ‘n’ was not declared in this scope
3 | for (int i = 0; i < n; i++) {
| ^
deforestation.cpp:4:17: error: ‘a’ was not declared in this scope
4 | int x = a[i].first;
| ^
deforestation.cpp:8:9: er