boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:60:13: warning: declaration of 'i' shadows a global declaration [-Wshadow]
60 | for(int i=1; i<=N; i++)
| ^
boxes.cpp:47:6: note: shadowed declaration is here
47 | int i,s10,s12;
| ^
boxes.cpp:65:10: warning: declaration of 'i' shadows a global declaration [-Wshadow]
65 | for(int i=1;i<=n;i++)
| ^
boxes.cpp:47:6: note: shadowed declaration is here
47 | int i,s10,s12;
| ^
boxes.cpp:67:41: error: no matching function for call to 'min(long long int&, int)'
67 | dp[i]=dp[max(i-k,0ll)]+min(m,a[i]*2);
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from boxes.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
boxes.cpp:67:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
67 | dp[i]=dp[max(i-k,0ll)]+min(m,a[i]*2);
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from boxes.cpp:4:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
boxes.cpp:67:41: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
67 | dp[i]=dp[max(i-k,0ll)]+min(m,a[i]*2);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from boxes.cpp:4:
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3468 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
boxes.cpp:67:41: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
67 | dp[i]=dp[max(i-k,0ll)]+min(m,a[i]*2);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from boxes.cpp:4:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: template argument deduction/substitution failed:
boxes.cpp:67:41: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
67 | dp[i]=dp[max(i-k,0ll)]+min(m,a[i]*2);
| ^
boxes.cpp:70:11: warning: declaration of 'i' shadows a global declaration [-Wshadow]
70 | for(int i=n;i>=1;--i)
| ^
boxes.cpp:47:6: note: shadowed declaration is here
47 | int i,s10,s12;
| ^
boxes.cpp:70:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
70 | for(int i=n;i>=1;--i)
| ^
boxes.cpp:73:12: warning: declaration of 'i' shadows a global declaration [-Wshadow]
73 | for(int i=0;i<=n;i++)
| ^
boxes.cpp:47:6: note: shadowed declaration is here
47 | int i,s10,s12;
| ^
boxes.cpp:73:4: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
73 | for(int i=0;i<=n;i++)
| ^~~
boxes.cpp:75:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
75 | cout<<s4;
| ^~~~
boxes.cpp:76:1: warning: no return statement in function returning non-void [-Wreturn-type]
76 | }
| ^