/in/foo.cc: In function 'long long int dfs(int, int, int, std::vector<int>&)':
/in/foo.cc:19:49: error: too few arguments to function 'long long int dfs(int, int, int, std::vector<int>&)'
return vi[minI] - h + dfs(l, minI - 1, vi[minI]) + dfs(minI + 1, r, vi[minI]);
^
/in/foo.cc:6:11: note: declared here
long long dfs(int l, int r, int h, vector<int>& vi) {
^~~
/in/foo.cc:19:78: error: too few arguments to function 'long long int dfs(int, int, int, std::vector<int>&)'
return vi[minI] - h + dfs(l, minI - 1, vi[minI]) + dfs(minI + 1, r, vi[minI]);
^
/in/foo.cc:6:11: note: declared here
long long dfs(int l, int r, int h, vector<int>& vi) {
^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:32:22: error: cannot convert 'std::vector<int>' to 'int' for argument '3' to 'long long int dfs(int, int, int, std::vector<int>&)'
cout << dfs(0, n, vi);
^