Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

// int main()
// {
//     vector<vector<vector<ll>>> Lun(12, vector<vector<ll>>(10, vector<ll>(0)));

//     int K;
//     cin >> K;

//     vector<ll> nums(0);

//     for (int i = 0; i < 10; i++)
//     {

//         Lun[0][i].push_back(i);

//         if (i != 0)
//         {
//             nums.push_back(i);
//         }
//     }

//     for (int i = 1; i < 12; i++)
//     {

//         for (int j = 0; j < 10; j++)
//         {

//             if (j > 0)
//             {

//                 for (int k = 0; k < Lun[i - 1][j - 1].size(); k++)
//                 {

//                     ll A = j * pow(10, i) + Lun[i - 1][j - 1][k];

//                     Lun[i][j].push_back(A);

//                     nums.push_back(A);
//                 }
//             }

//             for (int k = 0; k < Lun[i - 1][j].size(); k++)
//             {

//                 ll A = j * pow(10, i) + Lun[i - 1][j][k];

//                 Lun[i][j].push_back(A);

//                 if (j != 0)
//                 {

//                     nums.push_back(A);
//                 }
//             }

//             if (j < 9)
//             {

//                 for (int k = 0; k < Lun[i - 1][j + 1].size(); k++)
//                 {

//                     ll A = j * pow(10, i) + Lun[i - 1][j + 1][k];

//                     Lun[i][j].push_back(A);

//                     if (j != 0)
//                     {
//                         nums.push_back(A);
//                     }
//                 }
//             }
//         }
//     }

//     sort(nums.begin(),nums.end());

//     cout << nums[K-1] << endl;

//     return 0;
// }

int main()
{

    int K;
    cin >> K;

    queue<ll> A;


    for(int i=1; i<10;i++){

        A.push_back(i);
    }

    int count = 9;
    while (count < K)
    {
        ll a = A.front();

        A.pop_front();

        if (a % 10 != 0)
        {

            A.push_back(a * 10 + a % 10 - 1);
            count++;
            if (count == K)
            {

                break;
            }
        }
        A.push_back(a * 10 + a % 10);

        count++;
        if (count == K)
        {

            break;
        }

        if (a % 10 != 9)
        {

            A.push_back(a * 10 + a % 10 + 1);

            count++;
            if (count == K)
            {

                break;
            }
        }
    }


    cout << A.back() << endl;

    retunrn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:97:11: error: 'class std::queue<long long int>' has no member named 'push_back'
   97 |         A.push_back(i);
      |           ^~~~~~~~~
a.cc:105:11: error: 'class std::queue<long long int>' has no member named 'pop_front'
  105 |         A.pop_front();
      |           ^~~~~~~~~
a.cc:110:15: error: 'class std::queue<long long int>' has no member named 'push_back'
  110 |             A.push_back(a * 10 + a % 10 - 1);
      |               ^~~~~~~~~
a.cc:118:11: error: 'class std::queue<long long int>' has no member named 'push_back'
  118 |         A.push_back(a * 10 + a % 10);
      |           ^~~~~~~~~
a.cc:130:15: error: 'class std::queue<long long int>' has no member named 'push_back'
  130 |             A.push_back(a * 10 + a % 10 + 1);
      |               ^~~~~~~~~
a.cc:144:5: error: 'retunrn' was not declared in this scope
  144 |     retunrn 0;
      |     ^~~~~~~