제출 #1356351

#제출 시각아이디문제언어결과실행 시간메모리
1356351opeleklanos사탕 분배 (IOI21_candies)C++20
컴파일 에러
0 ms0 KiB
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;

#define ll long long

#define INFI (ll)1000000000000000000


struct segTree{
    int l; int r;
    int lc, rc;
    pair<ll, int> mx;
    pair<ll, int> mn;
    ll lazy;
    segTree(int ind){
        l = r = ind;
        lc = rc = -1;
        mx = mn = {(ll)0, ind};
        lazy = (ll)0;
    }
    segTree(int indxInPool, int le, int ri){
        l = le; r = ri;
        lc = indxInPool*2 + 1;
        rc = indxInPool*2 + 2;
        mx = mn = {0, le};
        lazy = 0;
    }
};

vector<segTree> np;

void build (int l, int r, int ind){
    if(l == r){
        np[ind] = segTree(l);
        return;
    }
    else{
        np[ind] = segTree(ind, l, r);
        build(l, (l+r)/2, np[ind].lc);
        build((l+r)/2 + 1, r, np[ind].rc);
    }
}

void update(int l, int r, ll x, int st){

    np[st].mn.first += np[st].lazy;
    np[st].mx.first += np[st].lazy;
    if(np[st].l != np[st].r){
        np[np[st].lc].lazy += np[st].lazy;
        np[np[st].rc].lazy += np[st].lazy;
    }
    np[st].lazy = 0;

    if(np[st].l == np[st].r){
        np[st].mn.first += x;
        np[st].mx.first += x;
        np[st].lazy = 0;
        return;
    }

    if(np[st].l == l && np[st].r == r){
        np[np[st].lc].lazy += x;
        np[np[st].rc].lazy += x;
        np[st].mn.first += x;
        np[st].mx.first += x;
        np[st].lazy = 0;
        return;
    }
    int mid = (np[st].l + np[st].r)/2;

    if(l<=mid) update(l, min(r, mid), x, np[st].lc);
    if(r>mid) update(max(mid+1, l), r, x, np[st].rc);

    np[st].mn = min(make_pair(np[np[st].lc].mn.first + np[np[st].lc].lazy, np[np[st].lc].mn.second), {np[np[st].rc].mn.first + np[np[st].rc].lazy, np[np[st].rc].mn.second});
    np[st].mx = max(make_pair(np[np[st].lc].mx.first + np[np[st].lc].lazy, np[np[st].lc].mx.second), {np[np[st].rc].mx.first + np[np[st].rc].lazy, np[np[st].rc].mx.second});

}

pair<ll, int> query(int md, int l, int r, int st){
    np[st].mn.first += np[st].lazy;
    np[st].mx.first += np[st].lazy;
    if(np[st].l != np[st].r){
        np[np[st].lc].lazy += np[st].lazy;
        np[np[st].rc].lazy += np[st].lazy;
    }
    np[st].lazy = 0;

    if(np[st].l == np[st].r){
        if(md == 0) return np[st].mn;
        else return np[st].mx;
    }

    int mid = (np[st].l + np[st].r)/2;

    if(md == 0){
        pair<ll, int> ans = {INFI, INFI};
        if(l <= mid) ans = min(ans, query(md, l, min(r, mid), np[st].lc));
        if(r > mid) ans = min(ans, query(md, max(l, mid+1), r, np[st].rc));
        return ans;
    }

    //if(md == 1){
        pair<ll, int> ans = {-INFI, -INFI};
        if(l <= mid) ans = max(ans, query(md, l, min(r, mid), np[st].lc));
        if(r > mid) ans = max(ans, query(md, max(l, mid+1), r, np[st].rc));
        return ans;
    //}
}

int findMaxInd(ll c, int st, pair<ll, int> minR, pair<ll, int> maxR){

    np[st].mn.first += np[st].lazy;
    np[st].mx.first += np[st].lazy;
    if(np[st].l != np[st].r){
        np[np[st].lc].lazy += np[st].lazy;
        np[np[st].rc].lazy += np[st].lazy;
    }
    np[st].lazy = 0;

    if(np[st].l == np[st].r){
        return np[st].l;
    }

    if(max(maxR.first, np[np[st].rc].mx.first + np[np[st].rc].lazy) - min(np[np[st].rc].mn.first + np[np[st].rc].lazy, minR.first) >= c){
        return findMaxInd(c, np[st].rc, minR, maxR);
    }

    pair<ll, int> rMax = {np[np[st].rc].mx.first + np[np[st].rc].lazy, np[np[st].rc].mx.second};
    pair<ll, int> rMin = {np[np[st].rc].mn.first + np[np[st].rc].lazy, np[np[st].rc].mn.second};

    return findMaxInd(c, np[st].lc, min(minR,rMin), max(maxR, rMax));
}

vector<int> distribute_candies(vector<int> C, vector<int> l, vector<int> r, vector<int> v){
    
    int q = v.size();
    np.assign(4*(q+2), segTree(0));
    vector<pair<ll, pair<ll, ll>>> updL;
    for(int i = 0; i<q; i++){
        updL.push_back({l[i], {i+2, v[i]}});
    }
    
    vector<pair<ll, pair<ll, ll>>> updR;
    for(ll i = 0; i<q; i++){
        updR.push_back({r[i], {i+2, v[i]}});
    }

    sort(updL.begin(), updL.end());
    sort(updR.begin(), updR.end());
    build(0, q+1, 0);
    update(0, 0, INFI, 0);
    vector<int> ans;
    for(int i = 0; i<C.size(); i++){
        ll c = C[i];
        int le = upper_bound(updL.begin(), updL.end(), make_pair(i-1, make_pair(INFI, INFI))) - updL.begin();
        int ri = upper_bound(updL.begin(), updL.end(), make_pair(i, make_pair(INFI, INFI))) - updL.begin()-1;
        for(int j = le; j<=ri; j++) update(updL[j].second.first, q+1, updL[j].second.second, 0);

        le = upper_bound(updR.begin(), updR.end(), make_pair(i-2, make_pair(INFI, INFI))) - updR.begin();
        ri = upper_bound(updR.begin(), updR.end(), make_pair(i-1, make_pair(INFI, INFI))) - updR.begin()-1;
        for(int j = le; j<=ri; j++) update(updR[j].second.first, q+1, -updR[j].second.second, 0);

        le = findMaxInd(c, 0, {INFI, INFI}, {-INFI, -INFI});

        auto maxInRange = query(1, le, q+1, 0);
        auto minInRange = query(0, le, q+1, 0);

        if(maxInRange.second > minInRange.second) ans.push_back(query(0, q+1, q+1, 0).first - query(0, maxInRange.second, maxInRange.second, 0).first + c);
        else ans.push_back(query(0, q+1, q+1, 0).first - query(0, minInRange.second, minInRange.second, 0).first);
    }

    return ans;
}

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

In file included from /usr/include/c++/13/bits/stl_algobase.h:71,
                 from /usr/include/c++/13/string:51,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 from candies.cpp:1:
/usr/include/c++/13/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Val_less_iter::operator()(_Value&, _Iterator) const [with _Value = const std::pair<int, std::pair<long long int, long long int> >; _Iterator = __gnu_cxx::__normal_iterator<std::pair<long long int, std::pair<long long int, long long int> >*, std::vector<std::pair<long long int, std::pair<long long int, long long int> > > >]':
/usr/include/c++/13/bits/stl_algo.h:2035:14:   required from 'constexpr _ForwardIterator std::__upper_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = __gnu_cxx::__normal_iterator<pair<long long int, pair<long long int, long long int> >*, vector<pair<long long int, pair<long long int, long long int> > > >; _Tp = pair<int, pair<long long int, long long int> >; _Compare = __gnu_cxx::__ops::_Val_less_iter]'
/usr/include/c++/13/bits/stl_algo.h:2070:32:   required from 'constexpr _FIter std::upper_bound(_FIter, _FIter, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterator<pair<long long int, pair<long long int, long long int> >*, vector<pair<long long int, pair<long long int, long long int> > > >; _Tp = pair<int, pair<long long int, long long int> >]'
candies.cpp:158:29:   required from here
/usr/include/c++/13/bits/predefined_ops.h:98:22: error: no match for 'operator<' (operand types are 'const std::pair<int, std::pair<long long int, long long int> >' and 'std::pair<long long int, std::pair<long long int, long long int> >')
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/13/string:48:
/usr/include/c++/13/bits/stl_iterator.h:1189:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> constexpr std::__detail::__synth3way_t<_IteratorR, _IteratorL> __gnu_cxx::operator<=>(const __normal_iterator<_IteratorL, _Container>&, const __normal_iterator<_IteratorR, _Container>&)' (reversed)
 1189 |     operator<=>(const __normal_iterator<_IteratorL, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1189:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'std::pair<long long int, std::pair<long long int, long long int> >' is not derived from 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:583:5: note: candidate: 'template<class _IteratorL, class _IteratorR>  requires  three_way_comparable_with<_IteratorR, _IteratorL, std::partial_ordering> constexpr std::compare_three_way_result_t<_IteratorL, _IteratorR> std::operator<=>(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&)' (reversed)
  583 |     operator<=>(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:583:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'std::pair<long long int, std::pair<long long int, long long int> >' is not derived from 'const std::reverse_iterator<_IteratorL>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1690:5: note: candidate: 'template<class _IteratorL, class _IteratorR>  requires  three_way_comparable_with<_IteratorR, _IteratorL, std::partial_ordering> constexpr std::compare_three_way_result_t<_IteratorL, _IteratorR> std::operator<=>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' (reversed)
 1690 |     operator<=>(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1690:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'std::pair<long long int, std::pair<long long int, long long int> >' is not derived from 'const std::move_iterator<_IteratorL>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/13/bits/basic_string.h:47,
                 from /usr/include/c++/13/string:54:
/usr/include/c++/13/string_view:633:5: note: candidate: 'template<class _CharT, class _Traits> constexpr decltype (__char_traits_cmp_cat<_Traits>(0)) std::operator<=>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' (reversed)
  633 |     operator<=>(basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/13/string_view:633:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'std::pair<long long int, std::pair<long long int, long long int> >' is not derived from 'std::basic_string_view<_CharT, _Traits>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/bits/basic_string.h:3760:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr decltype (__char_traits_cmp_cat<_Traits>(0)) std::operator<=>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' (reversed)
 3760 |     operator<=>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h:3760:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'std::pair<long long int, std::pair<long long int, long long int> >' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/13/bits/uses_allocator_args.h:38,
                 from /usr/include/c++/13/bits/memory_resource.h:41,
                 from /usr/include/c++/13/string:58:
/usr/include/c++/13/tuple:1952:5: note: candidate: 'template<class ... _Tps, class ... _Ups> constexpr std::common_comparison_category_t<decltype (std::__detail::__synth3way(declval<_Tps&>(), declval<_Ups&>()))...> std::operator<=>(const tuple<_UTypes ...>&, const tuple<_UTypes ...>&)' (reversed)
 1952 |     operator<=>(const tuple<_Tps...>& __t, const tuple<_Ups...>& __u)
      |     ^~~~~~~~
/usr/include/c++/13/tuple:1952:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'std::pair<long long int, std::pair<long long int, long long int> >' is not derived from 'const std::tuple<_UTypes ...>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1208:5: note: candidate: 'template<class _Iterator, class _Container> constexpr std::__detail::__synth3way_t<_Iterator> __gnu_cxx::operator<=>(const __normal_iterator<_Iterator, _Container>&, const __normal_iterator<_Iterator, _Container>&)' (rewritten)
 1208 |     operator<=>(const __normal_iterator<_Iterator, _Container>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1208:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:601:5: note: candidate: 'template<class _Iterator>  requires  three_way_comparable<_Iterator, std::partial_ordering> constexpr std::compare_three_way_result_t<_Iterator, _Iterator> std::operator<=>(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorL>&)' (rewritten)
  601 |     operator<=>(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:601:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const std::reverse_iterator<_IteratorL>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1756:5: note: candidate: 'template<class _Iterator>  requires  three_way_comparable<_Iterator, std::partial_ordering> constexpr std::compare_three_way_result_t<_Iterator, _Iterator> std::operator<=>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' (rewritten)
 1756 |     operator<=>(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1756:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const std::move_iterator<_IteratorL>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/13/bits/stl_algobase.h:64:
/usr/include/c++/13/bits/stl_pair.h:819:5: note: candidate: 'template<class _T1, class _T2> constexpr std::common_comparison_category_t<decltype (std::__detail::__synth3way(declval<_Iterator&>(), declval<_Iterator&>())), decltype (std::__detail::__synth3way(declval<_T2&>(), declval<_T2&>()))> std::operator<=>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' (rewritten)
  819 |     operator<=>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_pair.h:819:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   deduced conflicting types for parameter '_T1' ('int' and 'long long int')
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/string_view:625:5: note: candidate: 'template<class _CharT, class _Traits> constexpr decltype (__char_traits_cmp_cat<_Traits>(0)) std::operator<=>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' (rewritten)
  625 |     operator<=>(basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/13/string_view:625:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'std::pair<int, std::pair<long long int, long long int> >' is not derived from 'std::basic_string_view<_CharT, _Traits>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/bits/basic_string.h:3745:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr decltype (__char_traits_cmp_cat<_Traits>(0)) std::operator<=>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' (rewritten)
 3745 |     operator<=>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/13/bits/basic_string.h:3745:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/13/vector:66,
                 from candies.cpp:2:
/usr/include/c++/13/bits/stl_vector.h:2059:5: note: candidate: 'template<class _Tp, class _Alloc> constexpr std::__detail::__synth3way_t<_Iterator> std::operator<=>(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' (rewritten)
 2059 |     operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:2059:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const std::vector<_Tp, _Alloc>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/13/deque:66,
                 from /usr/include/c++/13/queue:62,
                 from candies.cpp:4:
/usr/include/c++/13/bits/stl_deque.h:2309:5: note: candidate: 'template<class _Tp, class _Alloc> std::__detail::__synth3way_t<_Iterator> std::operator<=>(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)' (rewritten)
 2309 |     operator<=>(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_deque.h:2309:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const std::deque<_Tp, _Alloc>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/13/queue:66:
/usr/include/c++/13/bits/stl_queue.h:434:5: note: candidate: 'template<class _Tp, class _Seq>  requires  three_way_comparable<_Seq, std::partial_ordering> std::compare_three_way_result_t<_Seq> std::operator<=>(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&)' (rewritten)
  434 |     operator<=>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_queue.h:434:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const std::queue<_Tp, _Seq>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
In file included from /usr/include/c++/13/bits/ios_base.h:46:
/usr/include/c++/13/system_error:316:3: note: candidate: 'std::strong_ordering std::operator<=>(const error_code&, const error_code&)' (rewritten)
  316 |   operator<=>(const error_code& __lhs, const error_code& __rhs) noexcept
      |   ^~~~~~~~
/usr/include/c++/13/system_error:316:33: note:   no known conversion for argument 1 from 'const std::pair<int, std::pair<long long int, long long int> >' to 'const std::error_code&'
  316 |   operator<=>(const error_code& __lhs, const error_code& __rhs) noexcept
      |               ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/13/system_error:498:3: note: candidate: 'std::strong_ordering std::operator<=>(const error_condition&, const error_condition&)' (rewritten)
  498 |   operator<=>(const error_condition& __lhs,
      |   ^~~~~~~~
/usr/include/c++/13/system_error:498:38: note:   no known conversion for argument 1 from 'const std::pair<int, std::pair<long long int, long long int> >' to 'const std::error_condition&'
  498 |   operator<=>(const error_condition& __lhs,
      |               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/13/bits/stl_iterator.h:550:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_IteratorL>&, const reverse_iterator<_IteratorR>&) requires requires{{std::operator<::__x->base() > std::operator<::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}'
  550 |     operator<(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:550:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const std::reverse_iterator<_IteratorL>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1705:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&) requires requires{{std::operator<::__x->base() < std::operator<::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}'
 1705 |     operator<(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_iterator.h:1705:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const std::move_iterator<_IteratorL>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~
/usr/include/c++/13/bits/stl_queue.h:399:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&)'
  399 |     operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
      |     ^~~~~~~~
/usr/include/c++/13/bits/stl_queue.h:399:5: note:   template argument deduction/substitution failed:
/usr/include/c++/13/bits/predefined_ops.h:98:22: note:   'const std::pair<int, std::pair<long long int, long long int> >' is not derived from 'const std::queue<_Tp, _Seq>'
   98 |       { return __val < *__it; }
      |                ~~~~~~^~~~~~~