Problem flamethrower
User Henries
Submission Time 2024-09-29 16:15:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

flamethrower.cpp: In function ‘long long int cost(std::vector<int>, int)’:
flamethrower.cpp:5:18: error: ‘n’ was not declared in this scope
5 | for (int i=0; i<n-k;i++){
| ^
flamethrower.cpp:8:9: error: cannot convert ‘std::vector<int>’ to ‘long long int’ in return
8 | return v2
| ^~
flamethrower.cpp:8:11: error: expected ‘;’ before ‘}’ token
8 | return v2
| ^
| ;
9 | }
| ~
flamethrower.cpp: In function ‘int main()’:
flamethrower.cpp:18:26: error: conversion from ‘long long int’ to non-scalar type ‘std::vector<int>’ requested
18 | vector<int> costs = cost(v,k);
| ~~~~^~~~~