Problem flamethrower
User PerihelionfromAphelion
Submission Time 2026-02-14 11:31:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

flamethrower.cpp: In function ‘int main()’:
flamethrower.cpp:5:12: error: conflicting declaration ‘int k [100006]’
5 | int n, k, k[100006], sum, i, m;
| ^
flamethrower.cpp:5:9: note: previous declaration as ‘int k’
5 | int n, k, k[100006], sum, i, m;
| ^
flamethrower.cpp:9:13: error: invalid types ‘int[int]’ for array subscript
9 | cin >> k[i];
| ^
flamethrower.cpp:14:13: error: invalid types ‘int[int]’ for array subscript
14 | sum += k[i];
| ^
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from flamethrower.cpp:1:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of ‘void std::reverse(_BIter, _BIter) [with _BIter = int]’:
flamethrower.cpp:12:18: required from here
/usr/include/c++/9/bits/stl_algo.h:1192:63: error: no matching function