Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int64_t push1(int x){
  a=x/10-1;
  if(a=9) return 100000000000;
  else return 10*x+a
}
int64_t push2(int x){
  a=x/10;
  else return 10*x+a
}
int64_t push3(int x){
  a=x/10+1;
  if(a=10) return 100000000000;
  else return 10*x+a
}

int main() {
  vector<int64_t> vec,vec2,vec3,vec4,vec5,vec6,vec7,vec8,vec9,vec10;
  rep(i,9){
    vec.push_back.(push1(i));
    vec.push_back.(push2(i));
    vec.push_back.(push3(i));
  }
  for(int x:vec){
    vec2.push_back.(push1(i));
    vec2.push_back.(push2(i));
    vec2.push_back.(push3(i));
  }
  for(int x:vec2){
    vec3.push_back.(push1(i));
    vec3.push_back.(push2(i));
    vec3.push_back.(push3(i));
  }
  for(int x:vec3){
    vec4.push_back.(push1(i));
    vec4.push_back.(push2(i));
    vec4.push_back.(push3(i));
  }
  for(int x:vec4){
    vec5.push_back.(push1(i));
    vec5.push_back.(push2(i));
    vec5.push_back.(push3(i));
  }
  for(int x:vec5){
    vec6.push_back.(push1(i));
    vec6.push_back.(push2(i));
    vec6.push_back.(push3(i));
  }
  for(int x:vec6){
    vec7.push_back.(push1(i));
    vec7.push_back.(push2(i));
    vec7.push_back.(push3(i));
  }
  for(int x:vec7){
    vec8.push_back.(push1(i));
    vec8.push_back.(push2(i));
    vec8.push_back.(push3(i));
  }
  for(int x:vec8){
    vec9.push_back.(push1(i));
    vec9.push_back.(push2(i));
    vec9.push_back.(push3(i));
  }
  vector<int64_t> vec10={1,2,3,4,5,6,7,8,9};
  vector<int64_t> fial;
  for(int x:vec10) vec.push_back(x);
  for(int x:vec1) vec.push_back(x);
  for(int x:vec2) vec.push_back(x);
  for(int x:vec3) vec.push_back(x);
  for(int x:vec4) vec.push_back(x);
  for(int x:vec5) vec.push_back(x);
  for(int x:vec6) vec.push_back(x);
  for(int x:vec7) vec.push_back(x);
  for(int x:vec8) vec.push_back(x);
  for(int x:vec9) vec.push_back(x);
  sort(fial.begin(),fial.end());
    
  int k;
  cin >> k;
  cout << fial[k-1] << endl;
}


Compiler output:
a.cc: In function 'int64_t push1(int)':
a.cc:6:3: error: 'a' was not declared in this scope
    6 |   a=x/10-1;
      |   ^
a.cc:8:21: error: expected ';' before '}' token
    8 |   else return 10*x+a
      |                     ^
      |                     ;
    9 | }
      | ~                    
a.cc: In function 'int64_t push2(int)':
a.cc:11:3: error: 'a' was not declared in this scope
   11 |   a=x/10;
      |   ^
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else return 10*x+a
      |   ^~~~
a.cc:12:21: error: expected ';' before '}' token
   12 |   else return 10*x+a
      |                     ^
      |                     ;
   13 | }
      | ~                    
a.cc: In function 'int64_t push3(int)':
a.cc:15:3: error: 'a' was not declared in this scope
   15 |   a=x/10+1;
      |   ^
a.cc:17:21: error: expected ';' before '}' token
   17 |   else return 10*x+a
      |                     ^
      |                     ;
   18 | }
      | ~                    
a.cc: In function 'int main()':
a.cc:23:9: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   23 |     vec.push_back.(push1(i));
      |     ~~~~^~~~~~~~~
a.cc:24:9: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   24 |     vec.push_back.(push2(i));
      |     ~~~~^~~~~~~~~
a.cc:25:9: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   25 |     vec.push_back.(push3(i));
      |     ~~~~^~~~~~~~~
a.cc:28:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   28 |     vec2.push_back.(push1(i));
      |     ~~~~~^~~~~~~~~
a.cc:28:27: error: 'i' was not declared in this scope
   28 |     vec2.push_back.(push1(i));
      |                           ^
a.cc:29:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   29 |     vec2.push_back.(push2(i));
      |     ~~~~~^~~~~~~~~
a.cc:30:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   30 |     vec2.push_back.(push3(i));
      |     ~~~~~^~~~~~~~~
a.cc:33:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   33 |     vec3.push_back.(push1(i));
      |     ~~~~~^~~~~~~~~
a.cc:33:27: error: 'i' was not declared in this scope
   33 |     vec3.push_back.(push1(i));
      |                           ^
a.cc:34:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   34 |     vec3.push_back.(push2(i));
      |     ~~~~~^~~~~~~~~
a.cc:35:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   35 |     vec3.push_back.(push3(i));
      |     ~~~~~^~~~~~~~~
a.cc:38:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   38 |     vec4.push_back.(push1(i));
      |     ~~~~~^~~~~~~~~
a.cc:38:27: error: 'i' was not declared in this scope
   38 |     vec4.push_back.(push1(i));
      |                           ^
a.cc:39:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   39 |     vec4.push_back.(push2(i));
      |     ~~~~~^~~~~~~~~
a.cc:40:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   40 |     vec4.push_back.(push3(i));
      |     ~~~~~^~~~~~~~~
a.cc:43:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   43 |     vec5.push_back.(push1(i));
      |     ~~~~~^~~~~~~~~
a.cc:43:27: error: 'i' was not declared in this scope
   43 |     vec5.push_back.(push1(i));
      |                           ^
a.cc:44:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   44 |     vec5.push_back.(push2(i));
      |     ~~~~~^~~~~~~~~
a.cc:45:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   45 |     vec5.push_back.(push3(i));
      |     ~~~~~^~~~~~~~~
a.cc:48:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   48 |     vec6.push_back.(push1(i));
      |     ~~~~~^~~~~~~~~
a.cc:48:27: error: 'i' was not declared in this scope
   48 |     vec6.push_back.(push1(i));
      |                           ^
a.cc:49:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   49 |     vec6.push_back.(push2(i));
      |     ~~~~~^~~~~~~~~
a.cc:50:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   50 |     vec6.push_back.(push3(i));
      |     ~~~~~^~~~~~~~~
a.cc:53:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   53 |     vec7.push_back.(push1(i));
      |     ~~~~~^~~~~~~~~
a.cc:53:27: error: 'i' was not declared in this scope
   53 |     vec7.push_back.(push1(i));
      |                           ^
a.cc:54:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   54 |     vec7.push_back.(push2(i));
      |     ~~~~~^~~~~~~~~
a.cc:55:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   55 |     vec7.push_back.(push3(i));
      |     ~~~~~^~~~~~~~~
a.cc:58:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   58 |     vec8.push_back.(push1(i));
      |     ~~~~~^~~~~~~~~
a.cc:58:27: error: 'i' was not declared in this scope
   58 |     vec8.push_back.(push1(i));
      |                           ^
a.cc:59:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   59 |     vec8.push_back.(push2(i));
      |     ~~~~~^~~~~~~~~
a.cc:60:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   60 |     vec8.push_back.(push3(i));
      |     ~~~~~^~~~~~~~~
a.cc:63:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   63 |     vec9.push_back.(push1(i));
      |     ~~~~~^~~~~~~~~
a.cc:63:27: error: 'i' was not declared in this scope
   63 |     vec9.push_back.(push1(i));
      |                           ^
a.cc:64:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   64 |     vec9.push_back.(push2(i));
      |     ~~~~~^~~~~~~~~
a.cc:65:10: error: invalid use of member function 'std::vector<long int>::push_back' (did you forget the '()' ?)
   65 |     vec9.push_back.(push3(i));
      |     ~~~~~^~~~~~~~~
a.cc:67:19: error: redeclaration of 'std::vector<long int> vec10'
   67 |   vector<int64_t> vec10={1,2,3,4,5,6,7,8,9};
      |                   ^~~~~
a.cc:21:63: note: 'std::vector<long int> vec10' previously declared here
   21 |   vector<int64_t> vec,vec2,vec3,vec4,vec5,vec6,vec7,vec8,vec9,vec10;
      |                                                               ^~~~~
a.cc:70:13: error: 'vec1' was not declared in this scope; did you mean 'vec10'?
   70 |   for(int x:vec1) vec.push_back(x);
      |             ^~~~
      |             vec10