Problem carrots
User Hijackedsoul
Submission Time 2024-03-05 17:52:46
Score 0
Max Time N/A
Max Memory N/A

Compile Error

carrots.cpp:5:5: error: expected initializer before ‘cost’
5 | int cost(int n, int k){
| ^~~~
carrots.cpp: In function ‘int32_t main()’:
carrots.cpp:10:6: error: expected initializer before ‘n’
10 | int n, m, ans=0;
| ^
carrots.cpp:11:14: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
11 | std::cin >> n >> m;
| ^
| yn
carrots.cpp:11:19: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
11 | std::cin >> n >> m;
| ^
| tm
carrots.cpp:12:28: error: wrong number of template arguments (1, should be 2)
12 | std::vector <pair<int, int>> arr(n);
| ^~
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cma