teams.cpp: In function 'int can(int, int*)':
teams.cpp:42:28: error: no matching function for call to 'std::multiset<int>::count(std::multiset<int>::iterator&)'
42 | if(S.count(iter) == 1) {
| ^
In file included from /usr/include/c++/10/set:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from teams.cpp:2:
/usr/include/c++/10/bits/stl_multiset.h:730:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::size_type std::multiset<_Key, _Compare, _Alloc>::count(const key_type&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::multiset<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::multiset<_Key, _Compare, _Alloc>::key_type = int]'
730 | count(const key_type& __x) const
| ^~~~~
/usr/include/c++/10/bits/stl_multiset.h:730:29: note: no known conversion for argument 1 from 'std::multiset<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'const key_type&' {aka 'const int&'}
730 | count(const key_type& __x) const
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_multiset.h:736:2: note: candidate: 'template<class _Kt> decltype (((const std::multiset<_Key, _Compare, _Alloc>*)this)->std::multiset<_Key, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::multiset<_Key, _Compare, _Alloc>::count(const _Kt&) const [with _Kt = _Kt; _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
736 | count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x))
| ^~~~~
/usr/include/c++/10/bits/stl_multiset.h:736:2: note: template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_multiset.h: In substitution of 'template<class _Kt> decltype (((const std::multiset<int>*)this)->std::multiset<int>::_M_t.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_count_tr<_Kt, _Req>(__x)) std::multiset<int>::count<_Kt>(const _Kt&) const [with _Kt = std::_Rb_tree_const_iterator<int>]':
teams.cpp:42:28: required from here
/usr/include/c++/10/bits/stl_multiset.h:736:58: error: no matching function for call to 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_count_tr(const std::_Rb_tree_const_iterator<int>&) const'
736 | count(const _Kt& __x) const -> decltype(_M_t._M_count_tr(__x))
| ~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/10/map:60,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from teams.cpp:2:
/usr/include/c++/10/bits/stl_tree.h:1321:2: note: candidate: 'template<class _Kt, class _Req> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_count_tr(const _Kt&) const [with _Kt = _Kt; _Req = _Req; _Key = int; _Val = int; _KeyOfValue = std::_Identity<int>; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
1321 | _M_count_tr(const _Kt& __k) const
| ^~~~~~~~~~~
/usr/include/c++/10/bits/stl_tree.h:1321:2: note: template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_tree.h: In substitution of 'template<class _Cmp, class _SfinaeType> using __has_is_transparent_t = typename std::__has_is_transparent<_Cmp, _SfinaeType>::type [with _Cmp = std::less<int>; _SfinaeType = std::_Rb_tree_const_iterator<int>]':
/usr/include/c++/10/bits/stl_tree.h:1319:9: required by substitution of 'template<class _Kt> decltype (((const std::multiset<int>*)this)->std::multiset<int>::_M_t.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::_M_count_tr<_Kt, _Req>(__x)) std::multiset<int>::count<_Kt>(const _Kt&) const [with _Kt = std::_Rb_tree_const_iterator<int>]'
teams.cpp:42:28: required from here
/usr/include/c++/10/bits/stl_tree.h:429:11: error: no type named 'type' in 'struct std::__has_is_transparent<std::less<int>, std::_Rb_tree_const_iterator<int>, void>'
429 | using __has_is_transparent_t
| ^~~~~~~~~~~~~~~~~~~~~~