Submission #605845

#TimeUsernameProblemLanguageResultExecution timeMemory
605845rrrr10000Split the Attractions (IOI19_split)C++14
Compilation error
0 ms0 KiB
#include "split.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vi; typedef vector<vi> vvi; typedef vector<vvi> vvvi; typedef pair<ll,ll> P; typedef vector<P> vp; typedef vector<vp> vvp; typedef vector<vvp> vvvp; // typedef vector<bool> vb; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define REP(i,k,n) for(ll i=(ll)(k);i<(ll)(n);i++) #define all(a) a.begin(),a.end() #define rsort(a) {sort(all(a));reverse(all(a));} #define fi first #define se second #define pb emplace_back template<class T> void out(T a){cout<<a<<endl;} template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<endl;} template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;} const ll inf=1001001001; struct UF{ vi par,sz; UF(ll n):par(n,-1),sz(n,1){} bool merge(ll a,ll b){ a=root(a);b=root(b); if(a==b)return false; if(sz[a]<sz[b])swap(a,b); sz[a]+=sz[b];par[b]=a; return true; } ll root(ll i){ if(par[i]==-1)return i; return root(par[i]); } }; long double time_start; long double gettime(){ return (clock()-time_start)/CLOCKS_PER_SEC; } vector<int> find_split(int n, int A, int B, int C, vector<int> p, vector<int> q) { time_start=clock(); ll k=min({A,B,C}); vector<int> res(n); vvp g1(n); ll m=p.size(); rep(i,m){ g1[p[i]].pb(q[i],i); g1[q[i]].pb(p[i],i); } vi lk(n,inf),dep(n,-1),par(n); vector<bool> kan(n,false); vi id_ver(n),id_edge(m); ll num_kan=0,num_=0; function<void(ll,ll,ll)> dfs1=[&](ll i,ll p,ll d){ par[i]=p;dep[i]=d; for(auto x:g1[i])if(x.fi!=p){ if(dep[x.fi]==-1){ dfs1(x.fi,i,d+1); chmin(lk[i],lk[x.fi]); } else chmin(lk[i],dep[x.fi]); } };dfs1(0,-1,0); function<void(ll,ll)> dfs2=[&](ll i,ll e){ if(i==0){ vi al; for(auto x:g1[i]){ if(par[x.fi]==i){ id_edge[x.se]=num_++; al.pb(id_edge[x.se]); dfs2(x.fi,x.se); } } if(al.size()>1)kan[i]=true; else id_ver[i]=al[0]; return; } for(auto x:g1[i])if(x.fi!=par[i]){ if(par[x.fi]==i){ if(lk[x.fi]>=dep[i]){ kan[i]=true; id_edge[x.se]=num_++; } else id_edge[x.se]=id_edge[e]; dfs2(x.fi,x.se); } else if(dep[x.fi]<dep[i])id_edge[x.se]=id_edge[e]; } if(!kan[i])id_ver[i]=id_edge[e]; };dfs2(0,-1); rep(i,n)if(kan[i])id_ver[i]=(num_kan++)+num_; ll c=num_+num_kan; vvp g2(c); rep(i,m){ if(id_edge[i]!=id_ver[p[i]]){ g2[id_edge[i]].pb(id_ver[p[i]]); g2[id_ver[p[i]]].pb(id_edge[i]); } if(id_edge[i]!=id_ver[q[i]]){ g2[id_edge[i]].pb(id_ver[q[i]]); g2[id_ver[q[i]]].pb(id_edge[i]); } } queue<ll> que; vi deg(c); rep(i,c)deg[i]=g2[i].size(); vvi gr1(c); rep(i,n)gr1[id_ver[i]].pb(i); rep(i,c)if(gr1[i].size()<k&&deg[i]==1)que.push(i); vector<bool> done(c,false); while(!que.empty()){ ll t=que.front();que.pop(); for(auto x:g2[t])if(!done[x.fi]){ if(gr1[x.fi].size()<gr1[t].size())swap(gr1[x.fi],gr1[t]); for(ll y:gr1[t])gr1[x.fi].pb(y); done[t]=true; deg[x.fi]--; if(deg[x.fi]==1&&gr1[x.fi].size()<k)que.push(x.fi); } } vi al; rep(i,c)if(!done[i])al.pb(i); auto sol=[&](ll sz,vector<bool> flag){ ll i=0; while(!flag[i])i++; flag[i]=false; vi res; function<void(ll)> dfs_=[&](ll cur){ if(res.size()==sz)return; res.pb(cur); for(auto x:g1[cur])if(flag[x.fi]){ flag[x.fi]=false; dfs_(x.fi); if(res.size()==sz)return; } };dfs_(i); return res; }; if(al.size()>1){ ll t=0; while(deg[al[t]]!=1||gr1[al[t]].size()>n/2)t++; t=al[t]; vi va,vb,vc; vector<bool> fa(n,false),fb(n,false),fc(n,true); for(ll x:gr1[t])fa[x]=true; rep(i,n)if(!fa[i])fb[i]=true; va=sol(k,fa);vb=sol(n-max({A,B,C})-k,fb); // assert(va.size()==k); // assert(vb.size()==n-max({A,B,C})-k); for(ll x:va)fc[x]=false; for(ll x:vb)fc[x]=false; rep(i,n)if(fc[i])vc.pb(i); // outv(va);outv(vb);outv(vc); if(A!=va.size())swap(va,vb); if(A!=va.size())swap(va,vc); if(B!=vb.size())swap(vb,vc); for(ll x:va)res[x]=1; for(ll x:vb)res[x]=2; for(ll x:vc)res[x]=3; return res; } while(gettime()<=0.9){ vi ord(m); rep(i,m)ord[i]=i; random_shuffle(all(ord)); UF uf(n); vvi g(n); for(ll i:ord)if(uf.merge(p[i],q[i])){ g[p[i]].pb(q[i]);g[q[i]].pb(p[i]); } vi sub(n,1),par(n,-1),al; function<ll(ll,ll)> dfs=[&](ll i,ll p){ al.pb(i); par[i]=p; for(ll x:g[i])if(x!=p){ sub[i]+=dfs(x,i); } return sub[i]; };dfs(0,-1); rep(i,n)if(sub[i]>=k&&sub[i]<=n-k){ al=vi(0);dfs(i,par[i]); vi va,vb,vc; vector<bool> fa(n,false),fb(n,false),fc(n,true); for(ll x:al)fa[x]=true; rep(i,n)if(!fa[i])fb[i]=true; if(al.size()>n/2)swap(fa,fb); va=sol(k,fa);vb=sol(n-max({A,B,C})-k,fb); // assert(va.size()==k); // assert(vb.size()==n-max({A,B,C})-k); for(ll x:va)fc[x]=false; for(ll x:vb)fc[x]=false; rep(i,n)if(fc[i])vc.pb(i); // outv(va);outv(vb);outv(vc); if(A!=va.size())swap(va,vb); if(A!=va.size())swap(va,vc); if(B!=vb.size())swap(vb,vc); for(ll x:va)res[x]=1; for(ll x:vb)res[x]=2; for(ll x:vc)res[x]=3; return res; } } return res; }

Compilation message (stderr)

split.cpp: In function 'std::vector<int> find_split(int, int, int, int, std::vector<int>, std::vector<int>)':
split.cpp:114:26: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'll' {aka 'long long int'} [-Wsign-compare]
  114 |  rep(i,c)if(gr1[i].size()<k&&deg[i]==1)que.push(i);
      |             ~~~~~~~~~~~~~^~
split.cpp:123:37: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'll' {aka 'long long int'} [-Wsign-compare]
  123 |    if(deg[x.fi]==1&&gr1[x.fi].size()<k)que.push(x.fi);
      |                     ~~~~~~~~~~~~~~~~^~
split.cpp: In lambda function:
split.cpp:134:17: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'll' {aka 'long long int'} [-Wsign-compare]
  134 |    if(res.size()==sz)return;
      |       ~~~~~~~~~~^~~~
split.cpp:139:18: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'll' {aka 'long long int'} [-Wsign-compare]
  139 |     if(res.size()==sz)return;
      |        ~~~~~~~~~~^~~~
split.cpp: In function 'std::vector<int> find_split(int, int, int, int, std::vector<int>, std::vector<int>)':
split.cpp:146:41: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  146 |   while(deg[al[t]]!=1||gr1[al[t]].size()>n/2)t++;
      |                        ~~~~~~~~~~~~~~~~~^~~~
split.cpp:159:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  159 |   if(A!=va.size())swap(va,vb);
      |      ~^~~~~~~~~~~
split.cpp:160:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  160 |   if(A!=va.size())swap(va,vc);
      |      ~^~~~~~~~~~~
split.cpp:161:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  161 |   if(B!=vb.size())swap(vb,vc);
      |      ~^~~~~~~~~~~
split.cpp:191:16: warning: comparison of integer expressions of different signedness: 'std::vector<long long int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  191 |    if(al.size()>n/2)swap(fa,fb);
      |       ~~~~~~~~~^~~~
split.cpp:199:8: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  199 |    if(A!=va.size())swap(va,vb);
      |       ~^~~~~~~~~~~
split.cpp:200:8: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  200 |    if(A!=va.size())swap(va,vc);
      |       ~^~~~~~~~~~~
split.cpp:201:8: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  201 |    if(B!=vb.size())swap(vb,vc);
      |       ~^~~~~~~~~~~
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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/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 long int, long long int>; _Args = {long long int&}; _Tp = std::pair<long long int, long long int>]':
/usr/include/c++/10/bits/alloc_traits.h:512:17:   required from 'static void std::allocator_traits<std::allocator<_Tp1> >::construct(std::allocator_traits<std::allocator<_Tp1> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::pair<long long int, long long int>; _Args = {long long int&}; _Tp = std::pair<long long int, long long int>; std::allocator_traits<std::allocator<_Tp1> >::allocator_type = std::allocator<std::pair<long long int, long long int> >]'
/usr/include/c++/10/bits/vector.tcc:115:30:   required from 'void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {long long int&}; _Tp = std::pair<long long int, long long int>; _Alloc = std::allocator<std::pair<long long int, long long int> >]'
split.cpp:101:43:   required from here
/usr/include/c++/10/ext/new_allocator.h:150:4: error: no matching function for call to 'std::pair<long long int, long long int>::pair(long 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/vector:60,
                 from split.h:5,
                 from split.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 = long long int; _T2 = long 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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   mismatched types 'std::tuple<_Tps ...>' and 'long 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/vector:60,
                 from split.h:5,
                 from split.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 = long long int; _T2 = long 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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/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/vector:60,
                 from split.h:5,
                 from split.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<long long int, _U1>::value) || (! std::is_same<long long int, _U2>::value)), long long int, long long int>::_MoveConstructiblePair<_U1, _U2>() && (! std::_PCC<((! std::is_same<long long int, _U1>::value) || (! std::is_same<long long int, _U2>::value)), long long int, long 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 long int; _T2 = long 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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   mismatched types 'std::pair<_T1, _T2>' and 'long 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/vector:60,
                 from split.h:5,
                 from split.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<long long int, _U1>::value) || (! std::is_same<long long int, _U2>::value)), long long int, long long int>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<((! std::is_same<long long int, _U1>::value) || (! std::is_same<long long int, _U2>::value)), long long int, long 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 long int; _T2 = long 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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/usr/include/c++/10/ext/new_allocator.h:150:4: note:   mismatched types 'std::pair<_T1, _T2>' and 'long 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/vector:60,
                 from split.h:5,
                 from split.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 = long long int; _T2 = long 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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/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/vector:60,
                 from split.h:5,
                 from split.cpp:1:
/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 long int; _T2 = long 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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/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/vector:60,
                 from split.h:5,
                 from split.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:343:17: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<false, long 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 long int; _T2 = long 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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/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/vector:60,
                 from split.h:5,
                 from split.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:336:18: note: candidate: 'template<class _U2, typename std::enable_if<_CopyMovePair<true, long 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 long int; _T2 = long 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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/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/vector:60,
                 from split.h:5,
                 from split.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:329:27: note: candidate: 'template<class _U1, typename std::enable_if<_MoveCopyPair<false, _U1, long 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 long int; _T2 = long 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/vector:64,
                 from split.h:5,
                 from split.cpp:1:
/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/vector:60,
                 from split.h:5,
                 from split.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:322:18: note: candidate: 'template<class _U1, typename std