Submission #140596

#TimeUsernameProblemLanguageResultExecution timeMemory
140596eriksuenderhauf모임들 (IOI18_meetings)C++11
Compilation error
0 ms0 KiB
//#pragma GCC optimize("O3")
#include "meetings.h"
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
#define mem(a,v) memset((a), (v), sizeof (a))
#define enl printf("\n")
#define case(t) printf("Case #%d: ", (t))
#define ni(n) scanf("%d", &(n))
#define nl(n) scanf("%I64d", &(n))
#define nai(a, n) for (int i = 0; i < (n); i++) ni(a[i])
#define nal(a, n) for (int i = 0; i < (n); i++) nl(a[i])
#define pri(n) printf("%d\n", (n))
#define prl(n) printf("%I64d\n", (n))
#define pii pair<int, int>
#define pil pair<int, long long>
#define pll pair<long long, long long>
#define vii vector<pii>
#define vil vector<pil>
#define vll vector<pll>
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef cc_hash_table<int,int,hash<int>> ht;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> oset;
const double pi = acos(-1);
const int MOD = 1e9 + 7;
const ll INF = 1e18 + 7;
const int MAXN = 75e5 + 5;
const double eps = 1e-9;
int n, q;
vi qryL, qryR;
pii sp[20][MAXN];
vll ans;
vi adj[MAXN];
pll seg[MAXN*4], lz[MAXN*4];

int qry(int l, int r) {
	int x = 31 - __builtin_clz(r-l+1);
	return max(sp[x][l],sp[x][r-(1<<x)]).se;
}

void prop(int l, int r, int k) {
	if (l != r) {
		if (lz[k].fi) {
			lz[k*2] = mp(lz[k].fi, 0);
			lz[k*2+1] = mp(lz[k].fi, 0);
		}
		lz[k*2].se += lz[k].se;
		lz[k*2+1].se += lz[k].se;
	}
	if (lz[k].fi) seg[k] = mp(l*lz[k].fi,r*lz[k].fi);
	seg[k].fi += lz[k].se;
	seg[k].se += lz[k].se;
	lz[k] = mp(0,0);
}

void upd(int l, int r, int k, int a, int b, pll v, bool fl) {
	if (lz[k] != mp(0,0)) prop(l,r,k);
	if (r < a || b < l) return;
	if (a <= l && r <= b) {
		if (fl || r * v.fi + v.se < seg[k].se) {
			lz[k] = v;
			prop(l,r,k);
			return;
		}
		if (seg[k].fi <= l * v.fi + v.se)
			return;
	}
	int m = (l+r) / 2;
	upd(l,m,k*2,a,b,v,fl);
	upd(m+1,r,k*2+1,a,b,v,fl);
	seg[k] = mp(seg[k*2].fi, seg[k*2+1].se);
}

ll qrySeg(int l, int r, int k, int a) {
	if (lz[k] != mp(0,0)) prop(l,r,k);
	if (r < a || a < l) return -INF;
	if (a <= l && r <= a) return seg[k].fi;
	int m = (l+r) / 2;
	return max(qrySeg(l,m,k*2,a),qrySeg(m+1,r,k*2+1,a));
}

int solve(int l, int r) {
	if (r < l) return -1;
	int ind = abs(qry(l,r));
	int l2 = solve(l,ind-1), r2 = solve(ind+1,r);
	upd(0, n-1, 1, ind, ind, mp(1, -ind), 1);
	for (int v: adj[ind])
		ans[v] = min(ans[v], qrySeg(0,n-1,1,qryR[i]) + (ind-qryL[i]+1ll)*sp[0][ind].fi);
	upd(0, n-1, 1, ind, r, mp(0, (ind-l+1ll) * sp[0][ind].fi), 1);
	upd(0, n-1, 1, ind, r, mp(sp[0][ind].fi, (l2 != -1 ? qrySeg(0,n-1,1,ind-1) : 0ll) - (ind-1ll) * sp[0][ind].fi), 0);
	return ind;
}

vll minimum_costs(vi h, vi l, vi r) {
	n = h.size(), q = l.size();
	for (int i = 0; i < q; i++) {
		qryL[i] = l[i];
		qryR[i] = r[i];
		ans.pb(INF);
	}
	for (int i = 0; i < n; i++)
		sp[0][i] = mp(h[i], i);
	for (int i = 1; i < 20; i++)
		for (int j = 0; j <= n-(1<<i); j++)
			sp[i][j] = max(sp[i-1][j], sp[i-1][j+(1<<(i-1))]);
	for (int i = 0; i < q; i++) 
		adj[qry(qryL[i],qryR[i])].pb(i);
	solve(0, n-1);
	reverse(adj, adj + n);
	for (int i = 0; i < q; i++)
		tie(qryL[i], qryR[i]) = mp(n-qryR[i]-1,n-qryL[i]-1);
	for (int i = 0; i < n; i++)
		sp[0][i] = mp(h[n-i-1], -i);
	for (int i = 1; i < 20; i++)
		for (int j = 0; j <= n-(1<<i); j++)
			sp[i][j] = max(sp[i-1][j], sp[i-1][j+(1<<(i-1))]);
	solve(0,n-1);
	return ans;
}

Compilation message (stderr)

meetings.cpp: In function 'void upd(int, int, int, int, int, std::pair<long long int, long long int>, bool)':
meetings.cpp:66:12: error: no match for 'operator!=' (operand types are 'std::pair<long long int, long long int>' and 'std::pair<int, int>')
  if (lz[k] != mp(0,0)) prop(l,r,k);
      ~~~~~~^~~~~~~~~~
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 meetings.cpp:3:
/usr/include/c++/7/bits/regex.h:951: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:951:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
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 meetings.cpp:3:
/usr/include/c++/7/bits/regex.h:1029: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:1029:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
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 meetings.cpp:3:
/usr/include/c++/7/bits/regex.h:1109: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:1109:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
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 meetings.cpp:3:
/usr/include/c++/7/bits/regex.h:1186: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:1186:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<int, int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
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 meetings.cpp:3:
/usr/include/c++/7/bits/regex.h:1260: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:1260:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
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 meetings.cpp:3:
/usr/include/c++/7/bits/regex.h:1337: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:1337:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<int, int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
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 meetings.cpp:3:
/usr/include/c++/7/bits/regex.h:1417: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:1417:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
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 meetings.cpp:3:
/usr/include/c++/7/bits/regex.h:1944:5: note: candidate: template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator!=(const std::__cxx11::match_results<_BiIter, _Alloc>&, const std::__cxx11::match_results<_BiIter, _Alloc>&)
     operator!=(const match_results<_Bi_iter, _Alloc>& __m1,
     ^~~~~~~~
/usr/include/c++/7/bits/regex.h:1944:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/vector:60,
                 from meetings.h:3,
                 from meetings.cpp:2:
/usr/include/c++/7/bits/stl_pair.h:456:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:456:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   deduced conflicting types for parameter '_T1' ('long long int' and 'int')
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/vector:60,
                 from meetings.h:3,
                 from meetings.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:311:5: note: candidate: template<class _Iterator> bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator!=(const reverse_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:311:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::reverse_iterator<_Iterator>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/vector:60,
                 from meetings.h:3,
                 from meetings.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:349:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator!=(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator!=(const reverse_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:349:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::reverse_iterator<_Iterator>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/vector:60,
                 from meetings.h:3,
                 from meetings.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:1130:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
     operator!=(const move_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1130:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::move_iterator<_IteratorL>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/vector:60,
                 from meetings.h:3,
                 from meetings.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:1136:5: note: candidate: template<class _Iterator> bool std::operator!=(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
     operator!=(const move_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1136:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::move_iterator<_IteratorL>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/vector:61:0,
                 from meetings.h:3,
                 from meetings.cpp:2:
/usr/include/c++/7/bits/allocator.h:158:5: note: candidate: template<class _T1, class _T2> bool std::operator!=(const std::allocator<_Tp1>&, const std::allocator<_T2>&)
     operator!=(const allocator<_T1>&, const allocator<_T2>&)
     ^~~~~~~~
/usr/include/c++/7/bits/allocator.h:158:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::allocator<_Tp1>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/vector:61:0,
                 from meetings.h:3,
                 from meetings.cpp:2:
/usr/include/c++/7/bits/allocator.h:164:5: note: candidate: template<class _Tp> bool std::operator!=(const std::allocator<_Tp1>&, const std::allocator<_Tp1>&)
     operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
     ^~~~~~~~
/usr/include/c++/7/bits/allocator.h:164:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::allocator<_Tp1>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/vector:64:0,
                 from meetings.h:3,
                 from meetings.cpp:2:
/usr/include/c++/7/bits/stl_vector.h:1620:5: note: candidate: template<class _Tp, class _Alloc> bool std::operator!=(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
     operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:1620:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::vector<_Tp, _Alloc>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/iosfwd:40:0,
                 from /usr/include/c++/7/ios:38,
                 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 meetings.cpp:3:
/usr/include/c++/7/bits/postypes.h:221:5: note: candidate: template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
     operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
     ^~~~~~~~
/usr/include/c++/7/bits/postypes.h:221:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::fpos<_StateT>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 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 meetings.cpp:3:
/usr/include/c++/7/bits/basic_string.h:6044:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6044:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 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 meetings.cpp:3:
/usr/include/c++/7/bits/basic_string.h:6057:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator!=(const _CharT* __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6057:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   mismatched types 'const _CharT*' and 'std::pair<long long int, long long int>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/string:52:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 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 meetings.cpp:3:
/usr/include/c++/7/bits/basic_string.h:6069:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6069:5: note:   template argument deduction/substitution failed:
meetings.cpp:66:21: note:   'std::pair<long long int, long long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
  if (lz[k] != mp(0,0)) prop(l,r,k);
                     ^
In file included from /usr/include/c++/7/bits/ios_base.h:46:0,
                 from /usr/include/c++/7/ios:42,
                 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 meetings.cpp:3:
/usr/include/c++/7/system_error:319:3: note: candidate: bool std::operator!=(const std::error_code&, const std::error_code&)
   operator!=(const error_code& __lhs, const error_code& __rhs) noexcept
   ^~~~~~~~
/usr/include/c++/7/system_error:319:3: note:   no known conversion for argument 1 from 'std::pair<long long int, long long int>' to 'const std::error_code&'
/usr/include/c++/7/system_error:323:3: note: candidate: bool std::operator!=(const std::error_code&, const std::error_condition&)
   operator!=(const error_code& __lhs, const error_condition& __rhs) noexcept
   ^~~~~~~~
/usr/include/c++/7/system_error:323:3: note:   no known conversion for argument 1 from 'std::pair<long long int, long long int>' to 'const std::error_code&'
/usr/include/c++/7/system_error:327:3: note: candidate: bool std::operator!=(const std::error_condition&, const std::error_code&)
   operator!=(const error_condition& __lhs, const error_code& __rhs) noexcept
   ^~~~~~~~
/usr/include/c++/7/system_error:327:3: note:   no known conversion for argument 1 from 'std::pair<long long int, long long int>' to 'const std::error_condition&'
/usr/include/c++/7/system_error:331:3: note: candidate: bool std::operator!=(const std::error_condition&, const std::error_condition&)
   operator!=(const error_condition& __lhs,
   ^~~~~~~~
/usr/include/c++/7/system_error:331:3: note:   no known conversion for argument 1 from 'std::pair<long long int, long long int>' to 'const std::error_condition&'
In file included from /usr/include/c++/7/bits/locale_facets.h:48:0,
                 from /usr/include/c++/7/bits/basic_ios.h:37,
                 from /usr/include/c++/7/i