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

#include<stdio.h>
 
int main(void)
{
  int N,M;
  int A[1000];
  int i,j,temp,sum=0;
  double judge;
  
  scanf("%d", &N); scanf("%d", &M);
  
  for(i=0;i<n;i++){
    scanf("%d", &A[i]);
  }
 
  for(i=0;i<N;i++)
  	sum+=A[i];
  
  judge=sum*(1/4*M);
  
  for(i=0;i<N;i++){
    for(j=i+1;j<N;j++){
    	if(A[i]<A[j]){
          temp=A[i];
          A[i]=A[j];
          A[j]=temp;
        }
    }
  }
  
  if(A[M-1]>=judge)
    printf("Yes");
  else
    printf("No");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:13: error: 'n' undeclared (first use in this function)
   12 |   for(i=0;i<n;i++){
      |             ^
main.c:12:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
 
int main(void)
{
  int N,M,A[1000],a,b,c,j=0,sum=0,;
  scanf("%d %d",&N,&M);
  for(a=0;a<N;a++){
	scanf("%d ",&A[a]);
	sum+=A[a];
}

  c=sum/(4*M);
  for(a=0;a<N;a++){
	if(c<=A[a]){
		j=1;
		a=N;
 }
}

  if(j)
    printf("Yes");
  else
    printf("No");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:35: error: expected identifier or '(' before ';' token
    5 |   int N,M,A[1000],a,b,c,j=0,sum=0,;
      |                                   ^
Language: C

#include<stdio.h>
 
int main(void)
{
  int N,M;
  int A[1000];
  int i,j,temp,sum=0,judge;
  
  scanf("%d", &N); scanf("%d", &M);
  
  for(i=0;i<n;i++){
    scanf("%d", &A[i]);
  }
 
  for(i=0;i<N;i++)
  	sum+=A[i];
  
  judge=sum*(1/4*M);
  
  for(i=0;i<N;i++){
    for(j=i+1;j<N;j++){
    	if(A[i]<A[j]){
          temp=A[i];
          A[i]=A[j];
          A[j]=temp;
        }
    }
  }
  
  if(A[M-1]>=judge)
    printf("Yes");
  else
    printf("No");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:13: error: 'n' undeclared (first use in this function)
   11 |   for(i=0;i<n;i++){
      |             ^
main.c:11:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main(void){
  int m,n,i,j,tmp;
  int a[100];
  int all_vote=0;
  
  do{
    scanf("%d %d",&n,&m);
  }while(m<=0 || n<m || 101<=n);
  
  /*for(i=0; i<n; i++){
    do{
      scanf("%d",&a[i]);
    }while(a[i]<1 || a[i]>1000);
    all_vote+=a[i];
  }
  
  for(i=0; i<n; i++){
    for(j=i+1; j<n; i++){
      if(a[i] < a[j]){
        tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  
  if(4*m*a[n-m] >= all_vote){
    printf("Yes");
  }*/
  
  return 0;
}
#include <stdio.h>
 
int main(void){
  int m,n,i,j,tmp;
  int a[100];
  int all_vote=0;
  
  do{
    scanf("%d %d",&n,&m);
  }while(m<=0 || n<m || 101<=n);
  
  for(i=0; i<n; i++){
    do{
      scanf("%d",&a[i]);
    }while(a[i]<1 || a[i]>1000);
    all_vote+=a[i];
  }
  
  /*for(i=0; i<n; i++){
    for(j=i+1; j<n; i++){
      if(a[i] < a[j]){
        tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  
  if(4*m*a[n-m] >= all_vote){
    printf("Yes");
  }*/
  
  return 0;
}


Compiler output:
main.c:37:5: error: redefinition of 'main'
   37 | int main(void){
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
    3 | int main(void){
      |     ^~~~
Language: C

#include <stdio.h>
 
int main(void){
  int m,n,i,j,tmp;
  int a[100];
  int all_vote=0;
  
  do{
    scanf("%d %d",&n,&m);
  }while(m<=0 || n<m || 101<=n);
  
  /*for(i=0; i<n; i++){
    do{
      scanf("%d",&a[i]);
    }while(a[i]<1 || a[i]>1000);
    all_vote+=a[i];
  }
  
  for(i=0; i<n; i++){
    for(j=i+1; j<n; i++){
      if(a[i] < a[j]){
        tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  
  if(4*m*a[n-m] >= all_vote){
    printf("Yes");
  }*/
  
  return 0;
}
#include <stdio.h>
 
int main(void){
  int m,n,i,j,tmp;
  int a[100];
  int all_vote=0;
  
  /*do{
    scanf("%d %d",&n,&m);
  }while(m<=0 || n<m || 101<=n);*/
  
  for(i=0; i<n; i++){
    do{
      scanf("%d",&a[i]);
    }while(a[i]<1 || a[i]>1000);
    all_vote+=a[i];
  }
  
  /*for(i=0; i<n; i++){
    for(j=i+1; j<n; i++){
      if(a[i] < a[j]){
        tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  
  if(4*m*a[n-m] >= all_vote){
    printf("Yes");
  }*/
  
  return 0;
}


Compiler output:
main.c:37:5: error: redefinition of 'main'
   37 | int main(void){
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
    3 | int main(void){
      |     ^~~~
Language: C

#include<stdio.h>
 
int main(void)
{
  int N,M;
  int A[1000];
  int i,j,temp,sum=0,judge;
  
  scanf("%d %d",&N,&M);
  for(i=0;i<N;i++)
  	scanf("%d",&A[i]);
 
  for(i=0;i<N;i++)
  	sum+=A[i];
  
  judge=sum*(1/4*M);
  
  for(i=0;i<N;i++){
    for(j=i+1;j<N;j++){
    	if(A[i]<A[j]){
          temp=A[i];
          A[i]=A[j];
          A[j]=temp;
        }
    }
  }
  
  if(A[M-1]>=judge)
    printf("Yes");
  else
    printf("No");
  
  return 0;
}
#include<stdio.h>

int main(void)
{
  int N,M;
  int A[1000];
  int i,j,temp,sum=0,judge;
  
  scanf("%d %d",&N,&M);
  for(i=0;i<N;i++)
  	scanf("%d ",&A[i]);
 
  for(i=0;i<N;i++)
  	sum+=A[i];
  
  judge=sum*(1/4*M);
  
  for(i=0;i<N;i++){
    for(j=i+1;j<N;j++){
    	if(A[i]<A[j]){
          temp=A[i];
          A[i]=A[j];
          A[j]=temp;
        }
    }
  }
  
  if(A[M-1]>=judge)
    printf("Yes");
  else
    printf("No");
  
  return 0;
}
提出情報
提出日時

Compiler output:
main.c:37:5: error: redefinition of 'main'
   37 | int main(void)
      |     ^~~~
main.c:3:5: note: previous definition of 'main' with type 'int(void)'
    3 | int main(void)
      |     ^~~~
main.c:69:1: error: unknown type name '\U000063d0\U000051fa\U000060c5\U00005831'
   69 | 提出情報
      | ^~~~~~~~
main.c:70:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   70 | 提出日時
      | ^~~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:7: error: array size missing in 'item'
    5 |   int item[];
      |       ^~~~
Language: C

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

int main(void){
    int n,m,i;
    double r;
    int s=0;
    int sum=0;
    scanf("%d",&n);
    scanf("%d",&m);
    int a[n];
    for(i=0;i<n;i++){
        scanf("%d",&a[i]);
        sum = sum + a[i];
    }

    r = sum / (4 * m);

    for(i=0;i<n;i++){
        if(a[i]=>r){
            s++;
        }
    }
    if(s>=m){
        printf("Yes");
        return 0;
    }

    printf("No");

}

Compiler output:
main.c: In function 'main':
main.c:20:17: error: expected expression before '>' token
   20 |         if(a[i]=>r){
      |                 ^
Language: C

include <stdio.h>
int main(void){
int x,y,z;
int i,n=0;
scanf("%d",&x); //商品の種類
scanf("%d",&y); //人気商品の個数
for(i=0;i<x;i++){
scanf("%d",&z); //票数
if(z>=1/4*y)
n++;
}
if(n>=y) printf("Yes");
else printf("No");
return 0;
}


Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

#include <stdio.h>
int main(void){
 int n,m,,sum=0,i,max=0;
 char num[256];
 for(i=0;i<n;i++){
    num[i]=0;
 }
 scanf("%d %d %d",&n,&m,&num);
 for(i=0;i<n;i++){
    sum+=num[i];
 }
 for(i=0;i<n;i++){
    if(num[i]>=sum*(1/4*m)){
       max+=1;
    }
 }
}

Compiler output:
main.c: In function 'main':
main.c:3:10: error: expected identifier or '(' before ',' token
    3 |  int n,m,,sum=0,i,max=0;
      |          ^
main.c:5:6: error: 'i' undeclared (first use in this function)
    5 |  for(i=0;i<n;i++){
      |      ^
main.c:5:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:5: error: 'sum' undeclared (first use in this function); did you mean 'num'?
   10 |     sum+=num[i];
      |     ^~~
      |     num
main.c:14:8: error: 'max' undeclared (first use in this function)
   14 |        max+=1;
      |        ^~~
Language: C

include <stdio.h>
void swap(int *a,int *b)
{
  int temp=*a;
  *a=*b;
  *b=temp;
}
int main(void)
{
  int n,m,i,s,max=0,a[100];
  scanf("%d%d",&n,&m);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  for(s=0;s<n;s++){
    for(i=0;i<n-1;i++){
      if(a[i]<a[i+1])
        swap(&a[i],&a[i+1]);
    }
  }
  if(a[m-1]<1/(4*m)){
    printf("No");
  }else{
    printf("Yes");
  }
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:11:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |   scanf("%d%d",&n,&m);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:11:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |   scanf("%d%d",&n,&m);
      |   ^~~~~
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   18 |         swap(&a[i],&a[i+1]);
      |         ^~~~
main.c:22:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |     printf("No");
      |     ^~~~~~
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   24 |     printf("Yes");
      |     ^~~~~~
main.c:24:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>
int main(void){
 int n,m,num[256],sum=0,i,max=0;
 for(i=0;i<n;i++){
    num[i]0;
 }
 scanf("%d %d %d",&n,&m,&num);
 for(i=0;i<n;i++){
    sum+=num[i];
 }
 for(i=0;i<n;i++){
    if(num[i]>=sum*(1/4*m)){
       max+=1;
    }
 }
}

Compiler output:
main.c: In function 'main':
main.c:5:11: error: expected ';' before numeric constant
    5 |     num[i]0;
      |           ^
      |           ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'N' undeclared (first use in this function)
    5 |   int a[N];
      |         ^
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include <stdio.h>
void swap(int *a,int *b)
{
  int temp=*a;
  *a=*b;
  *b=temp;
}
int main(void)
{
  int n,m,i,s,max=0,a[];
  scanf("%d%d",&n,&m);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  for(s=0;s<n;s++){
    for(i=0;i<n-1;i++){
      if(a[i]<a[i+1])
        swap(&a[i],a[i+1]);
    }
  }
  if(a[m-1]<1/(4*m)){
    printf("No");
  }else{
    printf("Yes");
  }
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:10:21: error: array size missing in 'a'
   10 |   int n,m,i,s,max=0,a[];
      |                     ^
main.c:11:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |   scanf("%d%d",&n,&m);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:11:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |   scanf("%d%d",&n,&m);
      |   ^~~~~
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:9: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   18 |         swap(&a[i],a[i+1]);
      |         ^~~~
main.c:22:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |     printf("No");
      |     ^~~~~~
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   24 |     printf("Yes");
      |     ^~~~~~
main.c:24:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:15:16: error: expected ';' before 'for'
   15 |   sum=sum/(4*m)
      |                ^
      |                ;
   16 | 
   17 |   for(i=0;i<n;i++){
      |   ~~~           
main.c:24:3: error: 'else' without a previous 'if'
   24 |   else
      |   ^~~~
Language: C

#include <stdio.h>
 
int main(void){
  int m,n,i,j;
  int a[1000];
  int all_vote=0;
  
  do{
    scanf("%d %d",&n,&m);
  }while(m<1 | n<m | 100<n);
  
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    all_vote+=a[i];
    for(j=0;j<i;j++){
      if(a[i]==a[j]){
        i=0;
        all_vote=0;
        break;
      }
    }
  }
  
  for(i=0;i<n;i++){
    for(j=i+1;j<n;i++){
      if(a[i]==a[j]){
        tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  
  if(4*m*a[m-1] >= all_vote){
    printf("Yes");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:9: error: 'tmp' undeclared (first use in this function)
   27 |         tmp = a[i];
      |         ^~~
main.c:27:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{
  int n.m,s,t;
  int total=0;
  int a[1000];
  double u;
  
  scanf("%d %d",&n, &m);
  for(S=0;s<n;s++){
    scanf("%d",a[n]);
    total=total+a[n];
  }
  
  u=1/(4*m);
  
  for(s=0;s<n;s++){
    if(a[n]>=total*u){
      t++;
    }
  }
  
  if(t>=m)
    put("Yes");
  else
    put("No");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 |   int n.m,s,t;
      |        ^
main.c:5:8: error: expected expression before '.' token
main.c:5:11: error: 's' undeclared (first use in this function)
    5 |   int n.m,s,t;
      |           ^
main.c:5:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:13: error: 't' undeclared (first use in this function)
    5 |   int n.m,s,t;
      |             ^
main.c:10:18: error: 'n' undeclared (first use in this function)
   10 |   scanf("%d %d",&n, &m);
      |                  ^
main.c:10:22: error: 'm' undeclared (first use in this function)
   10 |   scanf("%d %d",&n, &m);
      |                      ^
main.c:11:7: error: 'S' undeclared (first use in this function)
   11 |   for(S=0;s<n;s++){
      |       ^
main.c:25:5: error: implicit declaration of function 'put'; did you mean 'puts'? [-Wimplicit-function-declaration]
   25 |     put("Yes");
      |     ^~~
      |     puts
Language: C

#include <stdio.h>

int main(void){
  int m,n,i,j;
  int a[1000];
  int all_vote=0;
  
  do{
    scanf("%d %d",n,m);
  }while(m<1 | n<m | 100<n);
  
  for(i=0;i<n;i++){
    scanf("%d",a[i]);
    all_vote+=a[i];
    for(j=0;j<i;j++){
      if(a[i]==a[j]){
        i=0;
        all_vote=0;
        break;
      }
    }
  }
  
  for(i=0;i<n;i++){
    for(j=i+1;j<n;i++){
      if(a[i]==a[j]){
        tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  
  if(4*m*a[m-1] >= all_vote){
    printf("Yes");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:9: error: 'tmp' undeclared (first use in this function)
   27 |         tmp = a[i];
      |         ^~~
main.c:27:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
  int N,M,i,l,sum;
  int A[];
  scanf("%d%d",&N,&M);
  for(i=0;i<N;i++){
  A[i];
    sum+=A[i];
  }
  for(l=0;l<N;l++){
    if(A[l]>sum*(1/4*M)){
      puts("Yes");
      break;
    }
    else{
      puts("No");
      break;
      {
  }
  return 0;
    }
  

Compiler output:
main.c: In function 'main':
main.c:5:7: error: array size missing in 'A'
    5 |   int A[];
      |       ^
main.c:22:5: error: expected declaration or statement at end of input
   22 |     }
      |     ^
main.c:22:5: error: expected declaration or statement at end of input
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:30:3: error: expected declaration or statement at end of input
   30 |   return 0;
      |   ^~~~~~
Language: C

#include <stdio.h>
int main(void){
  int n,m;  
  scanf("%d %d",&n,&m);
  
  int a[n];
  int wa = 0;
  int max = 0;
  
  for(int i = 0;i < n;i++){
    scanf("%d",&a[i]);
    wa += a[i];
  }
  
  for(int i = 1;i < n;i++){
    for(int j = n-1;j => i;j--){
      if(a[j] > a[j-1]){
        int temp = a[j];
        a[j] = a[j-1];
        a[j-1] = temp;
      }
    }
  }
  
  if(a[m-1] >= wa/4/m)
    printf("Yes");
  else
    printf("No");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:24: error: expected expression before '>' token
   16 |     for(int j = n-1;j => i;j--){
      |                        ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:14:19: error: expected ';' before 'if'
   14 |     bkb = a[i]*4*m
      |                   ^
      |                   ;
   15 |     if(bkb >= a_score)
      |     ~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:16: error: invalid operands to binary & (have 'char *' and 'int')
    4 |   scanf("%d %d"&n,&m);
      |         ~~~~~~~^
      |         |
      |         char *
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:14:23: error: expected ';' before 'for'
   14 |   k=(double)(wa/(4*m))
      |                       ^
      |                       ;
   15 |   for(int i=0;i<n;i++){
      |   ~~~                  
main.c:21:3: error: 'else' without a previous 'if'
   21 |   else
      |   ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:7: error: conflicting types for 'num'; have 'int[99]'
    8 |   int num[99];
      |       ^~~
main.c:6:7: note: previous definition of 'num' with type 'int'
    6 |   int num=0;
      |       ^~~
main.c:13:5: error: 'sum' undeclared (first use in this function); did you mean 'num'?
   13 |     sum=sum+num[i];
      |     ^~~
      |     num
main.c:13:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:18:10: error: expected ';' before '}' token
   18 |     cnt++
      |          ^
      |          ;
   19 |   }
      |   ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:13:23: error: invalid suffix "m" on integer constant
   13 |     if(a[i] > a_score/4m)
      |                       ^~
main.c:16:9: error: expected expression before '>' token
   16 |   if(c => n){
      |         ^
Language: C++

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before 'a'
   11 |         sum+=arr[i]a;
      |                    ^
      |                    ;
Language: C++

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


int main() {
  int N , M ,T , V;
  cin >> N >> M ; 
  vector<int> A(N) ;
  T = 0 ; 
  V = 0 
  
  for (int i = 0 ; i < N ; i++){
    cin >> A.at(i) ;
    V = V + A.at(i) ; 
  }
  
    for (int i = 0 ; i < N ; i++){
    
    if (A.at(i) > V/(4*M)){
    	T++ ; 
    }
  }


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





}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected ';' before 'for'
   10 |   V = 0
      |        ^
      |        ;
   11 | 
   12 |   for (int i = 0 ; i < N ; i++){
      |   ~~~   
a.cc:12:20: error: 'i' was not declared in this scope
   12 |   for (int i = 0 ; i < N ; i++){
      |                    ^
Language: C++

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


int main() {
  int N , M ,T;
  cin >> N >> M ; 
  vector<int> A(N) ;
  T = 0 ; 
  
  for (int i = 0 ; i < N ; i++){
    cin >> A.at(i) ;
    
    if (A.at(i) > 1/(4M)){
    	T++ ; 
    }
  }


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




}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: unable to find numeric literal operator 'operator""M'
   14 |     if (A.at(i) > 1/(4M)){
      |                      ^~
Language: C++

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


int main() {
  int N , M ,T;
  cin >> N >> M ; 
  vector<int> A(N) ;
  T = 0 ; 
  
  for (int i = 0 ; i < N ; i++){
    cin >> A.at(i) ;
    
    if (A.at(i) > 1/(4M)){
    	T++
    }
  }


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




}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: unable to find numeric literal operator 'operator""M'
   14 |     if (A.at(i) > 1/(4M)){
      |                      ^~
a.cc:15:12: error: expected ';' before '}' token
   15 |         T++
      |            ^
      |            ;
   16 |     }
      |     ~       
a.cc:20:12: error: expected primary-expression before '>' token
   20 |   if (T++ => M){
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define loop(i,x,n) for(ll i=x;i<n;i++) 
#define sort(v) sort(v.begin(),v.end());
const ll mod = 1E9+7;

int main()
{
  ll n,m;
  cin>>n>>m;
  float x = n/(4*m);
  ll ans = 0;
  loop(i,0,n){
    cin>>v[i];
    if(v[i] >= x)ans++;
  }
  cout<<(ans>=m?"Yes":"No");
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'v' was not declared in this scope
   15 |     cin>>v[i];
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m;
    cin>>n;
    int arr[n];
    cin>>m;
    for(int i=0; i<n; i++)
        cin>>arr[i];
        
    int sum = 0;
    for(int i=0; i<n; i++)
    {
        sum+=arr[i];
    }
    int count =0;
    for(int i=0; i<n; i++)
    {
        if(arr[i]>=(1.0*sum/(4.0*m*)))
            {
                count++;
            }
    }
    if(count>=m)
    {
        cout<<"Yes"<<endl;

    }
    else
    {
        cout<<"No"<<endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:36: error: expected primary-expression before ')' token
   20 |         if(arr[i]>=(1.0*sum/(4.0*m*)))
      |                                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m;
    cin>>n;
    int arr[n];
    cin>>m;
    for(int i=0; i<n; i++)
        cin>>arr[i];
    int sum = 0;
    for(int i=0; i<n; i++)
    {
        sum+=arr[i];
    }
    int count =0;
    for(int i=0; i<n; i++)
    {
        if(arr[i]>=(sum/(4*m))
            {
                count++;
            }
    }
    if(count>=m)
    {
        cout<<"Yes"<<endl;

    }
    else
    {
        cout<<"No"<<endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:31: error: expected ')' before '{' token
   19 |         if(arr[i]>=(sum/(4*m))
      |           ~                   ^
      |                               )
   20 |             {
      |             ~                  
a.cc:23:5: error: expected primary-expression before '}' token
   23 |     }
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m;
    cin>>n;
    int arr[n];
    cin>>m;
    for(int i=0; i<n; i++)
        cin>>arr[i];
    int sum = 0;
    for(int i=0; i<n; i++)
    {
        sum+=arr[i];
    }
  if(sum>((1/(4*m)*sum))
{
    cout<<"NO"<<endl;

}
else
{
    cout<<"YES"<<endl;
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before '{' token
   16 |   if(sum>((1/(4*m)*sum))
      |                         ^
      |                         ;
   17 | {
      | ~                        
a.cc:21:1: error: expected primary-expression before 'else'
   21 | else
      | ^~~~
a.cc:20:2: error: expected ')' before 'else'
   20 | }
      |  ^
      |  )
   21 | else
      | ~~~~
a.cc:16:5: note: to match this '('
   16 |   if(sum>((1/(4*m)*sum))
      |     ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:22:22: error: expected ';' before 'return'
   22 |     else printf("No")
      |                      ^
      |                      ;
   23 |     return 0;
      |     ~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected ',' or ';' before 'for'
   13 |   for(int i=0;i<N;i++){
      |   ^~~
a.cc:13:15: error: 'i' was not declared in this scope
   13 |   for(int i=0;i<N;i++){
      |               ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: 'I' was not declared in this scope
    6 |   for(int i=0;i<N;I++){
      |                   ^
a.cc:13:3: error: expected ',' or ';' before 'for'
   13 |   for(int i=0;i<N;i++){
      |   ^~~
a.cc:13:15: error: 'i' was not declared in this scope
   13 |   for(int i=0;i<N;i++){
      |               ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: 'I' was not declared in this scope
    6 |   for(int i=0;i<N;I++){
      |                   ^
a.cc:11:10: error: no matching function for call to 'reverse(<unresolved overloaded function type>, std::vector<int>::iterator)'
   11 |   reverse(A.begin,A.end());
      |   ~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'void std::reverse(_BIter, _BIter) [with _BIter = __gnu_cxx::__normal_iterator<int*, vector<int> >]'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:36: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |             ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided
a.cc:13:3: error: expected ',' or ';' before 'for'
   13 |   for(int i=0;i<N;i++){
      |   ^~~
a.cc:13:15: error: 'i' was not declared in this scope
   13 |   for(int i=0;i<N;i++){
      |               ^
Language: C++

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

int main(){
  int n,m;
  long long SUM=0;
  cin >> n>>m;
  vector<int> line(n);
  for(int i=0;i<n;i++){
    cin >> line[i];
    SUM+=line[i];
  }
  sort(line.begin(), line.end());
  reverse(line.begin(), line.end());
  for(int i = 0;i < m;i++){
    if(line[i] < (sum / (4*m))){
      cout<<"No"<<'\n';
      return 0;
    }
  }
    cout<<"Yes"<<'\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: 'sum' was not declared in this scope
   16 |     if(line[i] < (sum / (4*m))){
      |                   ^~~
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        int N = sc.nextInt();
        int M = sc.nextInt();
        int a[] = new int[N];
        for(int i=0;i<N;i++){
            a[i] = sc.nextInt();
        }
        
        double sum = 0;
        for (int i=0;i<N;i++){
            sum += a[i];
        } 
        
        int count = 0;
        
        for(int i=0;i>N;i++){
            if(a[i]>=sum/(M*4)){
                count++;
            }
        }
        if(count>=M){
            System,out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}


Compiler output:
Main.java:28: error: not a statement
            System,out.println("Yes");
            ^
Main.java:28: error: ';' expected
            System,out.println("Yes");
                  ^
2 errors
Language: C++

n,m=map(int,input().split())
a=list(map(int,input().split()))

sum_a=sum(a)
cnt=0

for i in range(n):
    if a[i]>=sum_a/(4*m):
        cnt+=1

if cnt>=m:
    print("Yes")
else:
    print("No")

    

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,m=map(int,input().split())
      | ^
Language: C++

#include<iostream>
#include<cmath>
#include<string>
#include<string.h>
#include<algorithm>
#include<vector>
#include<map>
#include<queue>
#include<stack>
#include<set>
#include<climits>
#include<deque>
#include<tuple>
#include<iomanip>
using namespace std;
#define int                  int64_t
#define double               long double
#define vi                   vector<int>
#define di                   deque<int>
#define si                   set<int>
#define vpii                 vector<pair<int,int>>
#define pi                   pair<int,int>
#define pub                  push_back
#define puf                  push_front
#define pob                  pop_back
#define pof                  pop_front
#define all(a)               (a).begin(),(a).end()
#define rall(a)              (a).rbegin(),(a).rend()
#define PI                   3.1415926535897932384626433832795
#define read(a)              for(auto& x:a) cin>>x
#define speak(a)             for(auto x:a) cout<<x<<' '
#define rep(i,s,n)           for(int i=s;i<n;++i)
#define repe(i,s,n)          for(int i=s;i<=n;++i)
#define repr(i,n,s)          for(int i=n;i>=s;--i)
#define endl                 '\n'
#define gap                  ' '
#define MAX                  LLONG_MAX
#define MIN                  LLONG_MIN
#define min3(a,b,c)          min(a, min(b, c))
#define max3(a,b,c)          max(a, max(b, c))
#define MOD                  1000000007
//freopen("input.txt","r",stdin);
//freopen("output.txt","w",stdout);
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n,c=0;
    double m;cin>>n>>m;
    double a[n],s=0; rep(i,0,n) cin>>a[i],s+=a[i];
    double ans=s/(4*m);
    rep(i,0,n) c+=(a[i]>=ans)
    cout<<(c>=m?"Yes":"No");
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:52:30: error: expected ';' before 'cout'
   52 |     rep(i,0,n) c+=(a[i]>=ans)
      |                              ^
      |                              ;
   53 |     cout<<(c>=m?"Yes":"No");
      |     ~~~~
Language: C++

/* I have already deleted My old account because somebody stole my code
and i have no idea how. If you are copying this code atleast make it look different 
Yours Faithfully
Shobhit Yadav */

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

ll M,N;
/*ll freq[200005];*/
void solve(){
	 /*memset(freq,0,sizeof(freq));*/
  cin>>N>>M;
 ll a[N];
 ll sum = 0 ,temp;
 vector<ll> va;


  for(ll i = 0 ; i<N ; i++){
    cin>>temp;
    va.push_back(temp);
    sum += temp
  }


sort(va.rbegin() , va.rend());

 for(ll i = 0 ; i<M ; i++){
  if( 4*M*va[i] >= sum)
    ans++;
 }

 if(ans >=M)
  cout<<"Yes"<<'\n';

else
  cout<<"No"<<'\n';




}



int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	
   solve();

	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:23:16: error: expected ';' before '}' token
   23 |     sum += temp
      |                ^
      |                ;
   24 |   }
      |   ~             
a.cc:31:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |     ans++;
      |     ^~~
      |     abs
a.cc:34:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |  if(ans >=M)
      |     ^~~
      |     abs
Language: C++

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

int main() {
	int n, m;
	cin >> n >> m;
	vector<int> a(n);
	int s = 0;
	rep(i, n) {
		cin >> a[i];
		s += a[i];
	}
	s /= (4.0*m);
	int cnt = 0;
	rep(i, n) {
		if (a[i] > ) cnt++;
	}
	if (cnt >= M) cout << "Yes" << endl;
	else cout << "No" << endl;

	//cout << s << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: expected primary-expression before ')' token
   19 |                 if (a[i] > ) cnt++;
      |                            ^
a.cc:21:20: error: 'M' was not declared in this scope
   21 |         if (cnt >= M) cout << "Yes" << endl;
      |                    ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ')' before ';' token
   14 |   reverse(A.begin(); A.end());
      |          ~         ^
      |                    )
a.cc:14:29: error: expected ';' before ')' token
   14 |   reverse(A.begin(); A.end());
      |                             ^
      |                             ;
a.cc:14:27: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::end() [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
   14 |   reverse(A.begin(); A.end());
      |                      ~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:893:7: note: declared here
  893 |       end() _GLIBCXX_NOEXCEPT
      |       ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> A(N);
      |   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include<cmath>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> A(N);
      |          ^~~
a.cc:10:10: error: 'A' was not declared in this scope
   10 |     cin>>A.at(i);
      |          ^
a.cc:13:8: error: 'A' was not declared in this scope
   13 |   sort(A.begin(),A.end());
      |        ^
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   13 |   sort(A.begin(),A.end());
      |   ^~~~
      |   sqrt
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:20:5: error: expected declaration or statement at end of input
   20 |     return(0);
      |     ^~~~~~
Language: C

#include <stdio.h>
signed main(){
    int N,M,i,j,count=0,sum=0;
    scanf("%d %d",&N,&M);
    int A[100];
    for(i=0;i<N;i++){
        scanf("%d",&A[i]);
        sum+=A[i];
    }
    sum/=4*M;
    for(i=0;i<N;i++){
        if(A[12 3
4 56 78 901 2 345 67 890 123 45 6 789>sum){
            count++;
        }
    }
    if(count>=M){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    return(0);
}

Compiler output:
main.c: In function 'main':
main.c:12:16: error: expected ']' before numeric constant
   12 |         if(A[12 3
      |                ^~
      |                ]
Language: C

#include<stdio.h>
signed main(){
   int a[10000];
   int n,m;
   scanf("%d %d",&n,&m);
   int i,sum=0;
   for(i=0;i<n;i++){
       scanf("%d",&a[i]);
       sum+=a[i];
   }
   int max,j,temp;
   for(i=0;i<n;i++){
       max=i;
       for(j=i+1;j<n;j++){
           if(a[max]<a[j]){
               max=j;
           }
       }
       if(i!=max){
           temp=a[i];
           a[i]=a[max];
           a[max]=temp;
       }
   }
   int line=sum/(4*m),c=0;
   for(i=0;i<m;i++){
       if(a[i]>=line){
           c++;
       }
   }
   if(c>=m){
       printf("Yes\n");
   }else{
       printf("No\n");
   }
    return(0);

Compiler output:
main.c: In function 'main':
main.c:36:5: error: expected declaration or statement at end of input
   36 |     return(0);
      |     ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;cin>>N>>M;
  int a[100];
  int sum=0;
  int ans=0;
  for(int i=0;i<N;i++){
    cin>>a[i];
    sum+=a[i];
  }
  sort(a,a+N);
  for(int i=0;i<N;i++){
    if(a[i]>=sum/4/M;)
      ans+=1;
    else if(ans==M)
      cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: expected primary-expression before ')' token
   14 |     if(a[i]>=sum/4/M;)
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;cin>>N>>M;
  int ans=0;
  int SH=0,
  vector<int> h[N];
  for(int i=0;i<N;i++){
    cin>>h[i];
    SH+=h;
  }
  sort(h,h+N);
  for(int i=0;i<N;i++){
    if(h[i]<SH/4/M)ans+=1;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: invalid declarator before 'h'
    7 |   vector<int> h[N];
      |               ^
a.cc:9:10: error: 'h' was not declared in this scope
    9 |     cin>>h[i];
      |          ^
a.cc:12:8: error: 'h' was not declared in this scope
   12 |   sort(h,h+N);
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;cin>>N>>M;
  int ans=0;
  int SH=0,
  vector <int> h[N];
  for(int i=0;i<N;i++){
    cin>>h[i];
    SH+=h;
  }
  sort(h,h+N);
  for(int i=0;i<N;i++){
    if(h[i]<SH/4/M)ans+=1;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: invalid declarator before 'h'
    7 |   vector <int> h[N];
      |                ^
a.cc:9:10: error: 'h' was not declared in this scope
    9 |     cin>>h[i];
      |          ^
a.cc:12:8: error: 'h' was not declared in this scope
   12 |   sort(h,h+N);
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;cin>>N>>M;
  int ans=0;
  int SH=0,
  int h[N];
  for(int i=0;i<N;i++){
    cin>>h[i];
    SH+=h;
  }
  sort(h,h+N);
  for(int i=0;i<N;i++){
    if(h[i]<SH/4/M)ans+=1;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected unqualified-id before 'int'
    7 |   int h[N];
      |   ^~~
a.cc:9:10: error: 'h' was not declared in this scope
    9 |     cin>>h[i];
      |          ^
a.cc:12:8: error: 'h' was not declared in this scope
   12 |   sort(h,h+N);
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;cin>>N>>M;
  int ans=0;
  int SH=0,
  int h[];
  for(int i=0;i<N;i++){
    cin>>h[i];
    SH+=h;
  }
  sort(h,h+N);
  for(int i=0;i<N;i++){
    if(h[i]<SH/4/M)ans+=1;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected unqualified-id before 'int'
    7 |   int h[];
      |   ^~~
a.cc:9:10: error: 'h' was not declared in this scope
    9 |     cin>>h[i];
      |          ^
a.cc:12:8: error: 'h' was not declared in this scope
   12 |   sort(h,h+N);
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;cin>>N>>M;
  int ans=0;
  int SH=0,
  int H[];
  for(int i=0;i<N;i++){
    cin>>H[i];
    SH+=H;
  }
  sort(H,H+N);
  for(int i=0;i<N;i++){
    if(H[i]<SH/4/M)ans+=1;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected unqualified-id before 'int'
    7 |   int H[];
      |   ^~~
a.cc:9:10: error: 'H' was not declared in this scope
    9 |     cin>>H[i];
      |          ^
a.cc:12:8: error: 'H' was not declared in this scope; did you mean 'SH'?
   12 |   sort(H,H+N);
      |        ^
      |        SH
Language: C++

#include <bits/stdc++.h> 
using namespace std; 
  
int main() 
{ 
    int n , k;
    cin>>n;
    cin>>k;
    int *arr=new int[n];
  int sum=0;
    for(int i=0;i<n;i++){
      cin>>arr[i];
    sum+=arr[i];}
  
    sort(arr, arr+n, greater<int>()); 
   
    cout<<v<<l;
    for(int i=0;i<k;i++){
      if(arr[i]<v){
        cout<<"No";
        return 0;
      }
    }
    
    
    cout<<"Yes";
    return 0; 
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'v' was not declared in this scope
   17 |     cout<<v<<l;
      |           ^
a.cc:17:14: error: 'l' was not declared in this scope
   17 |     cout<<v<<l;
      |              ^
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for (int i = 0; i < (n); i++)
#define RREP(i, s, n) for (int i = s; i < (n); i++)
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.rbegin(), a.rend()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using namespace std;
using ll = long long;
typedef pair<int, int> pint;
typedef pair<ll, ll> pll;
const ll MOD = 1000000007;
const ll INF = MOD * MOD;
const int inf = (1<<29);

int main() {

    int n, m;
    cin >> n >> m;
    
    vector<double> a(n);
    double sum = 0;
    REP(i, n) {
        cin >> a[i];
        sum += a[i];
    }

    int tmp = 0;

    REP(i, n) {
        if (a[i] >= sum/4)
    }

    if (tmp >= m) {
        cout << "Yes" << endl;
        
    } else { 
        cout << "No" << endl;
        
    }

    //cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:5: error: expected primary-expression before '}' token
   32 |     }
      |     ^