Submission #147483

# Submission time Handle Problem Language Result Execution time Memory
147483 2019-08-29T16:52:51 Z mosiashvililuka Split the Attractions (IOI19_split) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;
int z,x,d,e,ka[10],zx,m,la[100009],dp[200009];
vector <int> pas,v[100009];
bool bo[100009];
void dfs(int w){
	if(ka[zx]==0) return;
	bo[w]=1;
	pas[w]=zx;
	ka[zx]--;
	if(ka[zx]==0) return;
	for(vector <int>::iterator it=v[w].begin(); it!=v[w].end(); it++){
		if(bo[(*it)]==1) continue;
		dfs((*it));
		if(ka[zx]==0) return;
	}
}
void dfs2(int w){
	if(ka[zx]==0) return;
	bo[w]=1;
	pas[w]=zx;
	ka[zx]--;
	if(ka[zx]==0) return;
	for(vector <int>::iterator it=v[w].begin(); it!=v[w].end(); it++){
		if(bo[(*it)]==1) continue;
		dfs2((*it));
		if(ka[zx]==0) return;
	}
}
int msh[100009];
void dfsst(int qq, int w){
	msh[qq]=w;
	for(vector <int>::iterator it=v[qq].begin(); it!=v[qq].end(); it++){
		if((*it)==w) continue;
		dfsst((*it),qq);
		dp[qq]+=dp[(*it)];
	}
}
void dfssk(int qq, int w){
	bo[qq]=1;
	if(hh[0].second==0) return;
	pas[qq]=hh[0].second;
	hh[0].second--;
	if(hh[0].second==0) return;
	for(vector <int>::iterator it=v[qq].begin(); it!=v[qq].end(); it++){
		if((*it)==w) continue;
		dfssk((*it),qq);
		if(hh[0].second==0) return;
	}
}
vector <int> find_split(int n, int a, int b, int c, vector <int> p, vector <int> q){
	pas.resize(n);
	ka[1]=a;
	ka[2]=b;
	ka[3]=c;
	zx=0;
	m=p.size();
	for(int h=0; h<m; h++){
		v[p[h]].push_back(q[h]);
		v[q[h]].push_back(p[h]);
	}
	if(m==n-1){
		dfsst(0,-1);
		pair <int, int> hh[4];
		hh[0].first=a;
		hh[0].second=1;
		hh[1]=b;hh[2]=c;sort(h,h+3);
		hh[1].second=2;
		hh[2].second=3;
		for(d=0; d<n; d++){
			if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
				dfssk(d,0);
				zx=hh[1].second;
				ka[zx]=hh[1].first;
				dfs(msh[d],d);
				for(d=0; d<n; d++) if(pas[d]==0) pas[d]=hh[3].second;
			}
		}
		return pas;
	}
	if(a!=1){
	zx=0;
	for(d=0; d<n; d++){
		if(v[d].size()!=1) continue;
		if(bo[d]==0){
			zx++;
			dfs(d);
		}
	}
	if(zx!=0){
	for(d=0; d<n; d++) if(pas[d]==0) pas[d]=3;
	}else{
	    zx=0;
	    for(d=0; d<n; d++){
	        if(bo[d]==0){
	            zx++;
	            dfs(d);
	            break;
	        }
	    }
	    for(d=0; d<n; d++){
	    	if(bo[d]==1){
	    		for(vector <int>::iterator it=v[d].begin(); it!=v[d].end(); it++){
					if(bo[(*it)]==1) continue;
					zx++;
					dfs((*it));
					break;
				}
				if(zx==2) break;
			}
		}
		for(d=0; d<n; d++){
	        if(bo[d]==0){
	            zx++;
	            dfs(d);
	            break;
	        }
	    }
	}
	}else{
		zx=2;
		dfs2(0);
		for(d=0; d<n; d++){
			if(pas[d]==0){pas[d]=1;break;}
		}
		for(d=0; d<n; d++) if(pas[d]==0) pas[d]=3;
	}
	return pas;
}

Compilation message

split.cpp: In function 'void dfssk(int, int)':
split.cpp:41:5: error: 'hh' was not declared in this scope
  if(hh[0].second==0) return;
     ^~
split.cpp:42:10: error: 'hh' was not declared in this scope
  pas[qq]=hh[0].second;
          ^~
split.cpp: In function 'std::vector<int> find_split(int, int, int, int, std::vector<int>, std::vector<int>)':
split.cpp:67:9: error: no match for 'operator=' (operand types are 'std::pair<int, int>' and 'int')
   hh[1]=b;hh[2]=c;sort(h,h+3);
         ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from split.cpp:1:
/usr/include/c++/7/bits/stl_pair.h:367:7: note: candidate: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable<_Tp>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch_no_braces&>::type) [with _T1 = int; _T2 = int; typename std::conditional<std::__and_<std::is_copy_assignable<_Tp>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch_no_braces&>::type = const std::pair<int, int>&]
       operator=(typename conditional<
       ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:367:7: note:   no known conversion for argument 1 from 'int' to 'std::conditional<true, const std::pair<int, int>&, const std::__nonesuch_no_braces&>::type {aka const std::pair<int, int>&}'
/usr/include/c++/7/bits/stl_pair.h:384:7: note: candidate: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch_no_braces&&>::type) [with _T1 = int; _T2 = int; typename std::conditional<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch_no_braces&&>::type = std::pair<int, int>&&]
       operator=(typename conditional<
       ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:384:7: note:   no known conversion for argument 1 from 'int' to 'std::conditional<true, std::pair<int, int>&&, std::__nonesuch_no_braces&&>::type {aka std::pair<int, int>&&}'
/usr/include/c++/7/bits/stl_pair.h:400:2: note: candidate: template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, const _U1&>, std::is_assignable<_T2&, const _U2&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
  operator=(const pair<_U1, _U2>& __p)
  ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:400:2: note:   template argument deduction/substitution failed:
split.cpp:67:9: note:   mismatched types 'const std::pair<_T1, _T2>' and 'int'
   hh[1]=b;hh[2]=c;sort(h,h+3);
         ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from split.cpp:1:
/usr/include/c++/7/bits/stl_pair.h:411:2: note: candidate: template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, _U1&&>, std::is_assignable<_T2&, _U2&&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
  operator=(pair<_U1, _U2>&& __p)
  ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:411:2: note:   template argument deduction/substitution failed:
split.cpp:67:9: note:   mismatched types 'std::pair<_T1, _T2>' and 'int'
   hh[1]=b;hh[2]=c;sort(h,h+3);
         ^
split.cpp:67:17: error: no match for 'operator=' (operand types are 'std::pair<int, int>' and 'int')
   hh[1]=b;hh[2]=c;sort(h,h+3);
                 ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from split.cpp:1:
/usr/include/c++/7/bits/stl_pair.h:367:7: note: candidate: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable<_Tp>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch_no_braces&>::type) [with _T1 = int; _T2 = int; typename std::conditional<std::__and_<std::is_copy_assignable<_Tp>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch_no_braces&>::type = const std::pair<int, int>&]
       operator=(typename conditional<
       ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:367:7: note:   no known conversion for argument 1 from 'int' to 'std::conditional<true, const std::pair<int, int>&, const std::__nonesuch_no_braces&>::type {aka const std::pair<int, int>&}'
/usr/include/c++/7/bits/stl_pair.h:384:7: note: candidate: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch_no_braces&&>::type) [with _T1 = int; _T2 = int; typename std::conditional<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch_no_braces&&>::type = std::pair<int, int>&&]
       operator=(typename conditional<
       ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:384:7: note:   no known conversion for argument 1 from 'int' to 'std::conditional<true, std::pair<int, int>&&, std::__nonesuch_no_braces&&>::type {aka std::pair<int, int>&&}'
/usr/include/c++/7/bits/stl_pair.h:400:2: note: candidate: template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, const _U1&>, std::is_assignable<_T2&, const _U2&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
  operator=(const pair<_U1, _U2>& __p)
  ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:400:2: note:   template argument deduction/substitution failed:
split.cpp:67:17: note:   mismatched types 'const std::pair<_T1, _T2>' and 'int'
   hh[1]=b;hh[2]=c;sort(h,h+3);
                 ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/ios:40,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from split.cpp:1:
/usr/include/c++/7/bits/stl_pair.h:411:2: note: candidate: template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, _U1&&>, std::is_assignable<_T2&, _U2&&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
  operator=(pair<_U1, _U2>&& __p)
  ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:411:2: note:   template argument deduction/substitution failed:
split.cpp:67:17: note:   mismatched types 'std::pair<_T1, _T2>' and 'int'
   hh[1]=b;hh[2]=c;sort(h,h+3);
                 ^
split.cpp:67:24: error: 'h' was not declared in this scope
   hh[1]=b;hh[2]=c;sort(h,h+3);
                        ^
split.cpp:67:24: note: suggested alternative: 'hh'
   hh[1]=b;hh[2]=c;sort(h,h+3);
                        ^
                        hh
split.cpp:71:12: error: no match for 'operator>=' (operand types are 'int' and 'std::pair<int, int>')
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
       ~~~~~^~~~~~~
In file included from /usr/include/c++/7/regex:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110,
                 from split.cpp:1:
/usr/include/c++/7/bits/regex.h:984:5: note: candidate: template<class _BiIter> bool std::__cxx11::operator>=(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)
     operator>=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
     ^~~~~~~~
/usr/include/c++/7/bits/regex.h:984:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/c++/7/regex:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110,
                 from split.cpp:1:
/usr/include/c++/7/bits/regex.h:1068:5: note: candidate: template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>=(std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const std::__cxx11::sub_match<_BiIter>&)
     operator>=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/regex.h:1068:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'int'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/c++/7/regex:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110,
                 from split.cpp:1:
/usr/include/c++/7/bits/regex.h:1148:5: note: candidate: template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>=(const std::__cxx11::sub_match<_BiIter>&, std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)
     operator>=(const sub_match<_Bi_iter>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/regex.h:1148:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/c++/7/regex:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110,
                 from split.cpp:1:
/usr/include/c++/7/bits/regex.h:1222:5: note: candidate: template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type*, const std::__cxx11::sub_match<_BiIter>&)
     operator>=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/regex.h:1222:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   'std::pair<int, int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/c++/7/regex:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110,
                 from split.cpp:1:
/usr/include/c++/7/bits/regex.h:1296:5: note: candidate: template<class _Bi_iter> bool std::__cxx11::operator>=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)
     operator>=(const sub_match<_Bi_iter>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/regex.h:1296:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/c++/7/regex:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110,
                 from split.cpp:1:
/usr/include/c++/7/bits/regex.h:1376:5: note: candidate: template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type&, const std::__cxx11::sub_match<_BiIter>&)
     operator>=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/regex.h:1376:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   'std::pair<int, int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/c++/7/regex:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110,
                 from split.cpp:1:
/usr/include/c++/7/bits/regex.h:1456:5: note: candidate: template<class _Bi_iter> bool std::__cxx11::operator>=(const std::__cxx11::sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)
     operator>=(const sub_match<_Bi_iter>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/regex.h:1456:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/c++/7/future:39:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:105,
                 from split.cpp:1:
/usr/include/c++/7/thread:297:3: note: candidate: bool std::operator>=(std::thread::id, std::thread::id)
   operator>=(thread::id __x, thread::id __y) noexcept
   ^~~~~~~~
/usr/include/c++/7/thread:297:3: note:   no known conversion for argument 1 from 'int' to 'std::thread::id'
In file included from /usr/include/c++/7/forward_list:38:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:104,
                 from split.cpp:1:
/usr/include/c++/7/bits/forward_list.h:1413:5: note: candidate: template<class _Tp, class _Alloc> bool std::operator>=(const std::forward_list<_Tp, _Alloc>&, const std::forward_list<_Tp, _Alloc>&)
     operator>=(const forward_list<_Tp, _Alloc>& __lx,
     ^~~~~~~~
/usr/include/c++/7/bits/forward_list.h:1413:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   mismatched types 'const std::forward_list<_Tp, _Alloc>' and 'int'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95:0,
                 from split.cpp:1:
/usr/include/c++/7/valarray:1189:1: note: candidate: template<class _Tp> std::_Expr<std::_BinClos<std::__greater_equal, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__greater_equal, _Tp>::result_type> std::operator>=(const _Tp&, const std::valarray<_Tp>&)
 _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
 ^
/usr/include/c++/7/valarray:1189:1: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   'std::pair<int, int>' is not derived from 'const std::valarray<_Tp>'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95:0,
                 from split.cpp:1:
/usr/include/c++/7/valarray:1189:1: note: candidate: template<class _Tp> std::_Expr<std::_BinClos<std::__greater_equal, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__greater_equal, _Tp>::result_type> std::operator>=(const std::valarray<_Tp>&, const _Tp&)
 _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
 ^
/usr/include/c++/7/valarray:1189:1: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   mismatched types 'const std::valarray<_Tp>' and 'int'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95:0,
                 from split.cpp:1:
/usr/include/c++/7/valarray:1189:1: note: candidate: template<class _Tp> std::_Expr<std::_BinClos<std::__greater_equal, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__greater_equal, _Tp>::result_type> std::operator>=(const std::valarray<_Tp>&, const std::valarray<_Tp>&)
 _DEFINE_BINARY_OPERATOR(>=, __greater_equal)
 ^
/usr/include/c++/7/valarray:1189:1: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   mismatched types 'const std::valarray<_Tp>' and 'int'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/c++/7/valarray:592:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95,
                 from split.cpp:1:
/usr/include/c++/7/bits/valarray_after.h:419:5: note: candidate: template<class _Dom> std::_Expr<std::_BinClos<std::__greater_equal, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__greater_equal, typename _Dom1::value_type>::result_type> std::operator>=(const std::valarray<typename _Dom::value_type>&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)
     _DEFINE_EXPR_BINARY_OPERATOR(>=, __greater_equal)
     ^
/usr/include/c++/7/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   'std::pair<int, int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included from /usr/include/c++/7/valarray:592:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:95,
                 from split.cpp:1:
/usr/include/c++/7/bits/valarray_after.h:419:5: note: candidate: template<class _Dom> std::_Expr<std::_BinClos<std::__greater_equal, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__greater_equal, typename _Dom1::value_type>::result_type> std::operator>=(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray<typename _Dom::value_type>&)
     _DEFINE_EXPR_BINARY_OPERATOR(>=, __greater_equal)
     ^
/usr/include/c++/7/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
split.cpp:71:18: note:   mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
    if(dp[d]>=hh[0]&&n-dp[d]>=hh[1]){
                  ^
In file included