Language: C++

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

int main() {
  int N,M,V,P;
  bool out = false;
  cin >> N >> M >> V >> P;
  vector<int> A(N);
  for(int i =0;i<N;i++){
    cin >> A.at(i);
  }
  int qual = N;
  sort(A.begin(), A.end());
  
  for(int i=0;i<N;i++){
    int x = A.at(i);
    x += M;
    for(int count=0,j=N-1;j>=0;j--){
      if(A.at(j)-x >= 0){
        count++;
      }else if(j>=V){break;}
      
      if(N-count<V){
        qual--;
        break;
      }
    }
    if(out)break;
  }
  cout << qual <<endl;
  
  return 0;
}

Compiler output:
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:5:1: note: in expansion of macro 'int'
    5 | int main() {
      | ^~~
a.cc:5:5: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:6:3: note: in expansion of macro 'int'
    6 |   int N,M,V,P;
      |   ^~~
a.cc:6:7: error: 'N' was not declared in this scope
    6 |   int N,M,V,P;
      |       ^
a.cc:6:9: error: 'M' was not declared in this scope
    6 |   int N,M,V,P;
      |         ^
a.cc:6:11: error: 'V' was not declared in this scope
    6 |   int N,M,V,P;
      |           ^
a.cc:6:13: error: 'P' was not declared in this scope
    6 |   int N,M,V,P;
      |             ^
a.cc:3:18: error: template argument 1 is invalid
    3 | #define int long long;
      |                  ^~~~
a.cc:9:10: note: in expansion of macro 'int'
    9 |   vector<int> A(N);
      |          ^~~
a.cc:3:18: error: template argument 2 is invalid
    3 | #define int long long;
      |                  ^~~~
a.cc:9:10: note: in expansion of macro 'int'
    9 |   vector<int> A(N);
      |          ^~~
a.cc:9:13: error: expected primary-expression before '>' token
    9 |   vector<int> A(N);
      |             ^
a.cc:9:15: error: 'A' was not declared in this scope
    9 |   vector<int> A(N);
      |               ^
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:10:7: note: in expansion of macro 'int'
   10 |   for(int i =0;i<N;i++){
      |       ^~~
a.cc:10:11: error: 'i' was not declared in this scope
   10 |   for(int i =0;i<N;i++){
      |           ^
a.cc:10:19: error: expected ')' before ';' token
   10 |   for(int i =0;i<N;i++){
      |      ~            ^
      |                   )
a.cc:10:20: error: 'i' was not declared in this scope
   10 |   for(int i =0;i<N;i++){
      |                    ^
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:13:3: note: in expansion of macro 'int'
   13 |   int qual = N;
      |   ^~~
a.cc:13:7: error: 'qual' was not declared in this scope
   13 |   int qual = N;
      |       ^~~~
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:16:7: note: in expansion of macro 'int'
   16 |   for(int i=0;i<N;i++){
      |       ^~~
a.cc:16:18: error: expected ')' before ';' token
   16 |   for(int i=0;i<N;i++){
      |      ~           ^
      |                  )