foo.cc: In function 'int main()':
foo.cc:17:35: error: no matching function for call to 'min(int&, long long int&)'
17 | sum += min(c, a);
| ~~~^~~~~~
In file included from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/string:50,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/locale_classes.h:40,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/ios_base.h:41,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/ios:42,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/ostream:38,
from iostream:39:
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
foo.cc:17:35: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
17 | sum += min(c, a);
| ~~~^~~~~~
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
foo.cc:17:35: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
17 | sum += min(c, a);
| ~~~^~~~~~
[Hydro](https://hydro.ac)提供评测服务