Problem flamethrower
User zhile
Submission Time 2025-06-08 19:14:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

flamethrower.cpp: In function ‘int main()’:
flamethrower.cpp:7:14: error: ‘k’ was not declared in this scope
7 | cin >> n >> k;
| ^
flamethrower.cpp:12:5: error: ‘check’ was not declared in this scope
12 | check[i]=0; // make all numbers in check 0
| ^~~~~
flamethrower.cpp:18:5: error: ‘check’ was not declared in this scope
18 | check[l]+=tree[j+l]; //add the cost of the tree to the answer
| ^~~~~
flamethrower.cpp:21:13: error: ‘check’ was not declared in this scope
21 | if (ans<check[l]){
| ^~~~~