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

#include <iostream>
#include <vector>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <cstring>
#include <algorithm>
using namespace std;

#define ll long long

int main(){

    ll int n, m;
    cin >> n >> m;
    ll int arr[n];
    ll int totalNoOfVotes=0;
    for(int i=0; i<n; i++){
        cin >> arr[i];
        totalNoOfVotes+=arr[i];
    }

    ll int threshold = ceil(totalNoOfVotes/(4*m));

    ll int count=0;
    for(int i=0; i<n; i++){
        if(arr[i]>=threshold) count++;
    }

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:24: error: 'ceil' was not declared in this scope
   23 |     ll int threshold = ceil(totalNoOfVotes/(4*m));
      |                        ^~~~
Language: C++

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

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude <iostream>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> N >> M;
      |         ^~~
a.cc:22:17: error: 'cout' was not declared in this scope
   22 |                 cout << "Yes" << endl;
      |                 ^~~~
a.cc:22:34: error: 'endl' was not declared in this scope
   22 |                 cout << "Yes" << endl;
      |                                  ^~~~
a.cc:24:17: error: 'cout' was not declared in this scope
   24 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:24:33: error: 'endl' was not declared in this scope
   24 |                 cout << "No" << endl;
      |                                 ^~~~
Language: C

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

}

Compiler output:
main.c: In function 'main':
main.c:8:28: error: expected expression before '==' token
    8 |   if(scanf("%d %d",&n,&m)) == 1;
      |                            ^~
main.c:11:27: error: expected expression before '==' token
   11 |     if(scanf("%d",&a[i])) == 1;
      |                           ^~
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))));
                  ^
1 error
Language: C++

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

using namespace std;

typedef long long tnum;

tnum* getNumsStdin(int);

int main() {
	tnum n, m, k, v, total;
	tnum* a;
	scanf("%lld %lld", &n, &m);
	a = getNumsStdin(n);

	sort(a, a+n, std::greater<tnum>());

	total = 0;
	for (int i = 0; i < n; i++) {
		total += a[i];
	}

	v = a[m-1];

	if (total > 4 * m * v) {
		printf("No");
	}
	else {
		printf("Yes");
	}
	
	free(a);
	return 0;
}

//have to be free()
tnum* getNumsStdin(int num) {
	tnum* buf;
	tnum* tmp;
	buf = (tnum*)malloc(num * sizeof(tnum));
	for (int i = 0; i < num; i++) {
		scanf("%lld", &buf[i]);
	}

	return buf;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: 'greater' is not a member of 'std'
   17 |         sort(a, a+n, std::greater<tnum>());
      |                           ^~~~~~~
a.cc:17:39: error: expected primary-expression before '>' token
   17 |         sort(a, a+n, std::greater<tnum>());
      |                                       ^
a.cc:17:41: error: expected primary-expression before ')' token
   17 |         sort(a, a+n, std::greater<tnum>());
      |                                         ^
Language: Java

import java.io.*;
import java.util.*;

public class CF {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());

        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());

        int[] a = new int[n];
        int sum = 0;
        st = new StringTokenizer(br.readLine());
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(st.nextToken());
            sum += a[i];
        }

        int count = 0;
        for (int x : a) {
            if (x >= sum / (4 * m)) {
                count++;
            }
        }

        if (count >= m) {
            pw.println("Yes");
        } else {
            pw.println("No");
        }

        pw.close();
    }
}

Compiler output:
Main.java:4: error: class CF is public, should be declared in a file named CF.java
public class CF {
       ^
1 error
Language: C++

#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
int main(){
    int n,m;cin>>n>>m;
    int A[n];
    int sum=0;
    int res;
    for(int i=0;i<n;i++){
        cin>>A[i];
        sum+=A[i];
    }

    for(int i=0;i<n;i++){
        if(A[i]<sum*m*4){
            res++;
        }
    }
    if(res<m){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
    }
}


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

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<stdlib.h>
#include<string>
#include<string.h>
#include<math.h>
using namespace std;
int main()
{
    int m,n,sum=0,a[110]={0};
    cin>>n>>m;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        sum+=a[i];
    }
    sort(a,a+n);
    if(4*a[n-m]<(sum/m)))
        cout<<"No";
    else
        cout<<"Yes";
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  
   int N,M,x,l,k;
   cin >> N >> M;
  
   vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  x = 0;
     for (int i = 0; i < N; i++) {
    x = x + vec.at(i);
      }
  
    l = x*1/(4*M);
  
     for (int i = 0; i < N; i++) {  
 	 if (l < vec.at(i)){
       k++;
  	}
     }

       if(k<M){
         cout << "No"<<endl;
       }
  		else{
          cout<,"Yes"<<endl;
        }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:16: error: expected primary-expression before ',' token
   30 |           cout<,"Yes"<<endl;
      |                ^
a.cc:30:22: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   30 |           cout<,"Yes"<<endl;
      |                 ~~~~~^~~~~~
Language: C++

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

	int a[N];

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

	int cnt = 0;
	for(int i = 0; i < N ; i++){
		if(a[i] > 1/4*M){
			cnt ++;
		}
	}

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

    return 0;
}
提出情報
提出日時	2020-04-04 21:26:38
問題

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude <iostream>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> N >> M;
      |         ^~~
a.cc:22:17: error: 'cout' was not declared in this scope
   22 |                 cout << "Yes" << endl;
      |                 ^~~~
a.cc:22:34: error: 'endl' was not declared in this scope
   22 |                 cout << "Yes" << endl;
      |                                  ^~~~
a.cc:24:17: error: 'cout' was not declared in this scope
   24 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:24:33: error: 'endl' was not declared in this scope
   24 |                 cout << "No" << endl;
      |                                 ^~~~
a.cc: At global scope:
a.cc:32:5: error: redefinition of 'int main()'
   32 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
a.cc:57:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   57 | 提出情報
      | ^~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: invalid operands of types 'double [10000]' and 'double' to binary 'operator+'
   12 |   sort(a,a+n,greater<double>());
      |          ~^~
      |          | |
      |          | double
      |          double [10000]
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,m;
  cin>>n>>m;
  vector <int> arr;
  for(int i=0;i<n;i++)
  {
    int temp;
    cin>>temp;
    arr.push_back(temp);
  }
  int flag=0;
  int sum=accumulate(arr.begin(),arr.end(),0)
  sort(arr.begin(),arr.end())
    for(int i=0;i<m;i++)
    {
      if(arr[i]<ceil(400/(4*m))
         flag=1;
     }
      if(flag==0)
         cout<<"Yes";
         else
         cout<<"No";
        
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected ',' or ';' before 'sort'
   16 |   sort(arr.begin(),arr.end())
      |   ^~~~
a.cc:17:17: error: 'i' was not declared in this scope
   17 |     for(int i=0;i<m;i++)
      |                 ^
Language: C++

#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
int main(){
    int n,m;cin>>n>>m;
    int A[n];
    int sum=0;
    int res;
    for(int i=0;i<n;i++){
        cin>>A[i];
        sum+=A[i];
    }

    for(int i=0;i<n;i++){
        if(A[i]<sum*m*4){
            res++;
        }
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |     cout<<ans<<endl;
      |           ^~~
      |           abs
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/4m){
  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/4m){
      |    ~^~~
a.cc:16:14: error: unable to find numeric literal operator 'operator""m'
   16 | if(A(i)>=all/4m){
      |              ^~
a.cc:17:8: error: expected ';' before '}' token
   17 |   ans++
      |        ^
      |        ;
   18 | }
      | ~
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 a[]=new int[n];
    int total=0;
    for (int i=0;i<n;i++) {
      a[i]=sc.nextInt();
      total+=a[i];
    }

    int count=0;
    // int h=total/(4*m);

    System.out.println(h);

    for (int i=0;i<n;i++) {
      if (a[i]<h) {

      }else{
        count++;
      }
    }

    if (count<m) {
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }



  }
}


Compiler output:
Main.java:18: error: cannot find symbol
    System.out.println(h);
                       ^
  symbol:   variable h
  location: class Main
Main.java:21: error: cannot find symbol
      if (a[i]<h) {
               ^
  symbol:   variable h
  location: class Main
2 errors
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:32: error: expected ')' before '{' token
   15 |         if(a[i] * 4 * M >= asum {
      |           ~                    ^~
      |                                )
a.cc:18:5: error: expected primary-expression before '}' token
   18 |     }
      |     ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     for(i=0;i<N;i++) {
      |         ^
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();
    float sel=0.0;
    ArrayList<Integer> a=new ArrayList<>();
    long sum=0;
    int flag=0;
    for(int i=0;i<n;i++){
      int t=sc.nextInt();
      sum+=t;
      a.add(t);
    }
    Collections.sort(a);
    sel=(float)(sum/(4*m));
    //System.out.println(sel);
    int count=0;
    for(int i=n-1;i>-1;i--){
      if((float)a.get(i)>=sel) count++;
      if(count==m) {
        flag=1;break;
      }
    }
	if(flag==1)System.out.println("Yes");
    else System.out.println("No");
  }
}

Compiler output:
Main.java:7: error: incompatible types: possible lossy conversion from double to float
    float sel=0.0;
              ^
1 error
Language: C++

/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <bits/stdc++. h>

using namespace std;

int main()
{
    int N,M;
    cin>>N>>M;
    vector<int> a;
    int s=0;
    for(int i=0;i<N;i++)
    {
        cin>>a[i];
        
    }
    for(int i=0;i<N;i++)
        s=s+a[i];
    int min=s/(4*M);
    int c=0;
    for(int i=0;i<N;i++)
    {
        if(a[i]>=min)
        {
            c++;
        }
    }
    if(c>=M)
    {
       cout<<"YES"<<endl;
    }
    else
        cout<<"NO"<<endl;
}


Compiler output:
a.cc:9:10: fatal error: bits/stdc++. h: No such file or directory
    9 | #include <bits/stdc++. h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

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

  

Compiler output:
main.c: In function 'main':
main.c:7:7: error: 'i' undeclared (first use in this function)
    7 |   for(i=0;i<=N-1;i++){
      |       ^
main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:7: error: 'j' undeclared (first use in this function)
   15 |   for(j=0;j<=N-1;j++){
      |       ^
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:18: error: '.class' expected
      if(A[i]>=int((Math.round((p/(4.0*M)))));
                  ^
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 m = 0;
    m = A.at(i);
  }
  int n = 0;
  for (int i = 0; i < N; i++) {
  	if (A.at(i) >= m / (4 * M)) {
      n++;
    }
  }
  if (n <= M) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: 'm' was not declared in this scope
   15 |         if (A.at(i) >= m / (4 * M)) {
      |                        ^
Language: Java

import java.util.Scanner;

public class TestB_161{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int A = sc.nextInt();
   int B = sc.nextInt();
   int hairetu[] = new int[A];
   int sum =0;
   int count = 0;
   for(int i=0; i<A; i++) {
   hairetu[i] = sc.nextInt();
   sum += hairetu[i];
   }

   int joken = sum/(4*B);
   for(int i=0; i<A; i++) {
	   if(hairetu[i] > joken) {
		   count++;
	   }
   }

   if(count >= B) {
	   System.out.print("Yes");
   } else {
	   System.out.print("No");
   }

 }
}




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

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

int main() {
  int n, m; cin >> n >> m;
  vector<long long> a(n);
  long long sum = 0;
  for(int i = 0; i < n; i++){
    cin >> a.at(i);
    sum += a.at(i);
  }
  sort(a.rbegin(), a.rend());
  if(sum % (4*m) != 0){
  if(a.at(m-1) <= sum/(4*m)){
    cout << "No";
  }else{
    cout << "Yes";
  }
  }else{
  if(a.at(m-1) < sum/(4*m)){
    cout << "No";
  }else{
    cout << "Yes";
  }

}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:25: error: 'd' was not declared in this scope
    5 |   long long int n,m,s=0;d=0;
      |                         ^
a.cc:8:9: error: 'a' was not declared in this scope
    8 |   {cin>>a[i];
      |         ^
a.cc:13:8: error: 'a' was not declared in this scope
   13 |   { if(a[i]<s)
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,m;
  cin>>n>>m;
  vector <int> arr;
  for(int i=0;i<n;i++)
  {
    int temp;
    cin>>temp;
    arr.push_back(temp);
  }
  int flag=0;
  sum=accumulate(arr.begin(),arr.end(),0)
  sort(arr.begin(),arr.end())
    for(int i=0;i<m;i++)
    {
      if(arr[i]<ceil(400/(4*m))
         flag=1;
     }
      if(flag==0)
         print("Yes");
         else
         print("No");
        
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'sum' was not declared in this scope
   15 |   sum=accumulate(arr.begin(),arr.end(),0)
      |   ^~~
a.cc:17:17: error: 'i' was not declared in this scope
   17 |     for(int i=0;i<m;i++)
      |                 ^
a.cc:23:10: error: 'print' was not declared in this scope; did you mean 'rint'?
   23 |          print("Yes");
      |          ^~~~~
      |          rint
a.cc:25:10: error: 'print' was not declared in this scope; did you mean 'rint'?
   25 |          print("No");
      |          ^~~~~
      |          rint
Language: C++

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

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

    if (1/4/m>=a[i]) cout << "Yes" << endl;
    else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'i' was not declared in this scope
   11 |     if (1/4/m>=a[i]) cout << "Yes" << endl;
      |                  ^
Language: C++

#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//イテレータあるけど順序保持しないmap
#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列
using namespace std;
typedef long long ll;

#define rep(i, n) for(int i = 0; i < (n); i++)

int main(){

float N,M;
float A[N];
float result=0;
cin>>N>>M;
rep(i,N)cin>>A[i];
rep(i,N)result+=A[i];
sort(A,A+N,greater<int>());
if(A[M-1]>result/(4*M))cout<<"Yes"<<endl;
else cout<<"No"<<endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: conversion from 'float' to 'long unsigned int' in a converted constant expression
   27 | float A[N];
      |         ^
a.cc:27:9: error: could not convert 'N' from 'float' to 'long unsigned int'
   27 | float A[N];
      |         ^
      |         |
      |         float
a.cc:27:9: error: size of array 'A' has non-integral type 'float'
a.cc:32:9: error: invalid operands of types 'float [1]' and 'float' to binary 'operator+'
   32 | sort(A,A+N,greater<int>());
      |        ~^~
      |        | |
      |        | float
      |        float [1]
a.cc:33:5: error: invalid types 'float [1][float]' for array subscript
   33 | if(A[M-1]>result/(4*M))cout<<"Yes"<<endl;
      |     ^
Language: Java

import java.util.*;
 
class Main{
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    int kind=scan.nextInt();
    int cho=scan.nextInt();
    PriorityQueue in=new PriorityQueue();
    int full=0;
    for(int a=0; a<kind; a++){
      int input=scan.nextInt();
      full+=input;
      in.offer(input);
    }
    int ans=0;
    for(int a=kind; a>=cho; a--){
      ans=(int)in.poll();
    if(full/(4*cho)<=ans){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}

Compiler output:
Main.java:24: error: reached end of file while parsing
}
 ^
1 error
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)))));
                  ^
1 error
Language: C

#include<stdio.h>
 
int main(void){
  int N,M=0;
  int sum = 0;
  int dif = 0;

  scanf("%d",&N);
  scanf("%d",&M);

  int a[N];
  
  for(int i=0; i<N ; i++){
   scanf("%d",&a[i]);
   sum += a[i];
}

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


  dif = sum / (4 * M);

  if(a[M] >= dif){
    printf("Yes");
}
  else{
    printf("No");
}

return 0;
 
}

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

#include <iostream>
#include <vector>

using namespace std;

int
main()
{
    int n,m;
    cin >> n >> m;

    vector<int> a;
    int sum = 0;
    for(int i=0;i<n;i++){
        int x;
        cin >> x;
        a.push_back(x);
        sum += x;
    }

    int min = sum / (4*m);
    sort(a.begin(), a.end(), greater<int>());

    for(int i=0;i<m;i++) {
        if(a[i] < min) {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |     sort(a.begin(), a.end(), greater<int>());
      |     ^~~~
      |     short
Language: C

#include <stdio.h>
int main()
{
  int a,b,c;
  scanf("%d %d\n",&a,&b);
  scanf("%d",&c);
  if(a>=a*(1/4*b){
    printf("yes");
  }else{
    printf("no");
  }
     return 0;
     }
  

Compiler output:
main.c: In function 'main':
main.c:7:18: error: expected ')' before '{' token
    7 |   if(a>=a*(1/4*b){
      |     ~            ^
      |                  )
main.c:13:6: error: expected expression before '}' token
   13 |      }
      |      ^
Language: C++

#include <iostream>

using namespace std;
int f[1050];
int main()
{
    int n.m;
    cin >> n>>m;
    int s=0;
    for(int i=0;i<n;i++){
        cin >> f[i];
        s+=f[i];
    }
    sort(f,f+n);
    int state=0;
    for(int i=n-1;m;i++,m--){
        if(f[i]<4*m*s){
            state=1;
            break;
        }
    }
    if(state)
        cout << "No\n";
    else
        cout << "Yes\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected initializer before '.' token
    7 |     int n.m;
      |          ^
a.cc:8:12: error: 'n' was not declared in this scope
    8 |     cin >> n>>m;
      |            ^
a.cc:8:15: error: 'm' was not declared in this scope; did you mean 'tm'?
    8 |     cin >> n>>m;
      |               ^
      |               tm
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |     sort(f,f+n);
      |     ^~~~
      |     short
Language: C++

#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
int main(){
    int n,m;cin>>n>>m;
    int A[n];
    int sum;
    string ans="Yes";
    for(int i=0;i<n;i++){
        cin>>A[i];
        sum+=A[i];
    }
    sort(A.begin(),A.end());
    reverse(A.begin(),A.end());
    for(int i=0;i<m;i++){
        if(A[i]<sum*m*4){
            ans="No";
            break;
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: request for member 'begin' in 'A', which is of non-class type 'int [n]'
   13 |     sort(A.begin(),A.end());
      |            ^~~~~
a.cc:13:22: error: request for member 'end' in 'A', which is of non-class type 'int [n]'
   13 |     sort(A.begin(),A.end());
      |                      ^~~
a.cc:14:15: error: request for member 'begin' in 'A', which is of non-class type 'int [n]'
   14 |     reverse(A.begin(),A.end());
      |               ^~~~~
a.cc:14:25: error: request for member 'end' in 'A', which is of non-class type 'int [n]'
   14 |     reverse(A.begin(),A.end());
      |                         ^~~
Language: C

#include<stdio.h>
 
int main(void){
  int N,M=0;
  int sum = 0;
  int dif = 0;

  scanf("%d",&N);
  scanf("%d",&M);

  int a[N];
  
  for(int i=0; i<N ; i++){
   scanf("%d",&a[i]);
   sum += a[i];
}

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


  dif = sum / 4 * M;

  if(a[M] >= dif){
    printf("Yes");
}
  else{
    printf("No");
}

return 0;
 
}

Compiler output:
main.c: In function 'main':
main.c:18:8: error: 'i' undeclared (first use in this function)
   18 |   for (i=0; i<N; ++i) {
      |        ^
main.c:18:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:10: error: 'j' undeclared (first use in this function)
   19 |     for (j=i+1; j<N; ++j) {
      |          ^
main.c:21:9: error: 'tmp' undeclared (first use in this function)
   21 |         tmp =  a[i];
      |         ^~~
Language: C++

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

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n,m;
	cin>>n>>m;
	int a[n+1],cnt=0,sum=0;
	
	for(int i=1; i<=n; i++)
	{
		cin>>a[i];
		sum+=a[i];
	}
	
	for(int i=1; i<=n; i++)
	{
		if(a[i]>seil(1.0*sum/(4*m)))
			cnt++;
	}
	
	if(cnt>=m)
		cout<<"Yes"<< endl;
	else
		cout<<"No"<< endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'seil' was not declared in this scope; did you mean 'ceil'?
   22 |                 if(a[i]>seil(1.0*sum/(4*m)))
      |                         ^~~~
      |                         ceil
Language: C++

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



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

    sort(A,A+N);

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


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: expected ';' before 'int'
   13 |   M_s=1/4*M
      |            ^
      |            ;
   14 |     int A[N];
      |     ~~~     
a.cc:16:14: error: 'A' was not declared in this scope
   16 |         cin>>A[i];
      |              ^
a.cc:19:10: error: 'A' was not declared in this scope
   19 |     sort(A,A+N);
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,m=0;
  cin>>n>>m;
  vector<int> vec(n);
  for(int i=0;i<n;i++){
    cin>>vec.at(i);
  }
  int sum;
  for(int i=0;i<n;i++){
    sum+=vec.at(i);
  }
  
  sort(vec.begin(), vec.end());
  reverse(vec.begin(), vec.end());
  
  if(sum%(4*m)==0{
    if(vec.at(m-1)>=sum/4/m){
      cout<<"Yes";
    }else{
      cout<<"No";
    }
  }else{
    if(vec.at(m-1)>=sum/4/m+1){
      cout<<"Yes";
    }else{
      cout<<"No";
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected ')' before '{' token
   19 |   if(sum%(4*m)==0{
      |     ~            ^
      |                  )
a.cc:32:1: error: expected primary-expression before '}' token
   32 | }
      | ^
Language: Java

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        ArrayList<Integer> intList = new ArrayList<Integer>();
        for (int x=0; x<=a; x++) {
          intList.add(sc.nextInt());
        }
        Collections.sort(intList);
        if(intList[b] > 4 * a) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:13: error: array required, but ArrayList<Integer> found
        if(intList[b] > 4 * a) {
                  ^
1 error
Language: C++

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

int main() {
  int n,m;
  cin >> n >> m;

  vector<int> a(n);
  rep(i,n) cin >> a[i];

  int amount = 0;
  rep(i,n) amount += a[i];

  int count = 0;
  int judge = amount / (m*4);
  rep(i,n) {
    if(judge =< a[i]) {
      count++;
    }
    }

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










}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: expected primary-expression before '<' token
   19 |     if(judge =< a[i]) {
      |               ^
Language: Java

import java.util.ArrayList;
import java.util.Scanner;

public class Main2 {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String num = scan.nextLine();
		String[] numbers = num.split(" ");
		double N = Integer.parseInt(numbers[0]);
		double M = Integer.parseInt(numbers[1]);


		String num2 = scan.nextLine();
		String[] numbers2 = num2.split(" ");
//		int A1 = Integer.parseInt(numbers[0]);
//		int A2 = Integer.parseInt(numbers[1]);
//		int A3 = Integer.parseInt(numbers[2]);
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i<N; i++) {
			list.add(Integer.parseInt(numbers2[i]));
		}
		int count = 0;
		double sum = 0;
		for(int i = 0; i<N; i++) {
			sum=sum+list.get(i);
		}
		for(int i = 0; i<N; i++) {
			if(list.get(i)<(sum)/(4*M)) {

			}else {
				count++;
			}
		}
		if(count>=M) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}

	}
}


Compiler output:
Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
       ^
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();
    ArrayList<Integer> A = new ArrayList<Integer>();
    int sum = 0;
    for (int i = 1; i < N  ; i++) {
      int x = sc.nextInt();
      A.add(x);
      sum = sum +　x;
    }
    Collections.sort(A);
    Collections.reverse(A);
    int y = sum / (4*M);

    for (int j = 0; j < M; j++) {
      // System.out.println(A.get(j)); 
      if(y <= A.get(j)){
      }else{
        System.out.println("No"); 
        return;
      }
    } 
    System.out.println("Yes"); 
    return;
  }
}



Compiler output:
Main.java:12: error: illegal character: '\u3000'
      sum = sum +?x;
                 ^
Main.java:12: error: not a statement
      sum = sum +?x;
                  ^
2 errors
Language: C++

// i/o example

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

int main () {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int m,n,a;
	int vote;
	int sum = 0;
	cin >> n >> m;
	for(int i = 0; i < n; i ++){
		cin >> a;
		sum+=a;
		if( i = m -1) vote = a; 
	}
	if (vote < (sum/(4*m)) cout << "No";
	else cout<< "Yes";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: expected ';' before 'cout'
   18 |         if (vote < (sum/(4*m)) cout << "No";
      |                               ^~~~~
      |                               ;
a.cc:19:9: error: expected primary-expression before 'else'
   19 |         else cout<< "Yes";
      |         ^~~~
a.cc:18:45: error: expected ')' before 'else'
   18 |         if (vote < (sum/(4*m)) cout << "No";
      |            ~                                ^
      |                                             )
   19 |         else cout<< "Yes";
      |         ~~~~
Language: Java

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        ArrayList<int> intList = new ArrayList<int>();
        for (int x=0; x<=a; x++) {
          intList.add(sc.nextInt());
        }
        Collections.sort(intList);
        if(intList[b] > 4 * a) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:8: error: unexpected type
        ArrayList<int> intList = new ArrayList<int>();
                  ^
  required: reference
  found:    int
Main.java:8: error: unexpected type
        ArrayList<int> intList = new ArrayList<int>();
                                               ^
  required: reference
  found:    int
Main.java:13: error: array required, but ArrayList<<any>> found
        if(intList[b] > 4 * a) {
                  ^
3 errors
Language: C++

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclde; did you mean #include?
    1 | #inclde<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n>>m;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclde<bits/stdc++.h>
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |   sort(a,a+n);
      |   ^~~~
      |   short
a.cc:23:5: error: 'cout' was not declared in this scope
   23 |     cout<<"Yes\n";
      |     ^~~~
a.cc:23:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:5: error: 'cout' was not declared in this scope
   25 |     cout<<"No\n";
      |     ^~~~
a.cc:25:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#include<vector>
#include<algorithm>
#include<string>
using ll=long long;
using P =pair<int,int>;


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


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

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

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

    int n, m;
    cin >> n >> m;

    int a[105];
    int total = 0;
    for(int i=1; i<=n; i++) cin >> a[i], total+=a[i];

    int x = 0;

    for(int i=1; i<=n; i++){
        if(4*m*a[i] => total){
            x++;
        }
    }
    if(x >= m){
        cout << "Yes\n";
    }
    else{
        cout << "No\n";
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:22: error: expected primary-expression before '>' token
   19 |         if(4*m*a[i] => total){
      |                      ^
Language: C++

#include <iostream>
#include <algorithm>
#include <numeric>
using namespace std;
int main()
{
    int n, m;
    cin>>n>>m;
    int arr[n];
    for(int i = 0; i < n; i++)
    {
        cin>>arr[i];
    }
    int s = 0;
    s = accumulate(arr, arr+n, s);
    //cout<<s<<endl;
    sort(arr, arr+n);
    reverse(arr, arr+n);
    //cout<<arr[m-1]<<endl;
    if(arr[m-1] >= ceil(s/(m*4)))
        cout<<"Yes";
    else
        cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: 'ceil' was not declared in this scope
   20 |     if(arr[m-1] >= ceil(s/(m*4)))
      |                    ^~~~
Language: C++

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

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'a' was not declared in this scope
   17 |   a = total/(4*n);
      |   ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'i' was not declared in this scope
   13 |     for(i=0;i<n;i++)
      |         ^
Language: C++

int main()
{   int n,m,c =0;
    cin>>n>>m;
    float z =1/(4*m);
    vector <int> s(n);
    for(int i =0;i<n;i++)
    cin>>s[i];
    for(int i =0;i<n;i++)
    {
        if(float(s[i])>z)
        c++;
        if(c==m)
        {cout<<"Yes";
        return 0;}
        
    }
    cout<<"No";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin>>n>>m;
      |     ^~~
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector <int> s(n);
      |     ^~~~~~
a.cc:5:13: error: expected primary-expression before 'int'
    5 |     vector <int> s(n);
      |             ^~~
a.cc:7:10: error: 's' was not declared in this scope
    7 |     cin>>s[i];
      |          ^
a.cc:10:18: error: 's' was not declared in this scope
   10 |         if(float(s[i])>z)
      |                  ^
a.cc:13:10: error: 'cout' was not declared in this scope
   13 |         {cout<<"Yes";
      |          ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout<<"No";
      |     ^~~~
Language: C++

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

int N, M;
vector<int> v(1000);

int main(int argc, char **argv)
{
	cin >> N >> M;
	for (int i = 0; i < N; ++i)
		cin >> v[i];

	int sum = accumulate(v.begin(), v.end(), 0);
	double limit = (1.0 / (4 * M)) * sum;
	
	vector<int> select(M);
	int count = 0;
	while (count != M)
	{
		int max = -1;
		int max_i = -1;
		for (int i = 0; i < N; ++i)
		{
			if (max < v[i])
			{
				max = v[i];
				max_i = i;
			}
		}
		if (max < limit) goto exit;
		else
		{
			select[count++] = max;
			v[max_i] = -1;
		}
	}

 exit:
	std::cout << ((count == M) ? "Yes" : "No")<< std::endl;
}
#include <bits/stdc++.h>
using namespace std;

int N, M;
vector<int> v(1000);

int main(int argc, char **argv)
{
	cin >> N >> M;
	for (int i = 0; i < N; ++i)
		cin >> v[i];

	int sum = accumulate(v.begin(), v.end(), 0);
	double limit = (1.0 / (4 * M)) * sum;
	
	vector<int> select(M);
	int count = 0;
	while (count != M)
	{
		int max = -1;
		int max_i = -1;
		for (int i = 0; i < N; ++i)
		{
			if (max < v[i])
			{
				max = v[i];
				max_i = i;
			}
		}
		if (max < limit) goto exit;
		else
		{
			select[count++] = max;
			v[max_i] = -1;
		}
	}

 exit:
	std::cout << ((count == M) ? "Yes" : "No")<< std::endl;
}


Compiler output:
a.cc:44:5: error: redefinition of 'int N'
   44 | int N, M;
      |     ^
a.cc:4:5: note: 'int N' previously declared here
    4 | int N, M;
      |     ^
a.cc:44:8: error: redefinition of 'int M'
   44 | int N, M;
      |        ^
a.cc:4:8: note: 'int M' previously declared here
    4 | int N, M;
      |        ^
a.cc:45:13: error: redefinition of 'std::vector<int> v'
   45 | vector<int> v(1000);
      |             ^
a.cc:5:13: note: 'std::vector<int> v' previously declared here
    5 | vector<int> v(1000);
      |             ^
a.cc:47:5: error: redefinition of 'int main(int, char**)'
   47 | int main(int argc, char **argv)
      |     ^~~~
a.cc:7:5: note: 'int main(int, char**)' previously defined here
    7 | int main(int argc, char **argv)
      |     ^~~~
Language: C++

include <iostream>
using namespace std;

int main(){
  int n, m;
  cin >> n >> m;
  int 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:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n >> m;
      |   ^~~
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:19:22: error: 'endl' was not declared in this scope
   19 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout << "No" << endl;
      |     ^~~~
a.cc:21:21: error: 'endl' was not declared in this scope
   21 |     cout << "No" << endl;
      |                     ^~~~
Language: C++

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

int main(){
  int n, m;
  cin >> n >> m;
  int a[101];
  int total=0;
  for(int i=0;i<n;++i) cin >> a[i], total += a[i];
  sort(a.begin(), a.end());
  
  int count=0;
  for(int i=0;i<M;++i){
    if(a[i] > 1/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:10: error: request for member 'begin' in 'a', which is of non-class type 'int [101]'
   10 |   sort(a.begin(), a.end());
      |          ^~~~~
a.cc:10:21: error: request for member 'end' in 'a', which is of non-class type 'int [101]'
   10 |   sort(a.begin(), a.end());
      |                     ^~~
a.cc:13:17: error: 'M' was not declared in this scope
   13 |   for(int i=0;i<M;++i){
      |                 ^
Language: C++

#include<iostream>

using namespace std;

int main()
{
	int m,n,a[1005],i,tot=0,grt=0,tt;
	cin>>n>>m;
	for(i=1;i<=n;i++)
	{
		cin>>a[i];
		tot+=a[i];
	}
	tt = tot/(4*m);
	if(tot%(4*m))	tt+=1;
	for(i=1;i<=n;i++)
	{
		if(a[i] >= tt)		grt++;
	}
	if
	if(grt>=m)	cout<<"Yes"<<endl;
	else		cout<<"No"<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: expected '(' before 'if'
   21 |         if(grt>=m)      cout<<"Yes"<<endl;
      |         ^~
      |         (
a.cc:22:9: error: 'else' without a previous 'if'
   22 |         else            cout<<"No"<<endl;
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  double num1=0,num2=0,ans=0,sum=0;
  double= Threshold
  cin>>num1>>num2;
  double A[num1];  
  for(int i=0;i<num1;i++){
    double tmp;
    cin>>tmp;
    A[i]=tmp;
    sum+=tmp;
  }
  for(int i=0;i<num1;i++){
    if(A[i]>=sum/(4*num2)){
      ans++;
    }
  }
  if(ans>=num2){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before '=' token
    5 |   double= Threshold
      |         ^
a.cc:7:12: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    7 |   double A[num1];
      |            ^~~~
a.cc:7:12: error: could not convert 'num1' from 'double' to 'long unsigned int'
    7 |   double A[num1];
      |            ^~~~
      |            |
      |            double
a.cc:7:12: error: size of array 'A' has non-integral type 'double'
Language: C++

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

int main(){
    int N,M;
    cin >> N >> M;
    int A[N];

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

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

    int tol = 0;

    for(int i=0; i<N; i++){
        tol = tol + A[i];
    }

    int v = 0;

    for(int i=0; i<M; i++){
        if(A[i] < (1/(4*M))){
            v = V+1;
        }
    }

    if(v == 0){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:17: error: 'V' was not declared in this scope
   33 |             v = V+1;
      |                 ^