Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef int ll;
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef double db;
#define INF 1e8
#define EPS 1e-9
#define ALL(x) x.begin() , x.end()
#define ALLR(x) x.rbegin() , x.rend()
#define UNIQUE(c) (c).resize(unique(ALL(c)) - (c).begin())
#define PI acos(-1.0) 


int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  
  ll n,x;
  cin>>n;
  ll sec=n;
  n=(1<<n);
  vl c,d;
  multiset<ll> slimes;
  bool o=1;
  for(ll i=0;i<n;i++)
  {
    cin>>x;
    slimes.insert(-x);
  }
  c.push_back(-*slimes.begin());
  slimes.erase(slimes.begin());
  for(int s=0;s<sec;s++)
  {
    queue<int> aux;
    //cout<<c.size()<<endl;
    ll prevs=c.size();
    for(auto ct : c)
    {
        
        auto it= slimes.upper_bound(ALL(slimes));
        if(it==slimes.end())
        {
            o=0;
            break;
        }
        aux.push(-*it);
        //cout<<c[i]<<" "<<*prev(it)<<endl;
        slimes.erase(it);
        
    }
    if(!o)break;
    while(!aux.empty())
    {
      c.push_back(aux.front());
      aux.pop();
    }

  }
  
  if(o)cout<<"Yes\n";
  else cout<<"No\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:36: error: no matching function for call to 'std::multiset<int>::upper_bound(std::multiset<int>::iterator, std::multiset<int>::iterator)'
   41 |         auto it= slimes.upper_bound(ALL(slimes));
      |                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/set:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_multiset.h:852:9: note: candidate: 'template<class _Kt> decltype ((std::multiset<_Key, _Compare, _Alloc>::iterator)(((std::multiset<_Key, _Compare, _Alloc>*)this)->std::multiset<_Key, _Compare, _Alloc>::_M_t._M_upper_bound_tr(__x))) std::multiset<_Key, _Compare, _Alloc>::upper_bound(const _Kt&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
  852 |         upper_bound(const _Kt& __x)
      |         ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_multiset.h:852:9: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_multiset.h:858:9: note: candidate: 'template<class _Kt> decltype ((std::multiset<_Key, _Compare, _Alloc>::iterator)(((const std::multiset<_Key, _Compare, _Alloc>*)this)->std::multiset<_Key, _Compare, _Alloc>::_M_t._M_upper_bound_tr(__x))) std::multiset<_Key, _Compare, _Alloc>::upper_bound(const _Kt&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
  858 |         upper_bound(const _Kt& __x) const
      |         ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_multiset.h:858:9: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_multiset.h:842:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::upper_bound(const key_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator; key_type = int]'
  842 |       upper_bound(const key_type& __x)
      |       ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_multiset.h:842:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_multiset.h:846:7: note: candidate: 'std::multiset<_Key, _Compare, _Alloc>::const_iterator std::multiset<_Key, _Compare, _Alloc>::upper_bound(const key_type&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; const_iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator; key_type = int]'
  846 |       upper_bound(const key_type& __x) const
      |       ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_multiset.h:846:7: note:   candidate expects 1 argument, 2 provided