Problem flamethrower
User Ast8ine
Submission Time 2026-02-15 10:32:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

flamethrower.cpp: In function ‘int main()’:
flamethrower.cpp:8:2: error: ‘vector’ was not declared in this scope
8 | vector<int> = costs[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:8:9: error: expected primary-expression before ‘int’
8 | vector<int> = costs[n];
| ^~~
flamethrower.cpp:10:10: error: ‘costs’ was not declared in this scope
10 | cin >> costs[i];
| ^~~~~
flamethrower.cpp:15:16: error: ‘costs’ was not declared in this scope
15 | sum = sum + costs[j];
| ^~~~~