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

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

    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: expected ';' before ')' token
   14 |   if (sum)-sum*(4*b)<0){
      |                       ^
      |                       ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  float n,m,sum=0,c=0;
  cin>>n>>m;
  float a[n];
  for (float i=0;i<n;i++)
  {
    cin>>a[i];
    sum+=a[i];
  }
  float temp=(1/(4*m))*sum;
  float tmp=temp*sum;
  for (float i=0;i<n;i++)
  {
    if(a[i]>=temp)
      c++;
  }
  if(c>=m)
    cout<<"yes";
  else
    cout<<"no";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: conversion from 'float' to 'long unsigned int' in a converted constant expression
    7 |   float a[n];
      |           ^
a.cc:7:11: error: could not convert 'n' from 'float' to 'long unsigned int'
    7 |   float a[n];
      |           ^
      |           |
      |           float
a.cc:7:11: error: size of array 'a' has non-integral type 'float'
a.cc:10:11: error: invalid types 'float [1][float]' for array subscript
   10 |     cin>>a[i];
      |           ^
a.cc:11:11: error: invalid types 'float [1][float]' for array subscript
   11 |     sum+=a[i];
      |           ^
a.cc:17:9: error: invalid types 'float [1][float]' for array subscript
   17 |     if(a[i]>=temp)
      |         ^
Language: Java

import util.java.Scanner();
public class Main{
	public static void main(String[] args){
    Scanner scn = new Scanner(System.in);
      int N = scn.nextInt();
      int M = scn.nextInt();
      int[] a = scn.nextInt();
      int sum =  sum+a[];
      scn.close();
    if(a[]<sum/4*M){
    	System.out.println("No");
    }else{
    	System.out.println("Yes");
    }
    }
}


Compiler output:
Main.java:1: error: ';' expected
import util.java.Scanner();
                        ^
Main.java:8: error: '.class' expected
      int sum =  sum+a[];
                        ^
Main.java:10: error: '.class' expected
    if(a[]<sum/4*M){
          ^
3 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  vector<int> vec(N);
  
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  
  int sum;
  sum = 0;
  for (int i = 0; i < N; i++) {
    sum += ve.at(i)
  }
  
  
  int cnt = 0;
  for (int i = 0; i < N; i++) {
    if ( vec.at(i) / sum >= 1 / 4M ) {
      cnt ++;
    }
   
  if (cnt >= M) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 've' was not declared in this scope; did you mean 'vec'?
   16 |     sum += ve.at(i)
      |            ^~
      |            vec
a.cc:22:33: error: unable to find numeric literal operator 'operator""M'
   22 |     if ( vec.at(i) / sum >= 1 / 4M ) {
      |                                 ^~
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main()
{
  int n, m;
  
  cin>>n>>m;
  
  int a[n+1]={0};
  int maxn[m+1]={0};
  
  for(int i=1; i<=n; i++)
  {
    cin>>a[x];
  }
  
  for(int i=1; i<=m; i++)
  {
    for(int j=1; j<=n; j++)
    {
      if(a[j]>=maxn[i])
      {
        bool f=false;
        
        for(int k=1; k<=m; k++)
        {
          if(a[j]!=maxn[k])
          {
            f=true;
            
            break;
          }
        }
        
        if(f=true)
        {
          continue;
        }
        
        maxn[i]=a[j];
      }
    }
  }
  
  for(int i=1; i<=m; i++)
  {
    if(maxn[i]/2 >= maxn[i-1])
    {
      cout<<"No"<<endl;
    }
  }
  
  cout<<"Yes"<<endl;
  
  return 0;
}

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

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



int main(){
    int N,sum=0;
  double M_s,M;
    cin>>N>>M;
  
    int A[N];
    for(int i=0;i<N;i++){
        cin>>A[i];
    }
  for(int k=0;k<N;k++){
    sum=sum+A[k];
  }
  M_s=(double)sum/(4*M);

    sort(A,A+N,greater<int>());

    if((double)A[M-1]>=M_s) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: invalid types 'int [N][double]' for array subscript
   25 |     if((double)A[M-1]>=M_s) cout<<"Yes"<<endl;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N,M;
  cin >> N >> M;
  int main(void) {
    int p=0,q=0;
    scanf("%d/%d",&p,&q);
    printf("%f\n",(double)p/q);
    p=1;
    q=4*M;
    

  
  vector<int> A(N);
  for(int i=0;i<N;i++) {
    cin >> A.at(i);}
  int sum=0;
  for(int i=0;i<N;i++) {
    sum+=A.at(i);}
  int x=0;
  for(int i=0;i<N;i++) {
    if(A.at(i)/sum>=p/q) {
      x+=1;}
    else {
      x+=0;}}
    if(x>=M) {
      cout << "Yes" << endl;}
    else {
      cout << "No" << endl;}
    return 0;
    }
  }
      
    
    



Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: a function-definition is not allowed here before '{' token
    6 |   int main(void) {
      |                  ^
Language: C

#include <stdio.h>

int main(void) {  
  int N=0, M=0;
  int vote[100];
  scanf("%d%d",&N,&M);
  int count = 0;
  int sum = 0;
  for (int i = 0; i < N; ++i) { 
    scanf("%d",&vote[i]);
    sum += vote[i];
  }
  
  for (int i = 0; i < n; ++i){
    if (vote[i] >= sum/(4*M)) count++;
  }
  
  if (count >= M) printf("Yes");
  else printf("No");
  
  return 0;
}

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

#include <iostream>
using namespace std;
 
int main(){
	int N,M;
	cin >> N >> M;
 
	int a[N];
  	double sum = 0;
 
	for(int i = 0 ; i < N ; i++){
		cin >> a[i];
        sum += a[i];
	}
 
	int cnt = 0;
	for(int i = 0; i < N ; i++){
		if((double)a[i] > (double)1/(4*M)*sum){
			cnt ++;
		}
	}
 
	if(cnt >= M){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}

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

import util.java.Scanner();
public class Main{
	public static void main(String[] args){
    Scanner scn = new Scanner(System.in);
      int N = scn.nextInt();
      int M = scn.nextInt();
      int[] a = scn.nextInt();
      int sum += a[];
      scn.close();
    if(a[]<sum/4*M){
    	System.out.println("No");
    }else{
    	System.out.println("Yes");
    }
    }
}

Compiler output:
Main.java:1: error: ';' expected
import util.java.Scanner();
                        ^
Main.java:8: error: ';' expected
      int sum += a[];
             ^
Main.java:8: error: not a statement
      int sum += a[];
                  ^
Main.java:10: error: '.class' expected
    if(a[]<sum/4*M){
          ^
4 errors
Language: C++

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

int main(){
    int N, M;
    cin >> N >> M;
    vector<int> A(N);
    for (int i = 0; i < N; ++i){
        cin >> A.at(i);
    }
    int votes = accumulate(A.begin(), A.end(), 0);
    int valid = count_if(A.begin(), A.end(), 
        [votes, M](int x)->bool{return(x * 4 * M >= votes);});
    if (valid > M) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'count_if' was not declared in this scope
   14 |     int valid = count_if(A.begin(), A.end(),
      |                 ^~~~~~~~
Language: C++

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

int main() {
    int n, m;
    cin >> n >> m;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a.at(i);
    }

    sort(a.begin(), a.end(), greater<int>());

    int sum = accumulate(a.begin(), a.end(), 0);

    if (a.at(m-1) >= sum*1.0/4*m)) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:34: error: expected primary-expression before ')' token
   16 |     if (a.at(m-1) >= sum*1.0/4*m)) {
      |                                  ^
Language: C

#include <stdio.h>

int main(void) {  
  int N=0, M=0;
  int vote[100];
  scanf("%d%d",&N,&M);
  int count = 0;
  int sum = 0;
  for (int i = 0; i < N; ++i) { 
    scanf("%d",%vote[i]);
    sum += vote[i];
  }
  
  for (int i = 0; i < n; ++i){
    if (vote[i] >= sum/(4*M)) count++;
  }
  
  if (count >= M) printf("Yes");
  else printf("No");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:16: error: expected expression before '%' token
   10 |     scanf("%d",%vote[i]);
      |                ^
main.c:14:23: error: 'n' undeclared (first use in this function)
   14 |   for (int i = 0; i < n; ++i){
      |                       ^
main.c:14:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <stdio.h>

int main() {
  int N=0, M=0;
  int A[1001];
  scanf ("%d %d", &N, &M);
  sum = 0;
  
  for (int i = 0; i < N; i++) {
    scanf ("%d ", &A[i]);
    sum += A[i];
  }
  vote = 0;
  valid++;
  for (int i = 0; i < N; i++) {
    if ((double)A[i]/(double)sum > 1.0/(4.0*(double)M)) valid++;
  }
  if (valid) printf("Yes");
  else printf("No");
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'sum' was not declared in this scope
    7 |   sum = 0;
      |   ^~~
a.cc:13:3: error: 'vote' was not declared in this scope
   13 |   vote = 0;
      |   ^~~~
a.cc:14:3: error: 'valid' was not declared in this scope
   14 |   valid++;
      |   ^~~~~
Language: C++

#include<stdio.h>
int main()
{
    int ara[1000],a,b,i,j=0,k,n,m;
    scanf("%d%d",&n,&m);
    long long int s=0;
    for(i=0;i<n;i++)
    {
        scanf("%d",&ara[i]);
        s=s+ara[i];
    }
    a=m*4;
    double d=s/a;
    b=ceil(d);
    for(i=0;i<n;i++)
    {
        if(ara[i]>=b)
        {
            j++;
        }
    }
    if(j>=m)
    {
        printf("Yes\n");
    }
    else printf("No\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'ceil' was not declared in this scope
   14 |     b=ceil(d);
      |       ^~~~
Language: C++

#include <iostream>
#include <vector>

void funcB() {
  int n, m, sum = 0;
  std::cin >> n >> m;
  std::vector<int> a(n,0);
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
    sum += a[i];
  }
  float thre = (float)(sum) / 4 * m;
  int overq = 0;
  for (int i = 0; i < n; i++) if (a[i] >= thre)overq++;
  std::cout << (overq >= m ? "Yes" : "No");
  
}

int main(void) {
  funcC();
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'funcC' was not declared in this scope; did you mean 'funcB'?
   20 |   funcC();
      |   ^~~~~
      |   funcB
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: 'ab' was not declared in this scope; did you mean 'b'?
   18 |    if(count>=ab){
      |              ^~
      |              b
Language: C++

#include <iostream>
#include <cstdio>
#include <climits>
#include <cstring>
using namespace std;

int main () {
  float n, m;
  cin >> n >> m;
  float a[n];
  float sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  int cnt = 0;
  float check = sum / 4.0 / m;
  for (int i=0; i<n; i++) {
    if (check < a[i]) cnt++;
  }
 if (cnt >= m) cout << "Yes";
 else cout << "No";
 
}

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

#include <iostream>
using namespace std;
 
int main(){
	int N,M;
	cin >> N >> M;
 
	int a[N];
  	int sum = 0;
 
	for(int i = 0 ; i < N ; i++){
		cin >> a[i];
        sun += a[i];
	}
 
	int cnt = 0;
	for(int i = 0; i < N ; i++){
		if((double)a[i] > (double)1/(4*M)*sum){
			cnt ++;
		}
	}
 
	if(cnt >= M){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'sun' was not declared in this scope; did you mean 'sum'?
   13 |         sun += a[i];
      |         ^~~
      |         sum
Language: Java

import java.util.Scanner;
import java.util.*;
import java.lang.*;

class Main{
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int x = scanner.nextInt(); 
    int y = scanner.nextInt();
    int a[] = new int[x];
    int sum = 0;
    int i = 0;
    while(i<x-1){
      a[i] = scanner.nextInt();
      sum += a[i];
      i++;
    }
    Arrays.sort(a);
    //double aa = (double)a[x-y+1] / sum;
    System.out.print(aa);
    //double bb = ((double)1/ (4*y));
    System.out.print(bb);
    if(aa > bb){
      System.out.print("Yes");
    }
    else{
      System.out.print("No");  
    }
  }
}

Compiler output:
Main.java:20: error: cannot find symbol
    System.out.print(aa);
                     ^
  symbol:   variable aa
  location: class Main
Main.java:22: error: cannot find symbol
    System.out.print(bb);
                     ^
  symbol:   variable bb
  location: class Main
Main.java:23: error: cannot find symbol
    if(aa > bb){
       ^
  symbol:   variable aa
  location: class Main
Main.java:23: error: cannot find symbol
    if(aa > bb){
            ^
  symbol:   variable bb
  location: class Main
4 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> sina(110);
  for(int i = 0; i < N; i++){
cin >> sina[i];

  }
sort(sina.begin(), sina.end());
reverse(sina.begin(), sina.end());

int zen = 0;

for(int i = 0; i < N; i++){
zen += sina[i];
}
bool check = 1;
int toku = 0;
for(int i = 0; i < M; i++){
toku += sina[i];



}
if(sina[i] < zen/4) check = 0;
if(check = 0) cout << "No" << endl;
else cout << "Yes" << endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: error: 'i' was not declared in this scope
   28 | if(sina[i] < zen/4) check = 0;
      |         ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'i' was not declared in this scope
   13 |   if(A[i]<sum/(4*M)){
      |        ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: 'ab' was not declared in this scope; did you mean 'b'?
   18 |    if(count>=ab){
      |              ^~
      |              b
Language: C++

/* ****_hela**** */

#include<bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define	endl		'\n'
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define hell        1000000007
#define rep(i,a,b)	for(ll int i=a;i<b;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
using namespace std;

#define N  100005

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.t7\]---3ie(0);
	int TESTS=1;
//	cin>>TESTS;
	while(TESTS--)
	{
		ll int n,m;
		cin>>n>>m;
		ll int a[n],tot=0;
		rep(i,0,n)cin>>a[i],tot+=a[i];
		ll int c=0;
		rep(i,0,n)
		{
			if(4*m*a[i]>=tot)c++;
		}		
		if(c<m)cout<<"No";
		else cout<<"Yes";
	}
	return 0;
}

Compiler output:
a.cc:27:16: error: stray '\' in program
   27 |         cout.t7\]---3ie(0);
      |                ^
a.cc: In function 'int main()':
a.cc:27:14: error: 'std::ostream' {aka 'class std::basic_ostream<char>'} has no member named 't7'
   27 |         cout.t7\]---3ie(0);
      |              ^~
Language: C++

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

int main(){
	int n,m;
	cin >> n >> m;
	
	//配列を作成
	vector<int>A(n);
	for(int i = 0, i < n, i++){
		cin >> A.at(i);
	}
	
	//合計票
	int sum = 0;
	
	for(int i = 0, i < n, i++){
		sum += A.at(i);
	}
	
	if(sum < 1/4*m){
		cout << "No" << endl;
		}else{
			cout << "Yes" << endl;
		}
		return 0;
}
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before '<' token
   10 |         for(int i = 0, i < n, i++){
      |                         ^~
      |                         ;
a.cc:10:26: error: expected primary-expression before '<' token
   10 |         for(int i = 0, i < n, i++){
      |                          ^
a.cc:10:34: error: expected ';' before ')' token
   10 |         for(int i = 0, i < n, i++){
      |                                  ^
      |                                  ;
a.cc:17:25: error: expected ';' before '<' token
   17 |         for(int i = 0, i < n, i++){
      |                         ^~
      |                         ;
a.cc:17:26: error: expected primary-expression before '<' token
   17 |         for(int i = 0, i < n, i++){
      |                          ^
a.cc:17:34: error: expected ';' before ')' token
   17 |         for(int i = 0, i < n, i++){
      |                                  ^
      |                                  ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,a[1001],m,s;
int main()
{
	cin>>n>>m;
	for(int i=1;i<=n;i++)cin>>a[i],s+=a[i];
	sort(a+1,a+n+1);
	for(int i=m;i>=n-m+1;i--)
	{
		if((double)a[i]<(double)s/4.0/m)cout<<"No",exit(0);
	}
	cout<<"Yes";
}
\

Compiler output:
a.cc:15:1: error: stray '\' in program
   15 | \
      | ^
Language: C++

// oj d https://atcoder.jp/contests/abc161/tasks/abc161_b
// g++ B.cpp && oj t
// oj s https://atcoder.jp/contests/abc161/tasks/abc161_b B.cpp

#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")

#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()

using ll = long long;
using ull = unsigned long long;
using namespace std;

int main() {
  int N, M;
  ll tmp1 = 0;
  cin >> N >> M;
  vector<int> A(N);
  REP(i, N) {
    cin >> A[i];
    tmp1 += A[i];
  }
  ll tmp2 = tmp1 / (4 * M);
  sort(ALL(A), greater<int>);
  int c = 0;
  REP(i, N) {
    if (A[i] >= tmp2) {
      c++;
      if (c == M) {
        cout << "Yes" << endl;
        break;
      }
    }
    if (i == N-1) {
      cout << "No" << endl;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:28: error: expected primary-expression before ')' token
   26 |   sort(ALL(A), greater<int>);
      |                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
   ll n,m;
   cin>>n>>m;
   
       
      

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

}

Compiler output:
a.cc:13:3: error: expected unqualified-id before 'if'
   13 |   if(count>=m)
      |   ^~
a.cc:15:3: error: expected unqualified-id before 'else'
   15 |   else cout<<"No";
      |   ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: invalid types 'int[int]' for array subscript
   14 |   if (max(sum[b])-sum*(4*b)<0){
      |              ^
a.cc:19:4: error: expected '}' at end of input
   19 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

int main()
{
	int M,N;
	int A[101];
	int sum=0;
    scanf("%d%d",&M,&N);
    for(int i=0;i<M;i++){
    	scanf("%d",&A[i]);
    	sum+=A[i];
	}
	float ave;
	ave=(double)sum/M;
	for(int i=0;i<M;i++){
		if(A[i]>=ave) N--;
		if(N==0) break;
	}
	if(N==0) printf("Yes");
	else printf("No");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'scanf' was not declared in this scope
    6 |     scanf("%d%d",&M,&N);
      |     ^~~~~
a.cc:17:18: error: 'printf' was not declared in this scope
   17 |         if(N==0) printf("Yes");
      |                  ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:18:14: error: 'printf' was not declared in this scope
   18 |         else printf("No");
      |              ^~~~~~
a.cc:18:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
int main() {
    int N,M, get, sum=0;
    vector<int> v;
    ios::sync_with_stdio(false);
    cin>>N>>M;
    for(int i = 0; i < N; i++) {
        cin>>get;
        v.push_back(get);
        sum += get;
    }
    sort(v.begin(), v.end(), greater<int>());
    if(sum % (4*M) != 0) sum = sum/(4*M) + 1;
    else sum = sum/(4*M)
    for(int i = 0; i < M; i++) {
        if(v[i] <= sum) {
            cout<<"No"<<endl;
            return 0;
        }
    }



    cout<<"Yes"<<endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: expected ';' before 'for'
   17 |     else sum = sum/(4*M)
      |                         ^
      |                         ;
   18 |     for(int i = 0; i < M; i++) {
      |     ~~~                  
a.cc:18:20: error: 'i' was not declared in this scope
   18 |     for(int i = 0; i < M; i++) {
      |                    ^
Language: C++

#include<iostream>
#include <vector> 
using namespace std;
int main(){
    long long N,M;
    cin>>N>>M;
    vector < int> A;
    int long long=0,ct=0;
    
    for(int i=0;i<N;i++){
        int x;
        cin>>x;
        total+=x;
        A.push_back(x);
    }
    
    int Min=total/(4*M);
    for(int i=0;i<N;i++){
        if(A[i]>=Min) M--;
    }
    
    if(M<=0) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected unqualified-id before '=' token
    8 |     int long long=0,ct=0;
      |                  ^
a.cc:13:9: error: 'total' was not declared in this scope
   13 |         total+=x;
      |         ^~~~~
a.cc:17:13: error: 'total' was not declared in this scope
   17 |     int Min=total/(4*M);
      |             ^~~~~
Language: C++

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

int main(){
    int N, M;
    cin >> N >> M;
    vector<int> A(N);
    for (int i = 0; i < N; ++i){
        cin >> A.at(i);
    }
    int votes = accumulate(A.begin(), A.end(), 0);
    int valid = count_if(A.begin(), A.end(), 
        [votes, M](int x)->bool{return(x * 4 * M > votes);});
    if (valid > M) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'count_if' was not declared in this scope
   14 |     int valid = count_if(A.begin(), A.end(),
      |                 ^~~~~~~~
Language: C++

#include<stdio.h>
int main(){
  int N,M,SUM,count;
  scanf("%d",&N);
  scanf("%d",&M);
  int array[N];
  for(int i=0;i<N;i++){
    scanf("%d"&array[i]);
  }
   for(int i=0;i<N;i++){
    SUM+=array[i];
  }
     for(int i=0;i<N;i++){
    if(array[i]>=1/4/M*SUM)count++;
     }
  if(count>=M)printf("Yes");
   if(count<M)printf("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
    8 |     scanf("%d"&array[i]);
      |           ~~~~^~~~~~~~~
      |           |           |
      |           |           int
      |           const char [3]
Language: C++

#include<iostream>
#include <vector> 
using namespace std;
int main(){
    long long N,M;
    cin>>N>>M;
    vector < int> A;
    int long long=0,ct=0;
    
    for(int i=0;i<N;i++){a
        int x;
        cin>>x;
        total+=x;
        A.push_back(x);
    }
    
    int Min=total/(4*M);
    for(int i=0;i<N;i++){
        if(A[i]>=Min) M--;
    }
    
    if(M<=0) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected unqualified-id before '=' token
    8 |     int long long=0,ct=0;
      |                  ^
a.cc:10:26: error: 'a' was not declared in this scope
   10 |     for(int i=0;i<N;i++){a
      |                          ^
a.cc:12:14: error: 'x' was not declared in this scope
   12 |         cin>>x;
      |              ^
a.cc:13:9: error: 'total' was not declared in this scope
   13 |         total+=x;
      |         ^~~~~
a.cc:17:13: error: 'total' was not declared in this scope
   17 |     int Min=total/(4*M);
      |             ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;	
int main()
{
	int n,m,a[n+1];
	cin>>n>>m>>a[n+1];
	for(a[n+1];rii=3;kn5++)
	cout--;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'rii' was not declared in this scope
    7 |         for(a[n+1];rii=3;kn5++)
      |                    ^~~
a.cc:7:26: error: 'kn5' was not declared in this scope
    7 |         for(a[n+1];rii=3;kn5++)
      |                          ^~~
a.cc:8:13: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
    8 |         cout--;
      |         ~~~~^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <math.h>
#include <vector>

using namespace std;

int main() {

	float M;
	int i;
	float N = 0;
	float total = 0;
	float ninki = 0;
	float* A;

	A = new float[N];

	cin >> N;
	cin >> M;
	
	for (i = 0; i < N; i++) {

		cin >> A[i];
		total = total + A[i];

	}

	for (i = 0; i < N; i++) {

		if (total / 4 * M <= A[i]) {
			ninki++;
		}

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:23: error: expression in new-declarator must have integral or enumeration type
   17 |         A = new float[N];
      |                       ^
Language: C

#include <stdio.h>

int main(void) {  
int N, M;
scanf("%d%d",&N,&N);
  int vote[100];
  int sum = 0;
  for (int i = 0; i < N; ++i)
    scanf("%d",%vote[i]);
    sum += vote[i];
  
  int count = 0;
  for (int i = 0; i < N;++i)
  {
    if(vote[i] > sum / (4*M)) count++;
  }
  
  if (count >= M) printf("Yes");
  else printf("No");
  
  
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:9:16: error: expected expression before '%' token
    9 |     scanf("%d",%vote[i]);
      |                ^
main.c:10:17: error: 'i' undeclared (first use in this function)
   10 |     sum += vote[i];
      |                 ^
main.c:10:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>
int main(){
  int N,M,SUM,count;
  scanf("%d",&N);
  scanf("%d",&M);
  int array[N];
  for(int i=0;i<N;i++){
    scanf("%d"&array[i])
  }
   for(int i=0;i<N;i++){
    SUM+=array[i];
  }
     for(int i=0;i<N;i++){
    if(array[i]>=1/4/M*SUM)count++;
     }
  if(count>=M)printf("Yes");
   if(count<M)printf("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
    8 |     scanf("%d"&array[i])
      |           ~~~~^~~~~~~~~
      |           |           |
      |           |           int
      |           const char [3]
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 int n,m;
  cin>>n>>m;
 	vector<int> A(n);
	  for(int i=0;i<n;i++){
	    cin>>A.at(i);
}
  int all=0;
  for(int i=0;i<n;i++){
    all+=A(i) ;
  }
  int ans=0;
  for(int i=0;i<n;i++){
if(A(i) >=all/(4*m)){
  ans++;
}
  }
  if(ans>=m){
cout<<"Yes"<<endl;
  }
else{
  cout<<"No"<<endl;
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: no match for call to '(std::vector<int>) (int&)'
   12 |     all+=A(i) ;
      |          ~^~~
a.cc:16:5: error: no match for call to '(std::vector<int>) (int&)'
   16 | if(A(i) >=all/(4*m)){
      |    ~^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:31: error: expected primary-expression before '<' token
   19 |             if(sum / (4 * m) =< a[i])     cnt++;
      |                               ^
Language: C++

include <iostream>
using namespace std;
 
int main(){
  int n;
  double m;
  cin >> n >> m;
  double a[n];
  int answer = 0;
  double sum = 0;
  for (int i=0; i<n; i++){
    sum+=a[i];
  }
  for (int i=0; i<n; i++){
    if (a[i]/sum > 1/4.0/m){
      answer+=1;
    }
  }
  if (answer>=m){
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> n >> m;
      |   ^~~
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:20:22: error: 'endl' was not declared in this scope
   20 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout << "No" << endl;
      |     ^~~~
a.cc:22:21: error: 'endl' was not declared in this scope
   22 |     cout << "No" << endl;
      |                     ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: invalid types 'int[int]' for array subscript
   10 |    cin >> A[i];
      |            ^
a.cc:11:13: error: invalid types 'int[int]' for array subscript
   11 |     sum += A[i];
      |             ^
a.cc:13:8: error: 'i' was not declared in this scope
   13 |   if(A[i]<sum/(4*M)){
      |        ^
Language: C

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

}



Compiler output:
main.c: In function 'main':
main.c:15:26: error: expected expression before ')' token
   15 |           printf("Yes\n",);
      |                          ^
Language: C++

#include<stdio.h>
int main(){
  int N,M,SUM,count;
  scanf("%d",&N);
  scanf("%d",&M);
  int array[N];
  for(int i=0;i<N;i++){
    scanf("%d"array[i])
  }
   for(int i=0;i<N;i++){
    SUM+=array[i];
  }
     for(int i=0;i<N;i++){
    if(array[i]>=1/4/M*SUM)count++;
     }
  if(count>=M)printf("Yes");
   if(count<M)printf("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: unable to find string literal operator 'operator""array' with 'const char [3]', 'long unsigned int' arguments
    8 |     scanf("%d"array[i])
      |           ^~~~~~~~~
Language: Java

import java.util.*;
public class Main
{
  public static void main(String args[])
  {
    Scanner in=new Scanner(System.in);
    int N=in.nextInt();
    int M=in.nextInt();int A[]=new int [N];
    int i;long p=0,m=0;
    for(i=0;i<N;i++)
    {
      A[i]=in.nextInt();
      p=p+A[i];
    }
    for(i=0;i<N;i++)
    {
      if(A[i]>=int(Math.round((p/(4.0*M)))))
      {
        m++;
      }
    }
    if(m>=M)
      System.out.println("Yes");
      else
        System.out.println("No");
  }
}
      
    


Compiler output:
Main.java:17: error: '.class' expected
      if(A[i]>=int(Math.round((p/(4.0*M)))))
                  ^
Main.java:17: error: ';' expected
      if(A[i]>=int(Math.round((p/(4.0*M)))))
                                           ^
2 errors
Language: C++

#include<iostream>
#include <vector> 
using namespace std;
int main(){
    int N,M;
    cin>>N>>M;
    vector < int> A;
    int total=0,ct=0;
    
    for(int i=0;i<N;i++){a
        int x;
        cin>>x;
        total+=x;
        A.push_back(x);
    }
    int Min=total/(4*M);
    for(int i=0;i<N;i++){
        if(A[i]>=Min) M--;
    }
    
    if(M<=0) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: 'a' was not declared in this scope
   10 |     for(int i=0;i<N;i++){a
      |                          ^
a.cc:12:14: error: 'x' was not declared in this scope
   12 |         cin>>x;
      |              ^
Language: C++

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

int n,m;
int a[1100];

int main(){
    cin >> n >> m;
  for (int i=0;i<n;i++) cin >> a[i];
  

  for (int i=0;i<n;i++){
    if {(1/4/m)>=a[i]} cout << "Yes" << endl;
    else cout << "No" << endl;
 }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: expected '(' before '{' token
   13 |     if {(1/4/m)>=a[i]} cout << "Yes" << endl;
      |        ^
      |        (
a.cc:14:5: error: 'else' without a previous 'if'
   14 |     else cout << "No" << endl;
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main() {
	long long int N, M, all, tmp, k, l;
	long long int A[100];
	long 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 (long double(A[N - M]) < max) {
		cout << "No" << endl;
		return 0;
	}
	cout << "Yes" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected primary-expression before 'long'
   25 |         if (long double(A[N - M]) < max) {
      |             ^~~~
a.cc:25:13: error: expected ')' before 'long'
   25 |         if (long double(A[N - M]) < max) {
      |            ~^~~~
      |             )
Language: C++

typedef unsigned long long ll;
typedef vector<ll> vec;
typedef pair<ll, ll> P;
 
int main(){
    int n, m, sum=0;
        cin >> n >> m;
    string ans="No";
 
    vec v(n);
        for(int i=0; i<n; i++){
            cin >> v.at(i);
            sum += v.at(i);
        }
    sum /= 4*m;
    sort(v.begin(), v.end());
    reverse(v.begin(), v.end());
 
    for(int i=0; i<n; i++){
        if(m<=i){
            ans = "Yes";
            break;
        }
        if(sum<=v.at(i)) continue;
        break;
    }
 
    cout << ans << endl;
    
}

Compiler output:
a.cc:2:9: error: 'vector' does not name a type
    2 | typedef vector<ll> vec;
      |         ^~~~~~
a.cc:3:9: error: 'pair' does not name a type
    3 | typedef pair<ll, ll> P;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> n >> m;
      |         ^~~
a.cc:8:5: error: 'string' was not declared in this scope
    8 |     string ans="No";
      |     ^~~~~~
a.cc:10:5: error: 'vec' was not declared in this scope
   10 |     vec v(n);
      |     ^~~
a.cc:12:20: error: 'v' was not declared in this scope
   12 |             cin >> v.at(i);
      |                    ^
a.cc:16:10: error: 'v' was not declared in this scope
   16 |     sort(v.begin(), v.end());
      |          ^
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |     sort(v.begin(), v.end());
      |     ^~~~
      |     short
a.cc:17:5: error: 'reverse' was not declared in this scope
   17 |     reverse(v.begin(), v.end());
      |     ^~~~~~~
a.cc:21:13: error: 'ans' was not declared in this scope
   21 |             ans = "Yes";
      |             ^~~
a.cc:28:5: error: 'cout' was not declared in this scope
   28 |     cout << ans << endl;
      |     ^~~~
a.cc:28:13: error: 'ans' was not declared in this scope
   28 |     cout << ans << endl;
      |             ^~~
a.cc:28:20: error: 'endl' was not declared in this scope
   28 |     cout << ans << endl;
      |                    ^~~~
Language: C++

#include<stdio.h>
int main()
{
	char *m[2];
	char *n[100];
  int nn[100];
  	char *str1;
  	char *str2;
  int c=0,i=0,all=0;
  	gets(str1);
	gets(str2);
  	m = strtok(s1, " ");
  	n = strtok(s1, " ");
  for(;i<1000;i++){
    nn[i]=int(n[i]);
    all+=nn[i];
  }
  
  while(i<=1000)
  {
   if(int(m[0])*4/all<=int(n[i]))
     c+=1;
  }
    if(c>=int(m[1]))
      printf("Yes");
  	else
      printf("No")
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |         gets(str1);
      |         ^~~~
      |         getw
a.cc:12:20: error: 's1' was not declared in this scope
   12 |         m = strtok(s1, " ");
      |                    ^~
a.cc:12:13: error: 'strtok' was not declared in this scope
   12 |         m = strtok(s1, " ");
      |             ^~~~~~
a.cc:15:11: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   15 |     nn[i]=int(n[i]);
      |           ^~~~~~~~~
a.cc:21:7: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   21 |    if(int(m[0])*4/all<=int(n[i]))
      |       ^~~~~~~~~
a.cc:21:24: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   21 |    if(int(m[0])*4/all<=int(n[i]))
      |                        ^~~~~~~~~
a.cc:24:11: error: cast from 'char*' to 'int' loses precision [-fpermissive]
   24 |     if(c>=int(m[1]))
      |           ^~~~~~~~~
a.cc:27:19: error: expected ';' before 'return'
   27 |       printf("No")
      |                   ^
      |                   ;
   28 |     return 0;
      |     ~~~~~~
Language: Java

import java.util.*;
public class Main
{
  public static void main(String args[])
  {
    Scanner in=new Scanner(System.in);
    int N=in.nextInt();
    int M=in.nextInt();int A[]=new int [N];
    int i;long p=0,m=0;
    for(i=0;i<N;i++)
    {
      A[i]=in.nextInt();
      p=p+A[i];
    }
    for(i=0;i<N;i++)
    {
      if(A[i]>=int(Math.round((p/(4.0*M)))));
      {
        m++;
      }
    }
    if(m>=M)
      System.out.println("Yes");
      else
        System.out.println("No");
  }
}
      
    


Compiler output:
Main.java:17: error: '.class' expected
      if(A[i]>=int(Math.round((p/(4.0*M)))));
                  ^
Main.java:17: error: ';' expected
      if(A[i]>=int(Math.round((p/(4.0*M)))));
                                           ^
2 errors
Language: C++

#include<stdio.h>
int main(){
  int N,M,SUM,count;
  scanf("%d",&N);
  scanf("%d",&M);
  int array[n];
  for(int i=0;i<N;i++){
    scanf("%d"array[i])
  }
   for(int i=0;i<N;i++){
    SUM+=array[i];
  }
     for(int i=0;i<N;i++){
    if(array[i]>=1/4/M*SUM)cont++;
     }
  if(count>=M)printf("Yes");
   if(count<M)printf("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'n' was not declared in this scope
    6 |   int array[n];
      |             ^
a.cc:8:11: error: unable to find string literal operator 'operator""array' with 'const char [3]', 'long unsigned int' arguments
    8 |     scanf("%d"array[i])
      |           ^~~~~~~~~
a.cc:11:10: error: 'array' was not declared in this scope
   11 |     SUM+=array[i];
      |          ^~~~~
a.cc:14:8: error: 'array' was not declared in this scope
   14 |     if(array[i]>=1/4/M*SUM)cont++;
      |        ^~~~~
a.cc:14:28: error: 'cont' was not declared in this scope; did you mean 'count'?
   14 |     if(array[i]>=1/4/M*SUM)cont++;
      |                            ^~~~
      |                            count
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi =vector<vi>;

int main(){
  int n,m;
  cin >>n>>m;
  vi A(n);
  for(int i=0;i<n;i++) cin >>A[i];
  int sum=0;
  for(int i=0;i<n;i++) sum+=A[i];
  
  sort(A.begin(),A.end());
  reverse(A.begin(),A.end());
  int x = sum/(4*m);
  x += 0.1
  if(A[m-1] >= x) cout <<"Yes"<<endl;
  else cout <<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: expected ';' before 'if'
   18 |   x += 0.1
      |           ^
      |           ;
   19 |   if(A[m-1] >= x) cout <<"Yes"<<endl;
      |   ~~       
a.cc:20:3: error: 'else' without a previous 'if'
   20 |   else cout <<"No"<<endl;
      |   ^~~~
Language: C++

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

int main(){
  int n, m;
  cin >> n >> m;
  vector<int> a[101];
  int total=0;
  for(int i=0;i<n;++i){
    cin >> a.at(i);
    total += a.at(i);
  }
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  
  int count=0;
  for(int i=0;i<m;++i){
    if(a.at(i) > total/4*m) continue;
    count++;
  }
  if(count > m) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: request for member 'at' in 'a', which is of non-class type 'std::vector<int> [101]'
   10 |     cin >> a.at(i);
      |              ^~
a.cc:11:16: error: request for member 'at' in 'a', which is of non-class type 'std::vector<int> [101]'
   11 |     total += a.at(i);
      |                ^~
a.cc:13:10: error: request for member 'begin' in 'a', which is of non-class type 'std::vector<int> [101]'
   13 |   sort(a.begin(), a.end());
      |          ^~~~~
a.cc:13:21: error: request for member 'end' in 'a', which is of non-class type 'std::vector<int> [101]'
   13 |   sort(a.begin(), a.end());
      |                     ^~~
a.cc:14:13: error: request for member 'begin' in 'a', which is of non-class type 'std::vector<int> [101]'
   14 |   reverse(a.begin(), a.end());
      |             ^~~~~
a.cc:14:24: error: request for member 'end' in 'a', which is of non-class type 'std::vector<int> [101]'
   14 |   reverse(a.begin(), a.end());
      |                        ^~~
a.cc:18:10: error: request for member 'at' in 'a', which is of non-class type 'std::vector<int> [101]'
   18 |     if(a.at(i) > total/4*m) continue;
      |          ^~
Language: C

#include <stdio.h>

int main (void)
{
  unsigned long a[100];
  unsigned long n, m, mi;
  unsigned long i;
  unsigned long sum = 0;
  
  scanf("%lu %lu", &n, &m);
  mi=0;
  
  for (i=0; i<n; i++) {
    scanf("%lu", &(a[i]));
    sum += a[i];
  }
          
  for (i=0; i<n; i++) {
    if (double(a[i]) >= double(sum/(4*m))) {
      mi++;
    }
  }
  
  if (mi >= m) {
    puts("Yes");
  } else {
    puts("No");
  }
          
  return 0;

}


Compiler output:
main.c: In function 'main':
main.c:19:9: error: expected expression before 'double'
   19 |     if (double(a[i]) >= double(sum/(4*m))) {
      |         ^~~~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int N= sc.nextInt();
		int M = sc.nextInt();
		int data[] = new int[N];
		double total = 0;
		int max = 0;
		for(int i = 0; i<N;i++) {
			data[i] = sc.nextInt();
			total += data[i];
		}
		for(int i = 0; i<N;i++) {
			for(int j =i+1 ;j<N;j++) {
				if(data[i]<data[j]) {
					int temp = data[i];
					data[i] = data[j];
					data[j] = temp;
				}
			}
		}
	
		boolean F= true;
		for(int i = 0; i<M; i++) {
			if((data[i]/total)<(1/4*M)) {
			F = false;
			System.out.print(data[i]+" "+i);
			break;
		}
		}
		if(F!=true) {
			System.out.println("No");
		}else {
			System.out.println("Yes");
		}
		
	}
	

Compiler output:
Main.java:38: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 int n,m;
  cin>>n>>m;
 	vector<int> A(n);
	  for(int i=0;i<n;i++){
	    cin>>A.at(i);
}
  int all=0;
  for(int i=0;i<n;i++){
    all+=A(i);
  }
  int ans=0;
  for(int i=0;i<n;i++){
if(A(i)>=all/(4*m)){
  ans++;
}
  }
  if(ans>=m){
cout<<"Yes"<<endl;
  }
else{
  cout<<"No"<<endl;
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: no match for call to '(std::vector<int>) (int&)'
   12 |     all+=A(i);
      |          ~^~~
a.cc:16:5: error: no match for call to '(std::vector<int>) (int&)'
   16 | if(A(i)>=all/(4*m)){
      |    ~^~~
Language: Java

import java.util.*;

public class PopularVote {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();

        if (m > n) {
            System.out.println("No");
            return;
        }

        List<Integer> items = new ArrayList<>();

        int votes = 0;
        for (int i = 0; i < n; i++) {
            int vote = in.nextInt();
            votes += vote;
            items.add(vote);
        }

        int condition = votes / (4 * m);

        int checkCount = 0;
        Collections.sort(items, (o1, o2) -> o2 - o1);
        for (Integer check: items) {
            if (check >= condition && ++checkCount >= m) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");

    }

}

Compiler output:
Main.java:3: error: class PopularVote is public, should be declared in a file named PopularVote.java
public class PopularVote {
       ^
1 error
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc =new Scanner(System.in);
    int N =sc.nextInt();
    int M =sc.nextInt();
    Integer A[] =new Integer[N];
    long B[] =new long[N+1];
     B[0] =0;
    for(int i=0;i<N;i++){
      A[i] =sc.nextInt();
      B[i+1]=B[i]+A[i];
    }
    int C =B[N]/M/4
    Arrays.sort(A, Collections.reverseOrder());
    if(A[M-1]<C){System.out.println("No");}
    else{System.out.println("Yes");}
  }
}


Compiler output:
Main.java:14: error: ';' expected
    int C =B[N]/M/4
                   ^
1 error
Language: C

#include <stdio.h>
#define i	(999)
int main()
{
  int N=0;
  int M=0;
  int A[i];
  
  

Compiler output:
main.c: In function 'main':
main.c:7:3: error: expected declaration or statement at end of input
    7 |   int A[i];
      |   ^~~