제출 #1134677

#제출 시각아이디문제언어결과실행 시간메모리
1134677JelalTkm금 캐기 (IZhO14_divide)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

using namespace std;

#define int long long int

const int N = 1e6 + 10;
const int md = 1e9 + 7;
const int INF = 1e18;

struct node {
  int x, g, d;
};

struct segtree {

  struct node2 {
    int pref_d, suff_d, pref_g, suff_g, seg_d, seg_g, pref_ind, suff_ind, sum_d, sum_g, sum_ind, start;
  };
  vector<node2> tree;
  int size;
 
  void init(int n) {
    size = 1;
    while (size < n) size <<= 1;
    tree.assign(2 * size - 1, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0});
  }
 
  void build(vector<node> &a, int x, int lx, int rx) {
    if (rx - lx == 1) {
      if (lx < (int) a.size()) {
        tree[x].pref_d = tree[x].suff_d = tree[x].seg_d = a[lx].d;
        tree[x].pref_g = tree[x].suff_g = tree[x].seg_g = a[lx].g;
        tree[x].pref_ind = tree[x].suff_ind = a[lx].x;
        tree[x].sum_d = a[lx].d;
        tree[x].sum_g = a[lx].g;
        tree[x].sum_ind = a[lx].x;
        tree[x].start = a[lx].x;
      }
    } else {
      int m = (lx + rx) >> 1;
      build(a, 2 * x + 1, lx, m);
      build(a, 2 * x + 2, m, rx);
      tree[x].pref_d = tree[2 * x + 1].pref_d;
      tree[x].pref_g = tree[2 * x + 1].pref_g;
      tree[x].pref_ind = tree[2 * x + 1].pref_ind;
      if (tree[2 * x + 2].pref_ind - tree[2 * x + 1].start <= tree[2 * x + 1].sum_d + tree[2 * x + 2].pref_d) {
        tree[x].pref_d = tree[2 * x + 1].sum_d + tree[2 * x + 2].pref_d;
        if (tree[2 * x + 2].pref_d)
          tree[x].pref_ind = tree[2 * x + 2].pref_ind;
        else tree[x].pref_ind = tree[2 * x + 1].pref_ind;
        tree[x].pref_g = tree[2 * x + 1].sum_g + tree[2 * x + 2].pref_g;
      }

      tree[x].suff_d = tree[2 * x + 2].suff_d;
      tree[x].suff_g = tree[2 * x + 2].suff_g;
      if (tree[2 * x + 2].suff_g)
        tree[x].suff_ind = tree[2 * x + 2].suff_ind;
      else tree[x].suff_ind = tree[2 * x + 1].suff_ind;
      if (tree[2 * x + 2].sum_ind - tree[2 * x + 1].suff_ind <= tree[2 * x + 2].sum_d + tree[2 * x + 1].suff_d) {
        tree[x].suff_d = tree[2 * x + 2].sum_d + tree[2 * x + 1].suff_d;
        tree[x].suff_ind = tree[2 * x + 1].suff_ind;
        tree[x].suff_g = tree[2 * x + 2].sum_g + tree[2 * x + 1].suff_g;
      }

      tree[x].sum_d = tree[2 * x + 1].sum_d + tree[2 * x + 2].sum_d;
      tree[x].sum_g = tree[2 * x + 1].sum_g + tree[2 * x + 2].sum_g;
      tree[x].start = tree[2 * x + 1].start;
      if (tree[2 * x + 2].sum_d)
        tree[x].sum_ind = tree[2 * x + 2].sum_ind;
      else tree[x].sum_ind = tree[2 * x + 1].sum_ind;
      tree[x].seg_d = max({tree[2 * x + 1].seg_d, tree[2 * x + 2].seg_d, tree[x].pref_d, tree[x].suff_d});
      tree[x].seg_g = max({tree[2 * x + 1].seg_g, tree[2 * x + 2].seg_g, tree[x].pref_g, tree[x].suff_g});
    }
  }
 
  void build(vector<node> &a) {
    init((int) a.size());
    build(a, 0, 0, size);
  }

  int get() {
    return tree[0].seg_g;
  }
 
  // void set(int i, int v, int x, int lx, int rx) {
  //   if (rx - lx == 1) {
  //     tree[x] = v;
  //     return;
  //   }
  //   int m = (lx + rx) >> 1;
  //   if (i < m) {
  //     set(i, v, 2 * x + 1, lx, m);
  //   } else {
  //     set(i, v, 2 * x + 2, m, rx);
  //   }
  //   tree[x] = tree[2 * x + 1] + tree[2 * x + 2];
  // }
 
  // void set(int i, int v) {
  //   set(i, v, 0, 0, size);
  // }
 
  // int sum(int l, int r, int x, int lx, int rx) {
  //   if (l >= rx || lx >= r) {
  //     return 0;
  //   }
  //   if (lx >= l && rx <= r) {
  //     return tree[x];
  //   }
  //   int m = (lx + rx) >> 1;
  //   int s1 = sum(l, r, 2 * x + 1, lx, m);
  //   int s2 = sum(l, r, 2 * x + 2, m, rx);
  //   return s1 + s2;
  // }
 
  // int sum(int l, int r) {
  //   return sum(l, r, 0, 0, size);
  // }
};

int32_t main(int32_t argc, char *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  
  int T = 1;
  // cin >> T;
  while (T--) {
    int n;
    cin >> n;
    vector<node> a(n);
    for (int i = 0; i < n; i++)
      cin >> a[i].x >> a[i].g >> a[i].d;

    sort(a.begin(), a.end());

    segtree st;
    st.build(a);

    cout << st.get() << '\n';
  }

  return 0;
}

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

In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Iterator2 = __gnu_cxx::__normal_iterator<node*, std::vector<node> >]':
/usr/include/c++/11/bits/stl_algo.h:1884:17:   required from 'constexpr _RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/11/bits/stl_algo.h:1906:40:   required from 'constexpr _RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/11/bits/stl_algo.h:1938:38:   required from 'constexpr void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/11/bits/stl_algo.h:1954:25:   required from 'constexpr void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/11/bits/stl_algo.h:4842:18:   required from 'constexpr void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<node*, std::vector<node> >]'
divide.cpp:137:9:   required from here
/usr/include/c++/11/bits/predefined_ops.h:45:23: error: no match for 'operator<' (operand types are 'node' and 'node')
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:1129:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> constexpr std::__detail::__synth3way_t<_IteratorR, _IteratorL> __gnu_cxx::operator<=>(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)' (reversed)
 1129 |     operator<=>(const __normal_iterator<_IteratorL, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:1129:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:1146:5: note: candidate: 'template<class _Iterator, class _Container> constexpr std::__detail::__synth3way_t<_T1> __gnu_cxx::operator<=>(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)' (rewritten)
 1146 |     operator<=>(const __normal_iterator<_Iterator, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:1146:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:509:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&) requires requires{{std::operator<::__x->base() > std::operator<::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}'
  509 |     operator<(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:509:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::reverse_iterator<_IteratorL>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:1609:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&) requires requires{{std::operator<::__x->base() < std::operator<::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}'
 1609 |     operator<(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:1609:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::move_iterator<_IteratorL>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/bits/locale_conv.h:41,
                 from /usr/include/c++/11/locale:43,
                 from /usr/include/c++/11/iomanip:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:72,
                 from divide.cpp:1:
/usr/include/c++/11/bits/unique_ptr.h:795:5: note: candidate: 'template<class _Tp, class _Dp, class _Up, class _Ep> bool std::operator<(const std::unique_ptr<_Tp, _Dp>&, const std::unique_ptr<_Up, _Ep>&)'
  795 |     operator<(const unique_ptr<_Tp, _Dp>& __x,
      |     ^~~~~~~~
/usr/include/c++/11/bits/unique_ptr.h:795:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/bits/locale_conv.h:41,
                 from /usr/include/c++/11/locale:43,
                 from /usr/include/c++/11/iomanip:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:72,
                 from divide.cpp:1:
/usr/include/c++/11/bits/unique_ptr.h:807:5: note: candidate: 'template<class _Tp, class _Dp> bool std::operator<(const std::unique_ptr<_Tp, _Dp>&, std::nullptr_t)'
  807 |     operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
      |     ^~~~~~~~
/usr/include/c++/11/bits/unique_ptr.h:807:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/bits/locale_conv.h:41,
                 from /usr/include/c++/11/locale:43,
                 from /usr/include/c++/11/iomanip:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:72,
                 from divide.cpp:1:
/usr/include/c++/11/bits/unique_ptr.h:816:5: note: candidate: 'template<class _Tp, class _Dp> bool std::operator<(std::nullptr_t, const std::unique_ptr<_Tp, _Dp>&)'
  816 |     operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
      |     ^~~~~~~~
/usr/include/c++/11/bits/unique_ptr.h:816:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_queue.h:362:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const std::queue<_Tp, _Seq>&, const std::queue<_Tp, _Seq>&)'
  362 |     operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_queue.h:362:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::queue<_Tp, _Seq>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/stack:61,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:89,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_stack.h:337:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const std::stack<_Tp, _Seq>&, const std::stack<_Tp, _Seq>&)'
  337 |     operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_stack.h:337:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::stack<_Tp, _Seq>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__less, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__less, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__less, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__less, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray<typename _Dom::value_type>&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__less, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const std::valarray<typename _Dom::value_type>&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__less, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__less, _Tp>::result_type> std::operator<(const std::valarray<_Tp>&, const std::valarray<_Tp>&)'
 1200 | _DEFINE_BINARY_OPERATOR(<, __less)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1200:1: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::valarray<_Tp>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__less, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__less, _Tp>::result_type> std::operator<(const std::valarray<_Tp>&, const typename std::valarray<_Tp>::value_type&)'
 1200 | _DEFINE_BINARY_OPERATOR(<, __less)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1200:1: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::valarray<_Tp>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__less, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__less, _Tp>::result_type> std::operator<(const typename std::valarray<_Tp>::value_type&, const std::valarray<_Tp>&)'
 1200 | _DEFINE_BINARY_OPERATOR(<, __less)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1200:1: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::valarray<_Tp>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:130,
                 from divide.cpp:1:
/usr/include/c++/11/optional:1063:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_lt_t<_Tp, _Up> std::operator<(const std::optional<_Tp>&, const std::optional<_Up>&)'
 1063 |     operator<(const optional<_Tp>& __lhs, const optional<_Up>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/11/optional:1063:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::optional<_Tp>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:130,
                 from divide.cpp:1:
/usr/include/c++/11/optional:1197:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_lt_t<_Tp, _Up> std::operator<(const std::optional<_Tp>&, const _Up&)'
 1197 |     operator<(const optional<_Tp>& __lhs, const _Up& __rhs)
      |     ^~~~~~~~
/usr/include/c++/11/optional:1197:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::optional<_Tp>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:130,
                 from divide.cpp:1:
/usr/include/c++/11/optional:1203:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_lt_t<_Up, _Tp> std::operator<(const _Up&, const std::optional<_Tp>&)'
 1203 |     operator<(const _Up& __lhs, const optional<_Tp>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/11/optional:1203:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::optional<_Tp>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:133,
                 from divide.cpp:1:
/usr/include/c++/11/variant:1230:3: note: candidate: 'template<class ... _Types> constexpr bool std::operator<(const std::variant<_Types ...>&, const std::variant<_Types ...>&)'
 1230 |   _VARIANT_RELATION_FUNCTION_TEMPLATE(<, less)
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/variant:1230:3: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:45:23: note:   'node' is not derived from 'const std::variant<_Types ...>'
   45 |       { return *__it1 < *__it2; }
      |                ~~~~~~~^~~~~~~~
/usr/include/c++/11/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Val_less_iter::operator()(_Value&, _Iterator) const [with _Value = node; _Iterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >]':
/usr/include/c++/11/bits/stl_algo.h:1806:20:   required from 'constexpr void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Compare = __gnu_cxx::__ops::_Val_less_iter]'
/usr/include/c++/11/bits/stl_algo.h:1834:36:   required from 'constexpr void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/11/bits/stl_algo.h:1866:25:   required from 'constexpr void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/11/bits/stl_algo.h:1957:31:   required from 'constexpr void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<node*, std::vector<node> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/11/bits/stl_algo.h:4842:18:   required from 'constexpr void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<node*, std::vector<node> >]'
divide.cpp:137:9:   required from here
/usr/include/c++/11/bits/predefined_ops.h:98:22: error: no match for 'operator<' (operand types are 'node' and 'node')
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:1129:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> constexpr std::__detail::__synth3way_t<_IteratorR, _IteratorL> __gnu_cxx::operator<=>(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)' (reversed)
 1129 |     operator<=>(const __normal_iterator<_IteratorL, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:1129:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:1146:5: note: candidate: 'template<class _Iterator, class _Container> constexpr std::__detail::__synth3way_t<_T1> __gnu_cxx::operator<=>(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)' (rewritten)
 1146 |     operator<=>(const __normal_iterator<_Iterator, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:1146:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:509:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&) requires requires{{std::operator<::__x->base() > std::operator<::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}'
  509 |     operator<(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:509:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::reverse_iterator<_IteratorL>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:1609:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&) requires requires{{std::operator<::__x->base() < std::operator<::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}'
 1609 |     operator<(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:1609:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::move_iterator<_IteratorL>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/bits/locale_conv.h:41,
                 from /usr/include/c++/11/locale:43,
                 from /usr/include/c++/11/iomanip:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:72,
                 from divide.cpp:1:
/usr/include/c++/11/bits/unique_ptr.h:795:5: note: candidate: 'template<class _Tp, class _Dp, class _Up, class _Ep> bool std::operator<(const std::unique_ptr<_Tp, _Dp>&, const std::unique_ptr<_Up, _Ep>&)'
  795 |     operator<(const unique_ptr<_Tp, _Dp>& __x,
      |     ^~~~~~~~
/usr/include/c++/11/bits/unique_ptr.h:795:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/bits/locale_conv.h:41,
                 from /usr/include/c++/11/locale:43,
                 from /usr/include/c++/11/iomanip:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:72,
                 from divide.cpp:1:
/usr/include/c++/11/bits/unique_ptr.h:807:5: note: candidate: 'template<class _Tp, class _Dp> bool std::operator<(const std::unique_ptr<_Tp, _Dp>&, std::nullptr_t)'
  807 |     operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
      |     ^~~~~~~~
/usr/include/c++/11/bits/unique_ptr.h:807:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/bits/locale_conv.h:41,
                 from /usr/include/c++/11/locale:43,
                 from /usr/include/c++/11/iomanip:43,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:72,
                 from divide.cpp:1:
/usr/include/c++/11/bits/unique_ptr.h:816:5: note: candidate: 'template<class _Tp, class _Dp> bool std::operator<(std::nullptr_t, const std::unique_ptr<_Tp, _Dp>&)'
  816 |     operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
      |     ^~~~~~~~
/usr/include/c++/11/bits/unique_ptr.h:816:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_queue.h:362:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const std::queue<_Tp, _Seq>&, const std::queue<_Tp, _Seq>&)'
  362 |     operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_queue.h:362:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::queue<_Tp, _Seq>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/stack:61,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:89,
                 from divide.cpp:1:
/usr/include/c++/11/bits/stl_stack.h:337:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const std::stack<_Tp, _Seq>&, const std::stack<_Tp, _Seq>&)'
  337 |     operator<(const stack<_Tp, _Seq>& __x, const stack<_Tp, _Seq>& __y)
      |     ^~~~~~~~
/usr/include/c++/11/bits/stl_stack.h:337:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::stack<_Tp, _Seq>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__less, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__less, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__less, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__less, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray<typename _Dom::value_type>&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/valarray:603,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:419:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__less, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__less, typename _Dom1::value_type>::result_type> std::operator<(const std::valarray<typename _Dom::value_type>&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
  419 |     _DEFINE_EXPR_BINARY_OPERATOR(<, struct std::__less)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:419:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__less, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__less, _Tp>::result_type> std::operator<(const std::valarray<_Tp>&, const std::valarray<_Tp>&)'
 1200 | _DEFINE_BINARY_OPERATOR(<, __less)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1200:1: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::valarray<_Tp>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__less, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__less, _Tp>::result_type> std::operator<(const std::valarray<_Tp>&, const typename std::valarray<_Tp>::value_type&)'
 1200 | _DEFINE_BINARY_OPERATOR(<, __less)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1200:1: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::valarray<_Tp>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from divide.cpp:1:
/usr/include/c++/11/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__less, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__less, _Tp>::result_type> std::operator<(const typename std::valarray<_Tp>::value_type&, const std::valarray<_Tp>&)'
 1200 | _DEFINE_BINARY_OPERATOR(<, __less)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1200:1: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::valarray<_Tp>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:130,
                 from divide.cpp:1:
/usr/include/c++/11/optional:1063:5: note: candidate: 'template<class _Tp, class _Up> constexpr std::__optional_lt_t<_Tp, _Up> std::operator<(const std::optional<_Tp>&, const std::optional<_Up>&)'
 1063 |     operator<(const optional<_Tp>& __lhs, const optional<_Up>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/11/optional:1063:5: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:71,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from divide.cpp:1:
/usr/include/c++/11/bits/predefined_ops.h:98:22: note:   'node' is not derived from 'const std::optional<_Tp>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:130,
                 from divide.cpp:1:
/usr/include/c++/11/optional:1197:5: