제출 #494709

#제출 시각아이디문제언어결과실행 시간메모리
494709keertanCommuter Pass (JOI18_commuter_pass)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define int int64_t #define all(x) x.begin(),x.end() #define all1(x) x.rbegin(),x.rend() #define sz(x) (int)(x.size()) const int N=1e5+5,N1=1e18,mod=1e9+7; template<class T> using min_heap=priority_queue<T,vector<T>,greater<T>>; vector<int> adj1[N],adj2[N],adj3[N],disv(N,N1); int memo[N]; int dp(int u){ if (memo[u]!=-1){return memo[u];} int best=disv[u]; for (int it:adj1[u]){ best=min(best,dp(it)); } return memo[u]=best; } int memo1[N]; int dpback(int u){ if (memo1[u]!=-1){return memo1[u];} int best=disv[u]; for (int it:adj2[u]){ best=min(best,dpback(it)); } return memo1[u]=best; } void solve(){ int n,m,s,t,u,v; cin>>n>>m>>s>>t>>u>>v; using gh=pair<int,int>; vector<gh> adj[n+1]; for (int i=1,x,y,w;i<=m;i++){ cin>>x>>y>>w; adj[x].emplace_back(y,w); adj[y].emplace_back(x,w); } vector<int> disu(n+1,N1); min_heap<pair<int,int>> q; q.emplace(0,u); disu[u]=0; while(!q.empty()){ int nd,dis; tie(dis,nd)=q.top(); q.pop(); for (const pair<int,int> &it:adj[nd]){ if (disu[it.first]>disu[nd]+it.second){ disu[it.first]=disu[nd]+it.second; q.emplace(disu[it.first],it.first); } } } disv[v]=0; q.emplace(0,v); while(!q.empty()){ int nd,dis; tie(dis,nd)=q.top(); q.pop(); for (const pair<int,int> &it:adj[nd]){ if (disv[it.first]>disv[nd]+it.second){ disv[it.first]=disv[nd]+it.second; q.emplace(disv[it.first],it.first); } } } vector<int> curdis(n+1,N1); curdis[s]=0; q.emplace(0,s); while(!q.empty()){ int nd,dis; tie(dis,nd)=q.top(); q.pop(); for (const pair<int,int> &it:adj[nd]){ if (curdis[it.first]>curdis[nd]+it.second){ curdis[it.first]=curdis[nd]+it.second; adj1[it.first].clear(); adj1[it.first].emplace_back(nd); q.emplace(curdis[it.first],it.first); } else if (curdis[it.first]==curdis[nd]+it.second){ adj1[it.first].emplace_back(nd); } } } vector<bool> curvis(n+1); queue<int> q1; q1.emplace(t); while(!q1.empty()){ int nd=q1.front(); q1.pop(); if (!curvis[nd]){ curvis[nd]=1; for (int it:adj1[nd]){ adj2[it].emplace_back(nd); q.emplace(it); } } } memset(memo,-1,sizeof(memo)); memset(memo1,-1,sizeof(memo1)); int ans=disu[v]; for (int i=1;i<=n;i++){ if (!curvis[i]){continue;} ans=min(ans,disu[i]+min(dp(i),dpback(i))); } cout<<ans; } int32_t main(){ ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); int tq=1; //cin>>tq; for (;tq;tq--){solve();} }

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

In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from commuter_pass.cpp:2:
/usr/include/c++/10/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::pair<long int, long int>; _Args = {long int&}; _Tp = std::pair<long int, long int>]':
/usr/include/c++/10/bits/alloc_traits.h:512:17:   required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::pair<long int, long int>; _Args = {long int&}; _Tp = std::pair<long int, long int>; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::pair<long int, long int> >]'
/usr/include/c++/10/bits/vector.tcc:115:30:   required from 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {long int&}; _Tp = std::pair<long int, long int>; _Alloc = std::allocator<std::pair<long int, long int> >; std::vector<_Tp, _Alloc>::reference = std::pair<long int, long int>&]'
/usr/include/c++/10/bits/stl_queue.h:658:18:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::emplace(_Args&& ...) [with _Args = {long int&}; _Tp = std::pair<long int, long int>; _Sequence = std::vector<std::pair<long int, long int> >; _Compare = std::greater<std::pair<long int, long int> >]'
commuter_pass.cpp:100:21:   required from here
/usr/include/c++/10/ext/new_allocator.h:150:4: error: no matching function for call to 'std::pair<long int, long int>::pair(long int&)'
  150 |  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 commuter_pass.cpp:2:
/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 = long int; _T2 = long int]'
  452 |         pair(tuple<_Args1...>&, tuple<_Args2...>&,
      |         ^~~~
/usr/include/c++/10/bits/stl_pair.h:452:9: note:   template argument deduction/substitution failed:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from commuter_pass.cpp:2:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   mismatched types 'std::tuple<_Tps ...>' and 'long int'
  150 |  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 commuter_pass.cpp:2:
/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 = long int; _T2 = long 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:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from commuter_pass.cpp:2:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   candidate expects 3 arguments, 1 provided
  150 |  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 commuter_pass.cpp:2:
/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<long int, _U1>::value) || (! std::is_same<long int, _U2>::value)), long int, long int>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<long int, _U1>::value) || (! std::is_same<long int, _U2>::value)), long int, long 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 = long int; _T2 = long 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:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from commuter_pass.cpp:2:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   mismatched types 'std::pair<_T1, _T2>' and 'long int'
  150 |  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 commuter_pass.cpp:2:
/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<long int, _U1>::value) || (! std::is_same<long int, _U2>::value)), long int, long int>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<long int, _U1>::value) || (! std::is_same<long int, _U2>::value)), long int, long 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 = long int; _T2 = long int]'
  371 |  constexpr pair(pair<_U1, _U2>&& __p)
      |            ^~~~
/usr/include/c++/10/bits/stl_pair.h:371:12: note:   template argument deduction/substitution failed:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from commuter_pass.cpp:2:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   mismatched types 'std::pair<_T1, _T2>' and 'long int'
  150 |  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 commuter_pass.cpp:2:
/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 = long int; _T2 = long 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:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from commuter_pass.cpp:2:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   candidate expects 2 arguments, 1 provided
  150 |  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 commuter_pass.cpp:2:
/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 = long int; _T2 = long int]'
  352 |  constexpr pair(_U1&& __x, _U2&& __y)
      |            ^~~~
/usr/include/c++/10/bits/stl_pair.h:352:12: note:   template argument deduction/substitution failed:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from commuter_pass.cpp:2:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   candidate expects 2 arguments, 1 provided
  150 |  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 commuter_pass.cpp:2:
/usr/include/c++/10/bits/stl_pair.h:343:17: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<false, long 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 = long int; _T2 = long 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:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from commuter_pass.cpp:2:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   candidate expects 2 arguments, 1 provided
  150 |  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 commuter_pass.cpp:2:
/usr/include/c++/10/bits/stl_pair.h:336:18: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<true, long 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 = long int; _T2 = long 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:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from commuter_pass.cpp:2:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   candidate expects 2 arguments, 1 provided
  150 |  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 commuter_pass.cpp:2:
/usr/include/c++/10/bits/stl_pair.h:329:27: note: candidate: 'template<class _U1, typename std::enable_if<_MoveCopyPair<false, _U1, long 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 = long int; _T2 = long 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:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/c++allocator.h:33,
                 from /usr/include/c++/10/bits/allocator.h:46,
                 from /usr/include/c++/10/string:41,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/in