Problem flamethrower
User PerihelionfromAphelion
Submission Time 2026-02-14 11:31:03
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];
| ^
flamethrower.cpp:5:9: note: previous declaration as ‘int k’
5 | int n, k, k[100006];
| ^
flamethrower.cpp:6:2: error: ‘sum’ was not declared in this scope
6 | sum = 0;
| ^~~
flamethrower.cpp:8:7: error: ‘i’ was not declared in this scope
8 | for (i = 1; i <= n; i++) {
| ^
flamethrower.cpp:9:10: error: ‘a’ was not declared in this scope
9 | cin >> a[i];
| ^
flamethrower.cpp:11:14: error: ‘m’ was not declared in this scope
11 | sort(k, k + m);
| ^
flamethrower.cpp:13:7: error: ‘i’ was not declared in this scope
13 | for (i = n; i >= n - k + 1; i--) {
| ^