Problem deforestation
User Daniel0liong
Submission Time 2025-03-18 14:28:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

deforestation.cpp: In function ‘bool check(long long int, long long int*, long long int*)’:
deforestation.cpp:8:20: error: ‘i’ was not declared in this scope
8 | double tt=(t-tree[i]);
| ^
deforestation.cpp:10:8: error: request for member ‘push_back’ in ‘time’, which is of non-class type ‘long long int [n]’
10 | time.push_back(ceil(tt/growth[i]));//((t-tree[i])/growth[i]);
| ^~~~~~~~~
deforestation.cpp: In function ‘int main()’:
deforestation.cpp:29:3: error: ‘mid’ was not declared in this scope; did you mean ‘min’?
29 | mid=min+(max-min+1)/2;
| ^~~
| min