제출 #550016

#제출 시각아이디문제언어결과실행 시간메모리
550016Theo830분수 공원 (IOI21_parks)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef int ll; const ll INF = 1e9+7; const ll MOD = 998244353; typedef pair<ll,ll> ii; #define iii pair<ll,ii> #define iii2 pair<ii,ll> #define f(i,a,b) for(ll i = a;i < b;i++) #define pb push_back #define vll vector<ll> #define F first #define S second #define all(x) (x).begin(), (x).end() ///I hope I will get uprating and don't make mistakes ///I will never stop programming ///sqrt(-1) Love C++ ///Please don't hack me ///@TheofanisOrfanou Theo830 ///Think different approaches (bs,dp,greedy,graphs,shortest paths,mst) ///Stay Calm ///Look for special cases ///Beware of overflow and array bounds ///Think the problem backwards ///Training #include "parks.h" //void build(std::vector<int> u, std::vector<int> v, std::vector<int> a, std::vector<int> b); ll dx[4] = {2,-2,0,0}; ll dy[4] = {0,0,2,-2}; map<ii,ll>mp; ll p[200005]; ll find_par(ll a){ if(p[a] == a){ return a; } return p[a] = find_par(p[a]); } void enose(ll a,ll b){ ll p1 = find_par(a); ll p2 = find_par(b); p[p1] = p2; } int construct_roads(std::vector<int> x, std::vector<int> y) { ll n = x.size(); f(i,0,n){ mp[ii(x[i],y[i])] = i+1; p[i+1] = i+1; } vector<int>u,v,a,b; vector<iii>w; f(i,0,n){ w.pb(iii(ii(x[i],y[i]),i)); } sort(all(w)); f(i,0,n){ f(j,0,4){ ll X = w[i].F.F + dx[j]; ll Y = w[i].F.S + dy[j]; ll pos = mp[ii(X,Y)]; if(pos && find_par(i+1) != find_par(pos)){ enose(w[i].S + 1,pos); u.pb(w[i].S); v.pb(pos-1); } } } a.assign(n-1,0); b.assign(n-1,0); if((ll)u.size() != n-1){ return 0; } mp.clear(); map<ii,vll>ex; set<iii>s; f(i,0,n-1){ ll A = (x[u[i]] + x[v[i]]) / 2; ll B = (y[u[i]] + y[v[i]]) / 2; if(A % 2 == 0){ mp[ii(A+1,B)]++; mp[ii(A-1,B)]++; ex[ii(A+1,B)].pb(i); ex[ii(A-1,B)].pb(i); } else{ mp[ii(A,B+1)]++; mp[ii(A,B-1)]++; ex[ii(A,B+1)].pb(i); ex[ii(A,B-1)].pb(i); } } for(auto x:mp){ s.insert(iii(x.S,x.F)); } while(!s.empty()){ auto it = s.begin(); for(auto z:ex[(*it).S]){ if(a[z] == 0){ ll A = (x[u[z]] + x[v[z]]) / 2; ll B = (y[u[z]] + y[v[z]]) / 2; a[z] = (*it).S.F; b[z] = (*it).S.S; if(A % 2 == 0){ if(A + 1 == a[z]){ A -= 1; } else{ A += 1; } mp[ii(A,B)]--; s.erase(iii(mp[ii(A,B)] + 1,ii(A,B))); s.insert(iii(mp[ii(A,B)],ii(A,B))); } else{ if((B + 1) == b[z]){ B -= 1; } else{ B += 1; } mp[ii(A,B)]--; s.erase(iii(mp[ii(A,B)] + 1,ii(A,B))); s.insert(iii(mp[ii(A,B)],ii(A,B))); } break; } } s.erase((*it)); } build(u,v,a,b); return 1; } /* static void check(bool cond, string message) { if (!cond) { printf("%s\n", message.c_str()); fclose(stdout); exit(0); } } static int n; static bool build_called; static int m; static vector<int> _u, _v, _a, _b; void build(vector<int> u, vector<int> v, vector<int> a, vector<int> b) { check(!build_called, "build is called more than once"); build_called = true; m = u.size(); check(int(v.size()) == m, "u.size() != v.size()"); check(int(a.size()) == m, "u.size() != a.size()"); check(int(b.size()) == m, "u.size() != b.size()"); _u = u; _v = v; _a = a; _b = b; } int main() { assert(scanf("%d", &n) == 1); vector<int> x(n), y(n); for (int i = 0; i < n; i++) { assert(scanf("%d%d", &x[i], &y[i]) == 2); } fclose(stdin); build_called = false; const int possible = construct_roads(x, y); check(possible == 0 || possible == 1, "Invalid return value of construct_roads()"); if (possible == 1) { check(build_called, "construct_roads() returned 1 without calling build()"); } else { check(!build_called, "construct_roads() called build() but returned 0"); } printf("%d\n", possible); if (possible == 1) { printf("%d\n", m); for (int j = 0; j < m; j++) { printf("%d %d %d %d\n", _u[j], _v[j], _a[j], _b[j]); } } fclose(stdout); return 0; } */

컴파일 시 표준 에러 (stderr) 메시지

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:52:33: error: no matching function for call to 'std::pair<int, std::pair<int, int> >::pair(ii, ll&)'
   52 |         w.pb(iii(ii(x[i],y[i]),i));
      |                                 ^
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:452:9: note: candidate: 'template<class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>) [with _Args1 = {_Args1 ...}; long unsigned int ..._Indexes1 = {_Indexes1 ...}; _Args2 = {_Args2 ...}; long unsigned int ..._Indexes2 = {_Indexes2 ...}; _T1 = int; _T2 = std::pair<int, int>]'
  452 |         pair(tuple<_Args1...>&, tuple<_Args2...>&,
      |         ^~~~
/usr/include/c++/10/bits/stl_pair.h:452:9: note:   template argument deduction/substitution failed:
parks.cpp:52:33: note:   'ii' {aka 'std::pair<int, int>'} is not derived from 'std::tuple<_Tps ...>'
   52 |         w.pb(iii(ii(x[i],y[i]),i));
      |                                 ^
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:387:9: note: candidate: 'template<class ... _Args1, class ... _Args2> std::pair<_T1, _T2>::pair(std::piecewise_construct_t, std::tuple<_Args1 ...>, std::tuple<_Args2 ...>) [with _Args1 = {_Args1 ...}; _Args2 = {_Args2 ...}; _T1 = int; _T2 = std::pair<int, int>]'
  387 |         pair(piecewise_construct_t, tuple<_Args1...>, tuple<_Args2...>);
      |         ^~~~
/usr/include/c++/10/bits/stl_pair.h:387:9: note:   template argument deduction/substitution failed:
parks.cpp:52:33: note:   mismatched types 'std::tuple<_Tps ...>' and 'int'
   52 |         w.pb(iii(ii(x[i],y[i]),i));
      |                                 ^
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:381:21: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::pair<int, int>, _U2>::value)), int, std::pair<int, int> >::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::pair<int, int>, _U2>::value)), int, std::pair<int, int> >::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _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> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  381 |  explicit constexpr pair(pair<_U1, _U2>&& __p)
      |                     ^~~~
/usr/include/c++/10/bits/stl_pair.h:381:21: note:   template argument deduction/substitution failed:
parks.cpp:52:33: note:   candidate expects 1 argument, 2 provided
   52 |         w.pb(iii(ii(x[i],y[i]),i));
      |                                 ^
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 _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::pair<int, int>, _U2>::value)), int, std::pair<int, int> >::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::pair<int, int>, _U2>::value)), int, std::pair<int, int> >::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _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> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  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:52:33: note:   candidate expects 1 argument, 2 provided
   52 |         w.pb(iii(ii(x[i],y[i]),i));
      |                                 ^
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:361:21: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && (! _ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>())), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  361 |  explicit constexpr pair(_U1&& __x, _U2&& __y)
      |                     ^~~~
/usr/include/c++/10/bits/stl_pair.h:361:21: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_pair.h:360:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  360 |                          bool>::type=false>
      |                                      ^~~~~
/usr/include/c++/10/bits/stl_pair.h:352:12: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_MoveConstructiblePair<_U1, _U2>() && _ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  352 |  constexpr pair(_U1&& __x, _U2&& __y)
      |            ^~~~
/usr/include/c++/10/bits/stl_pair.h:352:12: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_pair.h:351:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  351 |                          bool>::type=true>
      |                                      ^~~~
/usr/include/c++/10/bits/stl_pair.h:343:17: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<false, int, _U2>(), bool>::type <anonymous> > std::pair<_T1, _T2>::pair(const _T1&, _U2&&) [with _U2 = _U2; typename std::enable_if<std::_PCC<true, _T1, _T2>::_CopyMovePair<false, _T1, _U2>(), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  343 |        explicit pair(const _T1& __x, _U2&& __y)
      |                 ^~~~
/usr/include/c++/10/bits/stl_pair.h:343:17: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_pair.h:342:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  342 |                          bool>::type=false>
      |                                      ^~~~~
/usr/include/c++/10/bits/stl_pair.h:336:18: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<true, int, _U2>(), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const _T1&, _U2&&) [with _U2 = _U2; typename std::enable_if<std::_PCC<true, _T1, _T2>::_CopyMovePair<true, _T1, _U2>(), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  336 |        constexpr pair(const _T1& __x, _U2&& __y)
      |                  ^~~~
/usr/include/c++/10/bits/stl_pair.h:336:18: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_pair.h:335:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  335 |                          bool>::type=true>
      |                                      ^~~~
/usr/include/c++/10/bits/stl_pair.h:329:27: note: candidate: 'template<class _U1, typename std::enable_if<_MoveCopyPair<false, _U1, std::pair<int, int> >(), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&) [with _U1 = _U1; typename std::enable_if<std::_PCC<true, _T1, _T2>::_MoveCopyPair<false, _U1, _T2>(), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  329 |        explicit constexpr pair(_U1&& __x, const _T2& __y)
      |                           ^~~~
/usr/include/c++/10/bits/stl_pair.h:329:27: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_pair.h:328:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  328 |                          bool>::type=false>
      |                                      ^~~~~
/usr/include/c++/10/bits/stl_pair.h:322:18: note: candidate: 'template<class _U1, typename std::enable_if<_MoveCopyPair<true, _U1, std::pair<int, int> >(), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(_U1&&, const _T2&) [with _U1 = _U1; typename std::enable_if<std::_PCC<true, _T1, _T2>::_MoveCopyPair<true, _U1, _T2>(), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  322 |        constexpr pair(_U1&& __x, const _T2& __y)
      |                  ^~~~
/usr/include/c++/10/bits/stl_pair.h:322:18: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_pair.h:321:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  321 |                          bool>::type=true>
      |                                      ^~~~
/usr/include/c++/10/bits/stl_pair.h:315:17: note: candidate: 'constexpr std::pair<_T1, _T2>::pair(std::pair<_T1, _T2>&&) [with _T1 = int; _T2 = std::pair<int, int>]'
  315 |       constexpr pair(pair&&) = default;  ///< Move constructor
      |                 ^~~~
/usr/include/c++/10/bits/stl_pair.h:315:17: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/10/bits/stl_pair.h:314:17: note: candidate: 'constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = int; _T2 = std::pair<int, int>]'
  314 |       constexpr pair(const pair&) = default; ///< Copy constructor
      |                 ^~~~
/usr/include/c++/10/bits/stl_pair.h:314:17: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/10/bits/stl_pair.h:309:21: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::pair<int, int>, _U2>::value)), int, std::pair<int, int> >::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::pair<int, int>, _U2>::value)), int, std::pair<int, int> >::_ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _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> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  309 |  explicit constexpr pair(const pair<_U1, _U2>& __p)
      |                     ^~~~
/usr/include/c++/10/bits/stl_pair.h:309:21: note:   template argument deduction/substitution failed:
parks.cpp:52:33: note:   candidate expects 1 argument, 2 provided
   52 |         w.pb(iii(ii(x[i],y[i]),i));
      |                                 ^
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 _U1, class _U2, typename std::enable_if<(std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::pair<int, int>, _U2>::value)), int, std::pair<int, int> >::_ConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<int, _U1>::value) || (! std::is_same<std::pair<int, int>, _U2>::value)), int, std::pair<int, int> >::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _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> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  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:52:33: note:   candidate expects 1 argument, 2 provided
   52 |         w.pb(iii(ii(x[i],y[i]),i));
      |                                 ^
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:276:26: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_ConstructiblePair<_U1, _U2>() && (! _ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_ConstructiblePair<_U1, _U2>() && (! std::_PCC<true, _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>())), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  276 |       explicit constexpr pair(const _T1& __a, const _T2& __b)
      |                          ^~~~
/usr/include/c++/10/bits/stl_pair.h:276:26: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_pair.h:275:38: error: no type named 'type' in 'struct std::enable_if<false, bool>'
  275 |                          bool>::type=false>
      |                                      ^~~~~
/usr/include/c++/10/bits/stl_pair.h:266:17: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<(_ConstructiblePair<_U1, _U2>() && _ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _U1 = _U1; _U2 = _U2; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_ConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  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:52:18: note:   cannot convert 'std::pair<int, int>((* & x.std::vector<int>::operator[](((std::vector<int>::size_type)i))), (* & y.std::vector<int>::operator[](((std::vector<int>::size_type)i))))' (type 'ii' {aka 'std::pair<int, int>'}) to type 'const int&'
   52 |         w.pb(iii(ii(x[i],y[i]),i));
      |                  ^~~~~~~~~~~~~
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:245:26: note: candidate: 'template<class _U1, class _U2, typename std::enable_if<std::__and_<std::is_default_constructible<_U1>, std::is_default_constructible<_U2>, std::__not_<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> > > >::value, bool>::type <anonymous> > constexpr std::pair<_T1, _T2>::pair() [with _U1 = _U1; _U2 = _U2; typename std::enable_if<std::__and_<std::is_default_constructible<_U1>, std::is_default_constructible<_U2>, std::__not_<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> > > >::value, bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  245 |       explicit constexpr pair()
      |                          ^~~~
/usr/include/c++/10/bits/stl_pair.h:245:26: note:   template argument deduction/substitution failed:
parks.cpp:52:33: note:   candidate expects 0 arguments, 2 provided
   52 |         w.pb(iii(ii(x[i],y[i]),i));
      |                                 ^
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 _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> > constexpr std::pair<_T1, _T2>::pair() [with _U1 = _U1; _U2 = _U2; typename std::enable_if<std::__and_<std::__is_implicitly_default_constructible<_U1>, std::__is_implicitly_default_constructible<_U2> >::value, bool>::type <anonymous> = <anonymous>; _T1 = int; _T2 = std::pair<int, int>]'
  232 |       _GLIBCXX_CONSTEXPR pair()
      |                          ^~~~
/usr/include/c++/10/bits/stl_pair.h:232:26: note:   template argument deduction/substitution failed:
parks.cpp:52:33: note:   candidate expects 0 arguments, 2 provided
   52 |