Problem deforestation
User samvar0907
Submission Time 2024-01-26 12:39:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

deforestation.cpp: In function ‘int main()’:
deforestation.cpp:23:23: error: ‘set’ is not a member of ‘std’
23 | bool bool1 = std::set<int>(tree_heights.begin(), tree_heights.end()).size() == 1;
| ^~~
deforestation.cpp:4:1: note: ‘std::set’ is defined in header ‘<set>’; did you forget to ‘#include <set>’?
3 | #include <algorithm>
+++ |+#include <set>
4 |
deforestation.cpp:23:27: error: expected primary-expression before ‘int’
23 | bool bool1 = std::set<int>(tree_heights.begin(), tree_heights.end()).size() == 1;
| ^~~
deforestation.cpp:24:23: error: ‘set’ is not a member of ‘std’
24 | bool bool2 = std::set<int>(growth_rates.begin(), growth_rates.end()).size() == 1;
| ^~~
deforestation.cpp:24:23: note: ‘std::set’ is defined in header ‘<set>’; did you forget to ‘#include <set>