Problem arrayngement
User holydevil10
Submission Time 2026-06-26 16:57:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

arrayngement.cpp: In function ‘int main()’:
arrayngement.cpp:26:39: error: no matching function for call to ‘max(int&, int&, int&, int&, int&, int&, int&)’
26 | cout<<max(s1,s2,s3,s4,s5,s6,s7)<<'\n';
| ^
In file included from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from arrayngement.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’
222 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: template argument deduction/substitution failed:
arrayngement.cpp:26:39: note: candidate expects 2 arguments, 7 provided
26 | cout<<max(s1,s2,s3,s4,s5,s6,s7)<<'\n';