/in/foo.cc: In function 'int main()':
/in/foo.cc:49:19: error: no matching function for call to 'max(long long int&, int&)'
49 | result=max(result,it->m_score);
| ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/string:50,
from /usr/include/c++/12/bits/locale_classes.h:40,
from /usr/include/c++/12/bits/ios_base.h:41,
from /usr/include/c++/12/ios:42,
from /usr/include/c++/12/ostream:38,
from /usr/include/c++/12/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/12/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/12/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
/in/foo.cc:49:19: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
49 | result=max(result,it->m_score);
| ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/12/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
/in/foo.cc:49:19: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
49 | result=max(result,it->m_score);
| ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/algorithm:61,
from /in/foo.cc:4:
/usr/include/c++/12/bits/stl_algo.h:5746:5: note: candidate: 'template<class _Tp> _Tp std::max(initializer_list<_Tp>)'
5746 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/12/bits/stl_algo.h:5746:5: note: template argument deduction/substitution failed:
/in/foo.cc:49:19: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
49 | result=max(result,it->m_score);
| ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_algo.h:5756:5: note: candidate: 'template<class _Tp, class _Compare> _Tp std::max(initializer_list<_Tp>, _Compare)'
5756 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/12/bits/stl_algo.h:5756:5: note: template argument deduction/substitution failed:
/in/foo.cc:49:19: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
49 | result=max(result,it->m_score);
| ~~~^~~~~~~~~~~~~~~~~~~~