Language: C++

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ull = unsigned long long;
using st = string;
using db = double;
using vll = vector<long long>;
using vvll = vector<vll>;
using vst = vector<st>;
using vchar = vector<char>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
using vvpll = vector<vpll>;
#define rep(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define vrep(i, vec) for(auto& i : vec)
#define vin(vec) for(auto& i : vec) cin >> i
#define all(v) v.begin(), v.end()
ll mod = 1000000007;

ll mypow(ll x, ll y){
  ll ans = 1;
  rep(i, 0, y) ans = ans * x;
  return ans;
}

int main(){
  ll k;
  cin >> k;
  vector<vvll> luna(100, vvll(10, {}));
  ll count = 0;
  ll keta = 0;
  luna[keta][0] = {0};
  ll ans;
  while(true){
    rep(i, 1, 10){
      if(keta == 0){
        ll now = i;
        luna[keta][i].push_back(now);
        count++;
        ans = now;
        if(count == k) goto OUT;
      }
      else{
        if(i == 1){
          if(keta == 1){
            luna[keta][i].push_back(10);
            count++;
            ans = 10;
            if(count == k) goto OUT;
          }
          rep(j, 0, keta - 1){
            rep(x, 0, 10){
              vrep(y, luna[j][x]){
                ll now = mypow(10, keta) + y;
                luna[keta][i].push_back(now);
                count++;
                ans = now;
                if(count == k) goto OUT;
              } 
            }
          }
        }
        rep(j, -1, 2){
          if(i + j < 10 && i + j > 0){
            vrep(y, luna[keta - 1][i + j]){
              ll now = mypow(10, keta) * i + y;
              luna[keta][i].push_back(now);
              count++;
              ans = now;
              if(count == k) goto OUT;
            }
          }
        }
      }
    }
    keta++;
  }

  OUT:
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:37: error: call of overloaded 'vector(int, <brace-enclosed initializer list>)' is ambiguous
   30 |   vector<vvll> luna(100, vvll(10, {}));
      |                                     ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; size_type = long unsigned int; value_type = std::vector<long long int>; allocator_type = std::allocator<std::vector<long long int> >]'
  569 |       vector(size_type __n, const value_type& __value,
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; size_type = long unsigned int; allocator_type = std::allocator<std::vector<long long int> >]'
  556 |       vector(size_type __n, const allocator_type& __a = allocator_type())
      |       ^~~~~~