Problem | flamethrower |
---|---|
User | neogaoen2007 |
Submission Time | 2023-12-06 16:29:49 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
flamethrower.cpp: In function ‘int main()’:
flamethrower.cpp:9:2: error: expected unqualified-id before ‘int’
9 | int currentSum = 0;
| ^~~
flamethrower.cpp:14:9: error: ‘currentSum’ was not declared in this scope
14 | currentSum += damage[i];
| ^~~~~~~~~~
flamethrower.cpp:16:13: error: ‘i’ was not declared in this scope
16 | if (i >= K){
| ^
flamethrower.cpp:17:4: error: ‘currentSum’ was not declared in this scope
17 | currentSum -= a[i-K];
| ^~~~~~~~~~
flamethrower.cpp:17:18: error: ‘a’ was not declared in this scope
17 | currentSum -= a[i-K];
| ^
flamethrower.cpp:19:7: error: ‘i’ was not declared in this scope
19 | if (i >= K-1){
| ^
flamethrower.cpp:20:25: error: ‘currentSum’ was not declared in this scope
20 | maxSum = max(maxSum, currentSum);
| ^~~~~~~