foo.cc: In function 'long long int dfs(int, int, int, std::vector<int>&)':
foo.cc:19:49: error: too few arguments to function 'long long int dfs(int, int, int, std::vector<int>&)'
19 | return vi[minI] - h + dfs(l, minI - 1, vi[minI]) + dfs(minI + 1, r, vi[minI]);
| ^
foo.cc:6:11: note: declared here
6 | long long dfs(int l, int r, int h, vector<int>& vi) {
| ^~~
foo.cc:19:78: error: too few arguments to function 'long long int dfs(int, int, int, std::vector<int>&)'
19 | return vi[minI] - h + dfs(l, minI - 1, vi[minI]) + dfs(minI + 1, r, vi[minI]);
| ^
foo.cc:6:11: note: declared here
6 | long long dfs(int l, int r, int h, vector<int>& vi) {
| ^~~
foo.cc: In function 'int main()':
foo.cc:32:20: error: cannot convert 'std::vector<int>' to 'int'
32 | cout << dfs(0, n, vi);
| ^~
| |
| std::vector<int>
foo.cc:6:33: note: initializing argument 3 of 'long long int dfs(int, int, int, std::vector<int>&)'
6 | long long dfs(int l, int r, int h, vector<int>& vi) {
| ~~~~^
[Hydro](https://hydro.ac)提供评测服务