Problem flamethrower
User andthatsallshewrote
Submission Time 2025-07-23 20:11:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

flamethrower.cpp: In function ‘int main()’:
flamethrower.cpp:7:2: error: expected initializer before ‘long’
7 | long long max = 0, temp = 0;
| ^~~~
flamethrower.cpp:8:14: error: ‘k’ was not declared in this scope
8 | cin >> n >> k;
| ^
flamethrower.cpp:15:4: error: ‘temp’ was not declared in this scope
15 | temp += arr[j];
| ^~~~
flamethrower.cpp:17:7: error: ‘temp’ was not declared in this scope
17 | if (temp > max){
| ^~~~
flamethrower.cpp:20:3: error: ‘temp’ was not declared in this scope
20 | temp = 0;
| ^~~~
flamethrower.cpp:22:7: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘<unresolved overloaded function type>’)
22 | cout << max;
| ~~~~~^~~~~~
In file included from /usr/include/c++/9/istream:39,
from /usr/include/c+