Problem flamethrower
User GanJaeHan
Submission Time 2026-01-28 15:56:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

flamethrower.cpp: In function ‘int main()’:
flamethrower.cpp:6:2: error: ‘vector’ was not declared in this scope
6 | vector<int> cost(N);
| ^~~~~~
flamethrower.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 | using namespace std;
flamethrower.cpp:6:9: error: expected primary-expression before ‘int’
6 | vector<int> cost(N);
| ^~~
flamethrower.cpp:9:10: error: ‘cost’ was not declared in this scope
9 | cin >> cost[i];
| ^~~~
flamethrower.cpp:13:17: error: ‘cost’ was not declared in this scope
13 | currentSum += cost[i];
| ^~~~
flamethrower.cpp:17:17: error: ‘cost’ was not declared in this scope
17 | currentSum += cost[i];
| ^~~~