criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

int main() {
  int M, N;
  cin >> M >> N;
  
  vector<int> vote(N);
  
  for (int i = 0; i < N; i++) {
    cin >> vote(i);
  }
  
  int sum = 0;
  
  for (int i = 0; i < N; i++) {
    sum += vote(i);
  }
  
  for (int i = 0; i < N; i++) {
    if (vote(i) < sum / (4 * M)) {
      cout << "Yes" << endl;
    }
    else { cout << "No"; }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: no match for call to '(std::vector<int>) (int&)'
   11 |     cin >> vote(i);
      |            ~~~~^~~
a.cc:17:16: error: no match for call to '(std::vector<int>) (int&)'
   17 |     sum += vote(i);
      |            ~~~~^~~
a.cc:21:13: error: no match for call to '(std::vector<int>) (int&)'
   21 |     if (vote(i) < sum / (4 * M)) {
      |         ~~~~^~~
a.cc:25:4: error: expected '}' at end of input
   25 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std;
using std::vector;
using std::sort;
vector<int> item(100);
int main(){
    int N,M,sum;
    sum = 0;
    cin >> N >> M;
    for(int i=0;i<N;i++){
        cin >> item[i];
        sum += item[i];
    }
    
    // sort(item.begin(),item.begin()+N);
    // int c;
    c = ceil(sum/4/M);
    // int flag = 0;
    // for(int i=N-1;i>N-1-M;i--){
    //     if(item[i]<c){
    //         flag = 1;
    //         break;
    //     }
    // }

    int count = 0;
    int flag=1;
    for(int i=0;i<N;i++){
        if(item[i]>=c){
            count++;
            if(count==M){
                flag=0;
                break;
            }            
        }
    }

    if(flag){
        cout << "No";
    }else{
        cout <<"Yes";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'c' was not declared in this scope
   20 |     c = ceil(sum/4/M);
      |     ^
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
 
int main(){
    ll n,m,sum=0;
    cin>>n>>m;
    vector<ll> a(n);
    rep(i,n){
        cin>>a[i];
        sum+=a[i];
    }
    sort(all(a),greater<ll>());
    cout<<(a[m-1]>=sum/(4*m)?"Yes":"No")<<endl;
    return 0;
}
#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}

int main(){
    ll n,m,sum=0;
    cin>>n>>m;
    vector<ll> a(n);
    rep(i,n){
        cin>>a[i];
        sum+=a[i];
    }
    sort(all(a),greater<ll>());
    cout<<(a[m-1]>=(double)sum/(4*m)?"Yes":"No")<<endl;
    return 0;
}

Compiler output:
a.cc:26:4: error: redefinition of 'll gcd(ll, ll)'
   26 | ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
      |    ^~~
a.cc:6:4: note: 'll gcd(ll, ll)' previously defined here
    6 | ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
      |    ^~~
a.cc:27:4: error: redefinition of 'll lcm(ll, ll)'
   27 | ll lcm(ll a,ll b){return a*b/gcd(a,b);}
      |    ^~~
a.cc:7:4: note: 'll lcm(ll, ll)' previously defined here
    7 | ll lcm(ll a,ll b){return a*b/gcd(a,b);}
      |    ^~~
a.cc:29:5: error: redefinition of 'int main()'
   29 | int main(){
      |     ^~~~
a.cc:9:5: note: 'int main()' previously defined here
    9 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

int main(void){
  int n,m;
  int sum=0;
  
  cin>>n>>m;
  int a[n]={0};
  for(int i=0;i<n;i++){
    cin>>a[i];
    sum+=a[i];
  }
  
  sort(a, a+(sizeof(a)/sizeof(a[0])),std::greater<>());
  
  if(a[m-1]=>(sum/(4*m))){
    cout<<"Yes";
  }
  else{
    cout<<"No";
  }

  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: expected primary-expression before '>' token
   20 |   if(a[m-1]=>(sum/(4*m))){
      |             ^
Language: C++

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

int main() {
  vector<int> vote(N);
  
  for (int i = 0; i < N; i++) {
    cin >> vote(i);
  }
  
  int sum = 0;
  int M;
  cin >> M;
  
  for (int i = 0; i < N; i++) {
    sum += vote(i)
  }
  
  for (int i = 0; i < N; i++) {
    if (vote(i) < sum / (4 * M)) {
      cout << "Yes" << endl;
    }
    else { cout << "No" }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:20: error: 'N' was not declared in this scope
    5 |   vector<int> vote(N);
      |                    ^
a.cc:8:16: error: no match for call to '(std::vector<int>) (int&)'
    8 |     cin >> vote(i);
      |            ~~~~^~~
a.cc:16:16: error: no match for call to '(std::vector<int>) (int&)'
   16 |     sum += vote(i)
      |            ~~~~^~~
a.cc:20:13: error: no match for call to '(std::vector<int>) (int&)'
   20 |     if (vote(i) < sum / (4 * M)) {
      |         ~~~~^~~
a.cc:23:24: error: expected ';' before '}' token
   23 |     else { cout << "No" }
      |                        ^~
      |                        ;
a.cc:24:4: error: expected '}' at end of input
   24 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int main()
{
	int N, M;
	cin >> N >> M;

	vector<int> vec(N);
	int sum = 0;
	for (int i = 0; i < N; i++)
	{
		cin >> vec[i];
		sum += vec[i];
	}

	int border = floor(sum / 4 / M);
	int pop = 0;

	for (int i = 0; i < N; i++)
	{
		if (vec[i] > border)
		{
			pop++;
		}
	}

	if (pop >= M)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:22: error: 'floor' was not declared in this scope
   18 |         int border = floor(sum / 4 / M);
      |                      ^~~~~
Language: C

#include <stdio.h>
#include <string.h>

int main(void){
    int n,m,a[10000],b=0;
    scanf("%d%d",&n,&m);
    for (int i=1;i<=n;i++){
        scanf("%d",&a[i]);
    }
    for (int j=1;j<=n;j++){
        for (int k=j+1;k<=n;k++){
            if (a[j] < a[k]){
                int tmp = a[j];
                a[j] = a[k];
                a[k] = tmp;
            }
        }
    }
    for (int l=1;l<=n;l++){
        b += a[l];
    }
    if (a[m+1] >= b/4m){
        printf("Yes");
    }else{
        printf("No");
    }
}


Compiler output:
main.c: In function 'main':
main.c:22:21: error: invalid suffix "m" on integer constant
   22 |     if (a[m+1] >= b/4m){
      |                     ^~
Language: Java

import java.util.Scanner;
//int[] date=new int[2];
public class  Main {
int i,o,sum,h,s,e,u,ty,yu,ui,n,num,qw;
double m,t,r,j,k,f,d,g,w;
static double l;
String b,c,z,x,v,a,q;
Scanner scan =new Scanner(System.in);
  	int[] date=new int[2];
//出力
public void output() {
  for(o=0;o<2;o++) {
	date[o]=scan.nextInt();
}
date[1]=date[1]*4;
int[] dat=new int[date[0]];
for(o=0;o<date[0];o++) {
	dat[o]=scan.nextInt();
	dat[o]=dat[o]/date[1];
	if(dat[o]>0) {
		s+=1;
	}
}	
if(s>date[1]) {
	System.out.println("Yes");
}else {
	System.out.println("No");
}
}
	public static void main(String [ ] args) {
		 Main p = new  Main ();
      	p.input();
		p.compute();
		p.output();
		}
	}

Compiler output:
Main.java:32: error: cannot find symbol
      	p.input();
      	 ^
  symbol:   method input()
  location: variable p of type Main
Main.java:33: error: cannot find symbol
		p.compute();
		 ^
  symbol:   method compute()
  location: variable p of type Main
2 errors
Language: C

#include<stdio.h>

int main() {
	int n = 0;
	int m = 0;
	int c = 0;
	int t = 0;
	int v[101];
	scanf("%d %d", &n, &m);
	for (int i = 0; i < n; i++) {
		scanf("%d", &v[i]);
	}
	for (int i = 0; i < n; i++) {
		t = t + v[i];
	}
	for (int i = 0; i < n; i++) {
		if (v[i] => t / (4 * m)) {
			c = c + 1;
		}
	}
	if (c >= m) {
		printf("Yes");
	}
	else {
		printf("No");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:27: error: expected expression before '>' token
   17 |                 if (v[i] => t / (4 * m)) {
      |                           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{int i,N,M,A[1000],count;
 float sum=0;
 cin>>N>>M;
 float res=1/4*M;
 for(i=0;i<N;i++)
 {cin>>A[i];
 sum+=A[i];
 }
 if(A[i]>=(sum/res))
 {count++;
  if(A[i]==A[i+1]);
  break;
 }
 if(count>=M)
 cout<<"yes";
 else
   cout<<"no";
 
 return 0;  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: break statement not within loop or switch
   15 |   break;
      |   ^~~~~
Language: C++

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

int main(){
  int N, M;
  cin >> N >> M;

  int a[N];
  for(int i=0; i<N; i++){
    cin >> a[i];
  }
  for (i=0; i<N; ++i) {
    for (j=i+1; j<N; ++j) {
      if (a[i] < a[j]) {
        tmp =  a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }

  int sum = 0;
  for(int i=0; i<N; i++){
    sum += a[i];
  }

  if(a[M] < sum / (4 * M)){
    cout << "No" << endl;
  }else{
    cout << "Yes" << endl;
  }
  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'i' was not declared in this scope
   12 |   for (i=0; i<N; ++i) {
      |        ^
a.cc:13:10: error: 'j' was not declared in this scope
   13 |     for (j=i+1; j<N; ++j) {
      |          ^
a.cc:15:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   15 |         tmp =  a[i];
      |         ^~~
      |         tm
Language: C++

#include<iostream>
using namespace std;
int main() {
	long long int N, M, all, tmp, k, l;
	long long int A[100];
	double max;
	all = 0;
	cin >> N >> M;
	for (long long int i = 0; i < N; i++) {
		cin >> A[i];
	}
	for (long long int j = 0; j < N; j++) {
		all = all + A[j];
	}
	max = all / (4 * M);
	for (k = 0; k < N; ++k) {
		for (l = k + 1; l < N; ++l) {
			if (A[k] > A[l]) {
				tmp = A[k];
				A[k] = A[l];
				A[l] = tmp;
			}
		}
	}
	if (A[N - M] => max) {
		cout << "Yes" << endl;
		return 0;
	}
	cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: expected primary-expression before '>' token
   25 |         if (A[N - M] => max) {
      |                       ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for((int)(i)=0;(i)<(int)(n);(i)++)
#define ll long long
 
using namespace std;
 
int N,M,sum=0;

 
int main(){
  cin >> N >> M;
    int count = M;
  double div = 0;
  vector<int> A(N);
  
  for(int i = 0;i < N;i++){
    cin >> A.at(i);
    sum += A.at(i);
  }
  
  div = sum / (4 * M)
  
   sort(A.begin(),A.end(),greater<int>());
   
  
  for(int i = 0;i < N;i++){
     if(count == 0){
      cout << "Yes" << endl;
      break;
    }
    
    if((double)A.at(i) < div){
      cout << "No" << endl;
      break;
    }else{
          count--;
    }
    
  }
  
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: expected ';' before 'sort'
   21 |   div = sum / (4 * M)
      |                      ^
      |                      ;
   22 | 
   23 |    sort(A.begin(),A.end(),greater<int>());
      |    ~~~~
Language: C

n, m = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
cnt = 0
for i in a:
    if (i * 4 * m) >= s:
        cnt += 1
if cnt >= m:
    print("Yes")
else:
    print("No")

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n, m = map(int, input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:4: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
    1 | n, m = map(int, input().split())
      |    ^
main.c:1:8: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | n, m = map(int, input().split())
      |        ^~~
main.c:1:12: error: expected expression before 'int'
    1 | n, m = map(int, input().split())
      |            ^~~
main.c:2:1: error: expected ',' or ';' before 'a'
    2 | a = list(map(int, input().split()))
      | ^
Language: C++

#include<stdio.h>
int main()
{
	int n,m;
	scanf("%d %d",&n,&m);
	int a[n+2],sum=0;
	for(int i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		sum+=a[i];
	}
	float x = sum/(4.0*m);
	if(float(a[m-1]>x||float(a[m-1]==x)
		printf("Yes");
	else
		printf("No");
	//printf("%f",x);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: expected primary-expression before 'float'
   13 |         if(float(a[m-1]>x||float(a[m-1]==x)
      |            ^~~~~
a.cc:13:12: error: expected ')' before 'float'
   13 |         if(float(a[m-1]>x||float(a[m-1]==x)
      |           ~^~~~~
      |            )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,m;
    cin>>n>>m;
    int a[n];
    int count1=0;
    int sum=0;
    for(int i=0;i<n;i++){
        cin>>a[i];
        sum=sum+a[i];
    }
    for(int i=0;i<n;i++){
            double s=(double)(a[i]/sum);
            double d=(double(1/(4*m));
       if(s>d){
            count1++;
       }
    }
     if(count1>=m){
        cout<<"Yes";
       }
       else cout<<"No";


}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:38: error: expected ')' before ';' token
   15 |             double d=(double(1/(4*m));
      |                      ~               ^
      |                                      )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int	a[2];
  int i = 0
  long int  c = 0;

  cin >> a[0] >> a[1];
  
  int	b[a[0]];
  

  for(i = 0;i < a[0];i++){
  	cin >> b[i];
  }
  
  for(i = 0;i < a[0];i++){
  	c = c + b[i];
  }
  i = 4 * a[1]; 
  c = c / i;
  
  for(i = 0;i < a[0];i++){
  	if(b[i] < c){
    	b[i] = 0;
    }
  }
  
  c = 0;
  
  for(i = 0;i < a[0];i++){
  	if(b[i] != 0){
    	c = c + 1;
    }
  }
  
  if(c >= a[1]){
  	cout << "Yes";
    return 0;
  }else{
  	cout << "No";
     return 0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'long'
    7 |   long int  c = 0;
      |   ^~~~
a.cc:19:9: error: 'c' was not declared in this scope
   19 |         c = c + b[i];
      |         ^
a.cc:22:3: error: 'c' was not declared in this scope
   22 |   c = c / i;
      |   ^
Language: C

#include<stdio.h>
int main(void){
    int N,M,A,loop,max=0,min=0,sum=0;
    double bet;
    scanf("%d %d",&N,&M);
    for(loop=0;loop<N;loop++){
        scanf("%d",&A);
        if(A_N>max) max=A;
        if(A_N<min) min=A;
        sum+=A;
    }
    bet=sum/(4*M);
    if(max<bet && min<bet){
        printf("No");
    }else{
        printf("Yes");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:12: error: 'A_N' undeclared (first use in this function)
    8 |         if(A_N>max) max=A;
      |            ^~~
main.c:8:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>

void main()
{
 int n,m,i,s=0,t,u=0;
  scanf("%d %d",&n,&m);
 int r[n];

 for(i=0;i<n;i++)
 {
     scanf("%d",&r[i]);
     s=s+r[i];
 }
 t=s/(4*m);
 for(i=0;i<n;i++)
 {
     if(r[i]>t)
        u++;
 }
 if(u>m)
     printf("Yes");
 else
    printf("No");
}


Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
Language: C++

#include<stdio.h>

void main()
{
 int n,m,i,s=0,t,u=0;
  scanf("%d %d",&n,&m);
 int r[n];
 
 for(i=0;i<n;i++)
 {
     scanf("%d",&r[i]);
     s=s+r[i];
 }
 t=s/(4*m);
 for(i=0;i<n;i++)
 {
     if(r[i]>t)
        u++;
 }
 if(u>m)
     printf("Yes");
 else
    printf("No");
}


Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
Language: C++

#include<stdio.h>

void main()
{
 int n,m,i,s=0,t,u=0;
  scanf("%d %d",&n,&m)
 int r[n];
 
 for(i=0;i<n;i++)
 {
     scanf("%d",&r[i]);
     s=s+r[i];
 }
 t=s/(4*m);
 for(i=0;i<n;i++)
 {
     if(r[i]>t)
        u++;
 }
 if(u>m)
     printf("Yes");
 else
    printf("No");
}


Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:23: error: expected ';' before 'int'
    6 |   scanf("%d %d",&n,&m)
      |                       ^
      |                       ;
    7 |  int r[n];
      |  ~~~                   
a.cc:11:18: error: 'r' was not declared in this scope
   11 |      scanf("%d",&r[i]);
      |                  ^
a.cc:17:9: error: 'r' was not declared in this scope
   17 |      if(r[i]>t)
      |         ^
Language: C++

#include <cmath>
#include <numeric>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
#include <numeric>
using namespace std;
 int main(){
 int n,m;
 string s="Yes"; 
 cin>>n>>m;
 int a[n];
 rep(i,n) cin>>a[i];
 sort(a,a+SIZE_OF_ARRAY(a),greater<>());

 rep(i,m) {
  if (a[i]<((1/double((4*m)))*accumulate(a, a+SIZE_OF_ARRAY(a), 0))){
  s="No";}
 			}
cout<<s<<endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:2: error: 'string' was not declared in this scope
    9 |  string s="Yes";
      |  ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    2 | #include <numeric>
  +++ |+#include <string>
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
a.cc:10:2: error: 'cin' was not declared in this scope
   10 |  cin>>n>>m;
      |  ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <numeric>
  +++ |+#include <iostream>
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
a.cc:13:2: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   13 |  sort(a,a+SIZE_OF_ARRAY(a),greater<>());
      |  ^~~~
      |  sqrt
a.cc:17:3: error: 's' was not declared in this scope
   17 |   s="No";}
      |   ^
a.cc:19:1: error: 'cout' was not declared in this scope
   19 | cout<<s<<endl;
      | ^~~~
a.cc:19:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:7: error: 's' was not declared in this scope
   19 | cout<<s<<endl;
      |       ^
a.cc:19:10: error: 'endl' was not declared in this scope
   19 | cout<<s<<endl;
      |          ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <numeric>
  +++ |+#include <ostream>
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
Language: C++

#include<stdio.h>
int main()
{
	int n,m;
	scanf("%d %d",&n,&m);
	int a[n+2],sum=0;
	for(int i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		sum+=a[i];
	}
	intt x = sum/(4*m);
	if(a[m-1]>x||a[m-1]==x)
		printf("Yes");
	else
		printf("No");
	//printf("%f",x);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'intt' was not declared in this scope; did you mean 'int'?
   12 |         intt x = sum/(4*m);
      |         ^~~~
      |         int
a.cc:13:19: error: 'x' was not declared in this scope
   13 |         if(a[m-1]>x||a[m-1]==x)
      |                   ^
Language: C++

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

int main(){
  int n, m;
  cin >> n >> m;
  vector<int> a;
  rep(i, n){
    cin >> a.at(i);
  }
  
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  
  int sum = 0; 

  rep(i, n){
    sum += a;
  }
  
  int z = sum / (4 * m);
  
  if (a.at(m) >= z)
    cout << "Yes" << endl;
  
  else 
    cout << "No" << endl;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: no match for 'operator+=' (operand types are 'int' and 'std::vector<int>')
   19 |     sum += a;
      |     ~~~~^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{int i,N,M,A[1000],count;
 float sum=0;
 cin>>N>>M;
 float res=1/4*M;
 for(i=0;i<N;i++)
 {cin>>A[i];
  if(A[i]==A[i+1])
    delete A[i];
 sum+=A[i];
 }
 if(A[i]>=(sum/res))
 {count++;
 }
 if(count>=M)
 cout<<"yes";
 else
   cout<<"no";
 
 return 0;  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: type 'int' argument given to 'delete', expected pointer
   11 |     delete A[i];
      |            ~~~^
Language: C++

#include <iostream>
#include <math>
#include <vector>
#include<algorithm>
using namespace std;
using std::vector;
using std::sort;
vector<int> item(100);
int main(){
    int N,M,sum;
    sum = 0;
    cin >> N >> M;
    for(int i=0;i<N;i++){
        cin >> item[i];
        sum += item[i];
    }
    
    sort(item.begin(),item.begin()+N);
    int c;
    c = ceil(sum/4/M);
    int flag = 0;
    for(int i=N-1;i>N-1-M;i--){
        if(item[i]<c){
            flag = 1;
            break;
        }
    }

    if(flag){
        cout << "No";
    }else{
        cout <<"Yes";
    }

    return 0;
}

Compiler output:
a.cc:2:10: fatal error: math: No such file or directory
    2 | #include <math>
      |          ^~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, M;
  cin >> N >> M;
  if (M == 0) {
    cout << "Yes" << endl;
    return;
  }
  vector<int> A(N);
  int sum=0;
  for (int i=0; i < N; i++){
    cin >> A.at(i);
    sum += A.at(i);
  }
  sort(A.begin(), A.end(), [](int a, int b) {return a > b;});
  
  if (sum % (4*M) == 0) {
    if (A.at(M-1) < sum/(4*M)) {
      cout << "No" << endl;
    }
    else {
      cout << "Yes" << endl;
    }
  }
  else {
    if (A.at(M-1) < ceil(sum/(4*M))) {
      cout << "No" << endl;
    }
    else {
      cout << "Yes" << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 |     return;
      |     ^~~~~~
Language: C++

#include <iostream>

using namespace std;


int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n, m, max, f, sum;
    double percentage;

    cin >> n >> m;
    vector<int> votes;
    percentage = 1 / (m * 4);
    for(int i=0; i < n; ++i) {
        cin >> f;
        votes.push_back(f);
    }
    int highest = votes[0];

    for_each(votes.begin(), votes.end(), [&] (int n) {
        sum += n;
    });

    for(int y=0; y < m; ++y) {
        if (*max_element(votes.begin(), votes.end()) >= percentage) {
            cout << "Yes";
        } else {
            cout << "No";
        }
    }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'vector' was not declared in this scope
   14 |     vector<int> votes;
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | 
a.cc:14:12: error: expected primary-expression before 'int'
   14 |     vector<int> votes;
      |            ^~~
a.cc:18:9: error: 'votes' was not declared in this scope
   18 |         votes.push_back(f);
      |         ^~~~~
a.cc:20:19: error: 'votes' was not declared in this scope
   20 |     int highest = votes[0];
      |                   ^~~~~
a.cc:22:5: error: 'for_each' was not declared in this scope
   22 |     for_each(votes.begin(), votes.end(), [&] (int n) {
      |     ^~~~~~~~
a.cc:27:14: error: 'max_element' was not declared in this scope
   27 |         if (*max_element(votes.begin(), votes.end()) >= percentage) {
      |              ^~~~~~~~~~~
Language: C++

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

int main () {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int m,n,a = 0;
	int index = 0;
	int sum = 0;
	cin >> n >> m;
	int arr[n];
	for(int i = 0; i < n; i++){
		cin >> a;
		int[i] = a;
		sum+=a;
	}

	for(int i = 0; i < n; i++){
		if (arr[i] >= (sum/(4*m))) index++;
		if(index == m) {
			break;
		}
	}
	if(index == m) cout << "Yes";
	else cout << "No";
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: structured binding declaration cannot have type 'int'
   14 |                 int[i] = a;
      |                    ^~~
a.cc:14:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:14:21: error: redeclaration of 'auto i'
   14 |                 int[i] = a;
      |                     ^
a.cc:12:17: note: 'int i' previously declared here
   12 |         for(int i = 0; i < n; i++){
      |                 ^
a.cc:14:20: error: cannot decompose non-array non-class type 'int'
   14 |                 int[i] = a;
      |                    ^~~
Language: C

#include <stdio.h>
int main(){
    int n m;
    scanf("%d %d",&n,&m);
    int i,a[n],sum;
    sum = 0;
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
        sum = sum + a[i];
    }
    int count;
    count =0;
    for(i=0;i<n;i++){
        if(sum/(4*m) <= a[i]){
            count++;
        }
    }
    if(count>=m){
        printf("Yes");
    }else{
        printf("No");
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'm'
    3 |     int n m;
      |           ^
main.c:3:11: error: 'm' undeclared (first use in this function)
main.c:3:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:20: error: 'n' undeclared (first use in this function)
    4 |     scanf("%d %d",&n,&m);
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main ( ) 
{
	int m,n;
	cin>>n>>m;
	if(n%m==0)
	{
		cout<<"0";
		return 0;
	} 
	else
	{
		if(n%m>=m/2)
		for(int i=1;i<=n;i++)
		{
			int a[i];
			cin>>a[i];
			else
			{
				cout<< 
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: 'else' without a previous 'if'
   19 |                         else
      |                         ^~~~
a.cc:22:17: error: expected primary-expression before '}' token
   22 |                 }
      |                 ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main()
{
  int n,m,i,c=0,s=0;
  cin>>n>>m;
  vector<int> V(n);
  for(i=0;i<n;i++)
  {
    cin>>V[i];
    c+=V[i];
  }
    c/=4;
    c/=m;
    for(i=0;i<n;i++)
    {
      if(V[i]>c)
        ++s;
    }
    if(s>=m && m!=n)
      cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}

Compiler output:
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C

#include<stdio.h>
int main(){
    int n,m,a[256],cnt=0,ans=0;

    scanf("%d %d",&n,&m);
    if(n<=m){
    printf("No\n");
    return 0;
  }
      for(int i=0;i<n;i++){
          	scanf("%d",&a[i]);
        if(a[i]<1||a[i]>1000
              printf("No\n");
    		return 0;
        }
          
      }
  for(int i=0;i<n;i++){
    cnt+=a[i];
  }
 cnt=cnt/(4*m);
    for(int i=0;i<n;i++){
	    if(a[i]>=cnt){
          ans++;
        }
      if(ans>=m){
          printf("Yes\n");
        	return 0;
      }
  }
  printf("No\n");
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:12:29: error: expected ')' before 'printf'
   12 |         if(a[i]<1||a[i]>1000
      |           ~                 ^
      |                             )
   13 |               printf("No\n");
      |               ~~~~~~         
main.c:15:9: error: expected expression before '}' token
   15 |         }
      |         ^
main.c: At top level:
main.c:18:3: error: expected identifier or '(' before 'for'
   18 |   for(int i=0;i<n;i++){
      |   ^~~
main.c:18:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   18 |   for(int i=0;i<n;i++){
      |                ^
main.c:18:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   18 |   for(int i=0;i<n;i++){
      |                    ^~
main.c:21:2: warning: data definition has no type or storage class
   21 |  cnt=cnt/(4*m);
      |  ^~~
main.c:21:2: error: type defaults to 'int' in declaration of 'cnt' [-Wimplicit-int]
main.c:21:13: error: 'm' undeclared here (not in a function)
   21 |  cnt=cnt/(4*m);
      |             ^
main.c:22:5: error: expected identifier or '(' before 'for'
   22 |     for(int i=0;i<n;i++){
      |     ^~~
main.c:22:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   22 |     for(int i=0;i<n;i++){
      |                  ^
main.c:22:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   22 |     for(int i=0;i<n;i++){
      |                      ^~
main.c:31:10: error: expected declaration specifiers or '...' before string constant
   31 |   printf("No\n");
      |          ^~~~~~
main.c:32:9: error: expected identifier or '(' before 'return'
   32 |         return 0;
      |         ^~~~~~
main.c:33:1: error: expected identifier or '(' before '}' token
   33 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, m) for (int i = 0; i < (int)(m); i++)
const int inf = 1000000000; // 10^9 Ten to the power of nine.
 
int main()
{
	int N,M;
	int A[10000];
	int sum=0;
	int ans=0;
	cin>>N>>M;
 
	for (int i = 0; i < N; i++)
	{
		cin>>A[i];
      	
	}
	
	for (int i= 0; i < N; i++)
	{
		sum+= A[i];
	}
	
 	 sum/=(4*M);
	for (int k = 0; k < N+1; k++)
	{
		if (A[i]>sum)
		{
			ans++;
		}
		
	}
	if(ans<M){cout<<"No";}
	else{cout<<"Yes";}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:23: error: 'i' was not declared in this scope
   29 |                 if (A[i]>sum)
      |                       ^
Language: C++

#define ll long

int main()
{
	
	ll n, m;
	vector<long long> votes;
	ll votes_s;
	ll sum = 0;
	ll contor = 0;
	
	set<ll> nums;
	
	cin >> n >> m;
	
	for(int i = 0 ;i < n ;++i)
	{tor++;
	//}
	
		for(auto x : nums)
		{
			if(x > sum/(4 * m))
				contor++;
		}
	
		if(contor >= m)
			cout << "Yes\n";
		else
			cout << "No\n";
	return 0;
}

		cin >> votes_s;
		nums.insert(votes_s);
		votes.push_back(votes_s);
		sum += votes_s;
	}
	
	//sort(votes.begin(), votes.end(), greater<ll>() );
	
	//for(int i = 0; i < m; ++i)
	//{
	//	if(votes[i] > sum/(4*m))
	//		contor++;
	//}
	
		for(auto x : nums)
		{
			if(x > sum/(4 * m))
				contor++;
		}
	
		if(contor >= m)
			cout << "Yes\n";
		else
			cout << "No\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'vector' was not declared in this scope
    7 |         vector<long long> votes;
      |         ^~~~~~
a.cc:7:16: error: expected primary-expression before 'long'
    7 |         vector<long long> votes;
      |                ^~~~
a.cc:12:9: error: 'set' was not declared in this scope
   12 |         set<ll> nums;
      |         ^~~
a.cc:1:12: error: expected primary-expression before 'long'
    1 | #define ll long
      |            ^~~~
a.cc:12:13: note: in expansion of macro 'll'
   12 |         set<ll> nums;
      |             ^~
a.cc:14:9: error: 'cin' was not declared in this scope
   14 |         cin >> n >> m;
      |         ^~~
a.cc:17:10: error: 'tor' was not declared in this scope
   17 |         {tor++;
      |          ^~~
a.cc:20:30: error: 'nums' was not declared in this scope
   20 |                 for(auto x : nums)
      |                              ^~~~
a.cc:27:25: error: 'cout' was not declared in this scope
   27 |                         cout << "Yes\n";
      |                         ^~~~
a.cc:29:25: error: 'cout' was not declared in this scope
   29 |                         cout << "No\n";
      |                         ^~~~
a.cc:34:17: error: 'nums' was not declared in this scope
   34 |                 nums.insert(votes_s);
      |                 ^~~~
a.cc:35:17: error: 'votes' was not declared in this scope; did you mean 'votes_s'?
   35 |                 votes.push_back(votes_s);
      |                 ^~~~~
      |                 votes_s
a.cc: At global scope:
a.cc:47:17: error: expected unqualified-id before 'for'
   47 |                 for(auto x : nums)
      |                 ^~~
a.cc:53:17: error: expected unqualified-id before 'if'
   53 |                 if(contor >= m)
      |                 ^~
a.cc:55:17: error: expected unqualified-id before 'else'
   55 |                 else
      |                 ^~~~
a.cc:57:9: error: expected unqualified-id before 'return'
   57 |         return 0;
      |         ^~~~~~
a.cc:58:1: error: expected declaration before '}' token
   58 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, m) for (int i = 0; i < (int)(m); i++)
const int inf = 1000000000; // 10^9 Ten to the power of nine.
 
int main()
{
	int N,M;
	int A[10000];
	int sum=0;
	int ans=0;
	cin>>N>>M;
 
	for (int i = 0; i < N; i++)
	{
		cin>>A[i];
      	
	}
	
	for (int j= 0; i < N; j++)
	{
		sum+= A[i];
	}
	
 	 sum/=(4*M);
	for (int k = 0; k < N+1; k++)
	{
		if (A[i]>sum)
		{
			ans++;
		}
		
	}
	if(ans<M){cout<<"No";}
	else{cout<<"Yes";}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: 'i' was not declared in this scope
   21 |         for (int j= 0; i < N; j++)
      |                        ^
a.cc:29:23: error: 'i' was not declared in this scope
   29 |                 if (A[i]>sum)
      |                       ^
Language: C

#include <stdio.h> int main(void){ int n,m,total=0,s=0,i; scanf("%d %d",&n,&m); int a[n]; for(i=0; i<n; i++){ scanf("%d",&a[i]); total+=a[i]; } total=total/(4*m); for(i=0; i<n; i++){ if(a[i]>=total) s++; } if(s>m) puts("Yes"); else puts("No"); return 0; }

Compiler output:
main.c:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> int main(void){ int n,m,total=0,s=0,i; scanf("%d %d",&n,&m); int a[n]; for(i=0; i<n; i++){ scanf("%d",&a[i]); total+=a[i]; } total=total/(4*m); for(i=0; i<n; i++){ if(a[i]>=total) s++; } if(s>m) puts("Yes"); else puts("No"); return 0; }
      |                    ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
using namespace std;

int main() {
    int N,M;
    int i;
    cin >> N >> M;
    int A[100];
    int sum;
    char ans;
    int count = 0;

    for(i=0;i<N;i++) {
        sum +=A[i];
    }
    for(i=0;i<N;i++) {
        if (A[i] >= 1/(4 * M)){
            count++;
        }
    }
    if (M < count){
        cout << "Yes";
    }
    else
    {
        cout << "No";
    }
    

Compiler output:
a.cc: In function 'int main()':
a.cc:27:6: error: expected '}' at end of input
   27 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define pi 3.141592653589793
#define mod 1000000007
#define pb push_back
#define all(v) v.begin(),v.end()
#define tc int t;cin>>t;while(t--)
#define pqmax priority_queue<int>
#define pqmin priority_queue<int,vi,greater<int>>
#define fast_io ios_base::sync_with_stdio(0), cin.tie(NULL)
#define tc_g int tt;cin>>tt;for(int ti=1;ti<=tt;ti++)
#define case_g "Case #"<<ti<<": "
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, greater_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef tree<int, int, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_map;

int main() {
	fast_io;
	ll n, m;
	cin >> n >> m;
	vl a(n);
	for (int i = 0;i < n;i++)
		cin >> a[i];
	ll total_vote = accumulate(all(a), 0LL);
	ll min_vote = total_vote / (m * 4);
	if (total % (m * 4) != 0)
		min_vote++;
	int cnt = 0;
	for (int i = 0;i < n;i++)
		if (a[i] >= min_vote)
			cnt++;
	if (cnt >= m)
		cout << "Yes\n";
	else
		cout << "No\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:13: error: 'total' was not declared in this scope
   34 |         if (total % (m * 4) != 0)
      |             ^~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
 
int main(){
  int N,M,sum=0,ans=0;
  double k;
  cin>>N>>M;
  int a[N];
    for(int i=0;i<N;i++){
      cin>>a[i];
      sum+=a[i];
    }
  k=sum/4/M;
  sort(a.begin(),a.end());
  reverse(a.begin(),a.end());
  
  if(a.at(M-1)>=k){cout<<"Yes";}
  else{cout<<"No";}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: request for member 'begin' in 'a', which is of non-class type 'int [N]'
   15 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:15:20: error: request for member 'end' in 'a', which is of non-class type 'int [N]'
   15 |   sort(a.begin(),a.end());
      |                    ^~~
a.cc:16:13: error: request for member 'begin' in 'a', which is of non-class type 'int [N]'
   16 |   reverse(a.begin(),a.end());
      |             ^~~~~
a.cc:16:23: error: request for member 'end' in 'a', which is of non-class type 'int [N]'
   16 |   reverse(a.begin(),a.end());
      |                       ^~~
a.cc:18:8: error: request for member 'at' in 'a', which is of non-class type 'int [N]'
   18 |   if(a.at(M-1)>=k){cout<<"Yes";}
      |        ^~
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;

int main() {
    int n, m;
    cin >> n >> m;
    vector<int> A(n);
    int ans = 0;
    int sum = 0;
    rep(i, n) {
        cin >> A.at(i);
        sum += A[i];
    }
    rep(i, n) {
        cin >> A.at(i);
        if (A[i] >= sum / (4 * m)) ans += 1;
        else continue;
    }
    if (ans >= m) cout << "Yes" << endl;
    else cout << "No" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:25:31: error: expected '}' at end of input
   25 |     else cout << "No" << endl;
      |                               ^
a.cc:9:12: note: to match this '{'
    9 | int main() {
      |            ^
Language: C++

//~ while (clock()<=69*CLOCKS_PER_SEC)
    //~ #pragma comment(linker, "/stack:200000000")
    #pragma GCC optimize("O3")
    //~ #pragma GCC optimize("Ofast")
    //~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
    //~ #pragma GCC optimize("unroll-loops")
    #include <bits/stdc++.h>
    #include <ext/pb_ds/assoc_container.hpp>
    #include <ext/pb_ds/tree_policy.hpp>

    using namespace __gnu_pbds;
    using namespace std;

    template <typename T>
    using ordered_set =
        tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

    #define sim template < class c
    #define ris return * this
    #define dor > debug & operator <<
    #define eni(x) sim > typename \
    enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
    sim > struct rge { c b, e; };
    sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
    sim > auto dud(c* x) -> decltype(cerr << *x, 0);
    sim > char dud(...);
    struct debug {
    #ifdef LOCAL
    ~debug() { cerr << endl; }
    eni(!=) cerr << boolalpha << i; ris; }
    eni(==) ris << range(begin(i), end(i)); }
    sim, class b dor(pair < b, c > d) {
    ris << "(" << d.first << ", " << d.second << ")";
    }
    sim dor(rge<c> d) {
    *this << "[";
    for (auto it = d.b; it != d.e; ++it)
        *this << ", " + 2 * (it == d.b) << *it;
    ris << "]";
    }
    #else
    sim dor(const c&) { ris; }
    #endif
    };
    #define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

    #define shandom_ruffle random_shuffle

    using ll=long long;
    using pii=pair<int,int>;
    using pll=pair<ll,ll>;
    using vi=vector<int>;
    using vll=vector<ll>;
    const int nax=1000*1007;
    const ll mno=1007;
    const ll mod = 1e9 + 7;

    void addSelf(ll& a, ll b) {
        a += b;
        if(a > mod) {
            a -= mod;
        }
    }

    int main() {
        
        int n, m;
        cin >> n >> m;
        vi a(n);
        int sum = 0;
        for(int& x : a) {
            cin >> x;

            sum += x;
        }
        float x = (float) sum/ (float)(4*m);

        //sort(a.begin(), a.end());
        for(int p : a) {
            if((float)p >= x) {
                ++c;
            }
            //else ++c;
        }
        if(m == c) puts("Yes");
        else puts("No";)
        return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:81:19: error: 'c' was not declared in this scope
   81 |                 ++c;
      |                   ^
a.cc:85:17: error: 'c' was not declared in this scope
   85 |         if(m == c) puts("Yes");
      |                 ^
a.cc:86:23: error: expected ')' before ';' token
   86 |         else puts("No";)
      |                  ~    ^
      |                       )
a.cc:86:24: error: expected primary-expression before ')' token
   86 |         else puts("No";)
      |                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m;
	float s=0;
	int c=0;
	cin >> n >> m;
	int a[n+1];
    for (int i=1; i<=n; ++i)
	cin >> a[i];
    for (int i=1; i<=n; ++i)
    s+=a[i];
    for (int i=1; i<=n; ++i)
    float o=s/4/m;
    if (a[i]>o)
    c++;
    if(c>=m)
    cout << "Yes" <<endl;
    else if(c<m)
    cout << "No" <<endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'i' was not declared in this scope
   16 |     if (a[i]>o)
      |           ^
a.cc:16:14: error: 'o' was not declared in this scope
   16 |     if (a[i]>o)
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main (){
    int a,b;
    cin >>a>>b;
    int c[a];
    int d=0;
    int e=a/4;
    e=e/b
    for(int i=0;i<a;i++){
        cin>>c[i];
    }
    for(int j=0;j<a;j++){
        if(c[j] >= e){
            d++;
        }
    }
    if(d>=b){
        cout <<"Yes"<<endl;
    }
    else{
        cout<<"No"<< endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected ';' before 'for'
    9 |     e=e/b
      |          ^
      |          ;
   10 |     for(int i=0;i<a;i++){
      |     ~~~   
a.cc:10:17: error: 'i' was not declared in this scope
   10 |     for(int i=0;i<a;i++){
      |                 ^
Language: C++

print("Enter N and M value below:")
N = input()
M = input()
print(int(N) + " " + int(M))
print("Enter the popular votes: ")
for 1 <= i <= int(N):
    print(input())
if N > 1/2*int(M):
    print("No")
else:
    print("Yes")
    


Compiler output:
a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token
    1 | print("Enter N and M value below:")
      |      ^
Language: C++

# include <bits/stdc++.h>
# define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
# define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
# define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
# define rreps(i, n) for(int i=((int)(n)); i>0; --i)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define optimize_cin() cin.tie(0); ios::sync_with_stdio(false)
using namespace std;
using lint = long long;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main()
{
    double N, M;
    cin >> N >> M;

    double A[N];
    rep(i,N){
        cin >> A[i];
    }

    int count = 0;

    double all = 0;

    rep(i,N){
        all+=A[i];
    }

    double X = all / (4*M);

    rep(i,N){
        if(A[i] >= X){
            count++;
        }
    }

    if(count >= M) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   20 |     double A[N];
      |              ^
a.cc:20:14: error: could not convert 'N' from 'double' to 'long unsigned int'
   20 |     double A[N];
      |              ^
      |              |
      |              double
a.cc:20:14: error: size of array 'A' has non-integral type 'double'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m;
	float s=0.0;
	int c=0;
	cin >> n >> m;
	int a[n+1];
    for (int i=1; i<=n; ++i) cin >> a[i];
    for (int i=1; i<=n; ++i)
    s+=a[i];
    for (int i=1; i<=n; ++i)
    float o=s/4/m;
    if (a[i]>o)
    c++;
    if(c>=m)
    cout << "Yes" <<endl;
    else
    cout << "No" <<endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: 'i' was not declared in this scope
   15 |     if (a[i]>o)
      |           ^
a.cc:15:14: error: 'o' was not declared in this scope
   15 |     if (a[i]>o)
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long n,m,i,s=0,c=0;double d;
  cin>>n>>m;
  long long a[n];
  for(i=0;i<n;i++){
   cin>>a[i];
    s+=a[i];
  }
  d=s/(4*m);
 sort(a,a+n,greater<long long>());
  if(a[m-1]>=d) cout<<"Yes";
  else cout<<"No";A
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: 'A' was not declared in this scope
   14 |   else cout<<"No";A
      |                   ^
Language: C++

#include  <bits/stdc++.h>
using namespace std; 
int n,m,a[n+1],sum,f;
int main()
{
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
		sum+=a[i];
	}
	for(int i=1;i<=n;i++)
	{
		if(a[i]<1/(4*m)*sum)
		f=1;
		break;
	}
	if(f==1)
    {
    	cout<<"No";
	}
	else
	{
		cout<<"Yes";
	}
	return 0;
}

Compiler output:
a.cc:3:12: error: size of array 'a' is not an integral constant-expression
    3 | int n,m,a[n+1],sum,f;
      |           ~^~
Language: C

#include<stdio.h>
#include<stdlib.h>



int main (void)
{
    int N,M,i;
    int A[100];
    int judge=0;
    int sum=0;
    char c;

    
    scanf("%d %d",&N,&M);
    //scanf("%s",c);

    for(i=0;i<N;i++){
        scanf("%d ",&A[i]);
        sum+=A[i];
        //scanf("%s",c);
    }

    qsort(A);
    
    if(A[M-1]<(sum/4*M)){
        judge=1;
    }


    if(judge==0){
        printf("Yes");
    }else{
        printf("No");
    }

    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:24:5: error: too few arguments to function 'qsort'
   24 |     qsort(A);
      |     ^~~~~
In file included from main.c:2:
/usr/include/stdlib.h:970:13: note: declared here
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |             ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main (){
    int a,b;
    cin >>a>>b;
    int c[a];
    int d=0;
    for(int i=0;i<a;i++){
        cin>>c[i];
    }
    for(int j=0;j<a;j++){
        if(c[j] => a/4/b){
            d++;
        }
    }
    if(d=>b){
        cout <<"Yes"<<endl;
    }
    else{
        cout<<"No"<< endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expected primary-expression before '>' token
   12 |         if(c[j] => a/4/b){
      |                  ^
a.cc:16:10: error: expected primary-expression before '>' token
   16 |     if(d=>b){
      |          ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main()
{
  int n,m,i,c=0,s=0;
  cin>>n>>m;
  vector<int> V(n);
  for(i=0;i<n;i++)
  {
    cin>>V[i];
    c+=V[i];
  }
    c/=4;
    c/=m;
    for(i=0;i<n;i++)
    {
      if(V[i]>=c)
        ++s;
    }
    if(s>=m && m!=n)
      cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}

Compiler output:
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
    int N, M;
    vector<int> A(N);
    cin >> N >> M;
    for (int i = 0; i < N; i++) {
        cin >> A.at(i);
    }
    sort (A.begin(), A.end());
    reverse (A.begin(), A.end());
    int sum = 0;
    for (int i = 0; i < N; i++) {
        sum = sum + A.at(i);
    }
    int Ave;
    if (sum % (4 * M) == 0) {
        Ave = sum / (4 * M);
    }
    else {
        Ave = sum / (4 * M) + 1;
    }
    for (int i = 0; i < M; i++){
        if (A.at(i) >= Ave) {
            continue;
        }
        else {
            cout << "No" << endl;
            break;
        }
        cout << "Yes" << endl;

    }


Compiler output:
a.cc: In function 'int main()':
a.cc:33:6: error: expected '}' at end of input
   33 |     }
      |      ^
a.cc:3:13: note: to match this '{'
    3 | int main () {
      |             ^