Language: C++

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

#define ll long long;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
#define memi cout << endl;
#define hina(n) cout << fixed << setprecision(n);
#define mei((vector)a) sort(a.begin(), a.end());

int main(){
int n, k, h;
  cin >> n >> k;
  int a[n];
  rep(i, n)
    cin >> a[i];
  mei(a);
  h = n;
  while(true){
    if(a[n - g] < k])
      g--;
    else{
      cout << g;
      memi;
      return 0;
    }
    if(g == 0){
      cout << 0;
      memi;
      return 0;
    }
  }
}

Compiler output:
a.cc:8:13: error: expected parameter name, found "("
    8 | #define mei((vector)a) sort(a.begin(), a.end());
      |             ^
a.cc: In function 'int main()':
a.cc:4:17: error: declaration does not declare anything [-fpermissive]
    4 | #define ll long long;
      |                 ^~~~
a.cc:5:23: note: in expansion of macro 'll'
    5 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
      |                       ^~
a.cc:14:3: note: in expansion of macro 'rep'
   14 |   rep(i, n)
      |   ^~~
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   rep(i, n)
      |       ^
a.cc:5:26: note: in definition of macro 'rep'
    5 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
      |                          ^
a.cc:4:12: error: expected primary-expression before 'long'
    4 | #define ll long long;
      |            ^~~~
a.cc:5:38: note: in expansion of macro 'll'
    5 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
      |                                      ^~
a.cc:14:3: note: in expansion of macro 'rep'
   14 |   rep(i, n)
      |   ^~~
a.cc:4:12: error: expected ')' before 'long'
    4 | #define ll long long;
      |            ^~~~
a.cc:5:38: note: in expansion of macro 'll'
    5 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
      |                                      ^~
a.cc:14:3: note: in expansion of macro 'rep'
   14 |   rep(i, n)
      |   ^~~
a.cc:5:37: note: to match this '('
    5 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
      |                                     ^
a.cc:14:3: note: in expansion of macro 'rep'
   14 |   rep(i, n)
      |   ^~~
a.cc:4:21: error: expected ')' before ';' token
    4 | #define ll long long;
      |                     ^
a.cc:5:38: note: in expansion of macro 'll'
    5 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
      |                                      ^~
a.cc:14:3: note: in expansion of macro 'rep'
   14 |   rep(i, n)
      |   ^~~
a.cc:5:22: note: to match this '('
    5 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
      |                      ^
a.cc:14:3: note: in expansion of macro 'rep'
   14 |   rep(i, n)
      |   ^~~
a.cc:5:40: error: expected primary-expression before ')' token
    5 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
      |                                        ^
a.cc:14:3: note: in expansion of macro 'rep'
   14 |   rep(i, n)
      |   ^~~
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   rep(i, n)
      |       ^
a.cc:5:46: note: in definition of macro 'rep'
    5 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++);
      |                                              ^
a.cc:16:3: error: 'mei' was not declared in this scope; did you mean 'memi'?
   16 |   mei(a);
      |   ^~~
      |   memi
a.cc:19:14: error: 'g' was not declared in this scope
   19 |     if(a[n - g] < k])
      |              ^
a.cc:19:20: error: expected ')' before ']' token
   19 |     if(a[n - g] < k])
      |       ~            ^
      |                    )
a.cc:19:20: error: expected primary-expression before ']' token
a.cc:26:8: error: 'g' was not declared in this scope
   26 |     if(g == 0){
      |        ^