Problem | flamethrower |
---|---|
User | yanwen |
Submission Time | 2025-07-21 17:50:59 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
flamethrower.cpp:5:21: error: ‘vector’ does not name a type
5 | int maxDamage(const vector<int>& costs, int K) {
| ^~~~~~
flamethrower.cpp:5:27: error: expected ‘,’ or ‘...’ before ‘<’ token
5 | int maxDamage(const vector<int>& costs, int K) {
| ^
flamethrower.cpp: In function ‘int maxDamage(int)’:
flamethrower.cpp:6:13: error: ‘costs’ was not declared in this scope
6 | int n = costs.size();
| ^~~~~
flamethrower.cpp:14:31: error: ‘K’ was not declared in this scope
14 | if (end - start + 1 > K) {
| ^
flamethrower.cpp:19:19: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
19 | max_sum = max(max_sum, current_sum); // how the greedy algorithm works, without it it will never work.
| ^~~
| std::max
In file i