candies.cpp: In function 'std::vector<int> distribute_candies(std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
candies.cpp:57:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
57 | for(int y=0;y<l.size();y++)
| ~^~~~~~~~~
candies.cpp:58:29: error: too few arguments to function 'void upd(int, int, int, int, int, int)'
58 | upd(0,l[y],r[y],v[y]);
| ^
candies.cpp:5:6: note: declared here
5 | void upd(int p,int l,int r,int a,int b,int n)
| ^~~
candies.cpp:59:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
59 | for(int x=0;x<c.size();x++)
| ~^~~~~~~~~
candies.cpp:60:22: error: 'n' was not declared in this scope
60 | a[x]=min(get(0,0,n-1,x),c[x]);
| ^