parks.cpp: In function 'void joinset(int, int)':
parks.cpp:26:10: error: declaration of 'auto x' shadows a parameter
26 | pair[x]=y;
| ^
parks.cpp:23:18: note: 'int x' previously declared here
23 | void joinset(int x,int y) {
| ~~~~^
parks.cpp:26:13: error: class template argument deduction failed:
26 | pair[x]=y;
| ^
parks.cpp:26:13: error: no matching function for call to 'pair(int&)'
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:460:40: note: candidate: 'template<class _T1, class _T2> std::pair(_T1, _T2)-> std::pair<_T1, _T2>'
460 | template<typename _T1, typename _T2> pair(_T1, _T2) -> pair<_T1, _T2>;
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:460:40: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: candidate expects 2 arguments, 1 provided
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: candidate: 'template<class _T1, class _T2> pair(std::pair<_T1, _T2>)-> std::pair<_T1, _T2>'
211 | struct pair
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:211:12: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: mismatched types 'std::pair<_T1, _T2>' and 'int'
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:232:26: note: candidate: 'template<class _T1, class _T2, class _U1, class _U2, typename std::enable_if<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> >::value, bool>::type <anonymous> > pair()-> std::pair<_T1, _T2>'
232 | _GLIBCXX_CONSTEXPR pair()
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:232:26: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: candidate expects 0 arguments, 1 provided
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:266:17: note: candidate: 'template<class _T1, class _T2, class _U1, class _U2, typename std::enable_if<(std::_PCC<true, _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > pair(const _T1&, const _T2&)-> std::pair<_T1, _T2>'
266 | constexpr pair(const _T1& __a, const _T2& __b)
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:266:17: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: candidate expects 2 arguments, 1 provided
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:300:19: note: candidate: 'template<class _T1, class _T2, class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > pair(const std::pair<_ForwardIterator1, _ForwardIterator2>&)-> std::pair<_T1, _T2>'
300 | constexpr pair(const pair<_U1, _U2>& __p)
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:300:19: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: mismatched types 'const std::pair<_ForwardIterator1, _ForwardIterator2>' and 'int'
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:314:17: note: candidate: 'template<class _T1, class _T2> pair(const std::pair<_T1, _T2>&)-> std::pair<_T1, _T2>'
314 | constexpr pair(const pair&) = default; ///< Copy constructor
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:314:17: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: mismatched types 'const std::pair<_T1, _T2>' and 'int'
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:315:17: note: candidate: 'template<class _T1, class _T2> pair(std::pair<_T1, _T2>&&)-> std::pair<_T1, _T2>'
315 | constexpr pair(pair&&) = default; ///< Move constructor
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:315:17: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: mismatched types 'std::pair<_T1, _T2>' and 'int'
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:322:18: note: candidate: 'template<class _T1, class _T2, class _U1, typename std::enable_if<std::_PCC<true, _T1, _T2>::_MoveCopyPair<true, _U1, _T2>(), bool>::type <anonymous> > pair(_U1&&, const _T2&)-> std::pair<_T1, _T2>'
322 | constexpr pair(_U1&& __x, const _T2& __y)
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:322:18: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: candidate expects 2 arguments, 1 provided
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:336:18: note: candidate: 'template<class _T1, class _T2, class _U2, typename std::enable_if<std::_PCC<true, _T1, _T2>::_CopyMovePair<true, _T1, _U2>(), bool>::type <anonymous> > pair(const _T1&, _U2&&)-> std::pair<_T1, _T2>'
336 | constexpr pair(const _T1& __x, _U2&& __y)
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:336:18: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: candidate expects 2 arguments, 1 provided
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:352:12: note: candidate: 'template<class _T1, class _T2, class _U1, class _U2, typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > pair(_U1&&, _U2&&)-> std::pair<_T1, _T2>'
352 | constexpr pair(_U1&& __x, _U2&& __y)
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:352:12: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: candidate expects 2 arguments, 1 provided
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
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 parks.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:371:12: note: candidate: 'template<class _T1, class _T2, class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<_T1, _U1>::value) || (! std::is_same<_T2, _U2>::value)), _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > pair(std::pair<_ForwardIterator1, _ForwardIterator2>&&)-> std::pair<_T1, _T2>'
371 | constexpr pair(pair<_U1, _U2>&& __p)
| ^~~~
/usr/include/c++/10/bits/stl_pair.h:371:12: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: mismatched types 'std::pair<_ForwardIterator1, _ForwardIterator2>' and 'int'
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from parks.cpp:1:
/usr/include/c++/10/tuple:1673:7: note: candidate: 'template<class _T1, class _T2, class ... _Args1, class ... _Args2> pair(std::piecewise_construct_t, std::tuple<_Tail ...>, std::tuple<_Args2 ...>)-> std::pair<_T1, _T2>'
1673 | pair<_T1, _T2>::
| ^~~~~~~~~~~~~~
/usr/include/c++/10/tuple:1673:7: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: candidate expects 3 arguments, 1 provided
26 | pair[x]=y;
| ^
In file included from /usr/include/c++/10/functional:54,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from parks.cpp:1:
/usr/include/c++/10/tuple:1685:7: note: candidate: 'template<class _T1, class _T2, class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> pair(std::tuple<_Tail ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes2 ...>, std::_Index_tuple<_Indexes2 ...>)-> std::pair<_T1, _T2>'
1685 | pair<_T1, _T2>::
| ^~~~~~~~~~~~~~
/usr/include/c++/10/tuple:1685:7: note: template argument deduction/substitution failed:
parks.cpp:26:13: note: mismatched types 'std::tuple<_Tail ...>' and 'int'
26 | pair[x]=y;
| ^
parks.cpp:26:13: note: explicit deduction guides not considered for copy-initialization