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

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

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

//BISMILLAH
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m,total=0,countt=0;
    cin>>n>>m;
    int arr[n];
    float result=0.0,flag=0;

    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
        total+=arr[i];
    }
    //cout<<total<<endl;
    result=(float) ((float)total/((float)4*(float)m));
    //cout<<result<<endl;

    for(int i=0;i<n;i++)
    {
        if(arr[i]=>result)
            countt++;
    }

    if(countt>m)
        cout<< "Yes"<<endl;
    else
        cout<< "No"<<endl;

    return 0;
}

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

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

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

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

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

#include"bits/stdc++.h"
#include<boost/multi_array.hpp>
#include<boost/optional.hpp>
#include<boost/range/irange.hpp>
#include<boost/range/algorithm.hpp>
#include<boost/range/adaptors.hpp>
using namespace std;
namespace adaptor = boost::adaptors;
 
void Main()
{
	int N;
    int M;
  
  	cin >> N;
    cin >> M;
  
    int A[N];
    int B[N];
    int max;
    int S = 0;
  
    int count = 0;
  
    for(int i = 0; i < N; i++){
      cin >> A[i];
      S += A[i]
    }
 
  for(int k = 0; k < M; k++){
    max = 0;
    for(int i = 0; i < N; i++){
      
      if(max < A[i] && k == 0)
        max = A[i];
      
      if(k != 0){
        if(max < A[i] && A[i] < B[k - 1])
          max = A[i];
      }
    }
    B[k] = max;
  }
      
  
    for(int i = 0; i < M; i++){
      if(B[i] >= (S / (4 * M))){
        count++;
      }
    }
  
  if(count == M)
    printf("Yes");
  
  else
    printf("No");
  
	
	
}
 
int main()
{
	std::cin.tie(nullptr);
	std::ios_base::sync_with_stdio(false);
	std::cout << std::fixed << std::setprecision(15);
	Main();
}

Compiler output:
a.cc:2:9: fatal error: boost/multi_array.hpp: No such file or directory
    2 | #include<boost/multi_array.hpp>
      |         ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int main(){

  int N , M , M_max = 0; /*商品数N、人気商品数M、選べる人気商品数の最大M_max*/
  int A[101]; /*得票数*/
  int sum =0; /*総得票数*/
  
  
  
  scanf("%d %d",&N,&M);
  
  for(int i=0 ;i < N ; i++){
    scanf("%d",&A[i]);
    sum = sum +A[i]; /*総得票数を計算する*/
  }
  
  if(M = ){
  　/*何もしない*/
  }else{
   for(int i=0 ;i < N ; i++){
     if(A[i]<=( sum/(4*M))){
       /*何もしない*/
     }else{
       M_max ++;
     }
   }
  }
  
  if(M <= M_max){
    printf("Yes");
  }else{
    printf("No");
  }
  
  return 0;
  
  }

Compiler output:
main.c: In function 'main':
main.c:18:10: error: expected expression before ')' token
   18 |   if(M = ){
      |          ^
main.c:19:3: error: stray '\343' in program
   19 |   <U+3000>/*<U+4F55><U+3082><U+3057><U+306A><U+3044>*/
      |   ^~~~~~~~
main.c:21:17: error: 'i' undeclared (first use in this function)
   21 |    for(int i=0 ;i < N ; i++){
      |                 ^
main.c:21:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
    int N, M, total = 0;
    int a[10001];
    bool flag = false;

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

    int Res = total / (4 * M);

   /* 数値を降順にソート */
  for (int i = 0; i < N;i++) {
    for (int j = i + 1; j < N; j++) {
      if (a[i] < a[j]) {
        int tmp =  a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  

  for(int i = 0; i < M; i++){
      if(a[i] < Res){
          flag = true;
  }
  }
  if(flag == true) {
      cout << "No" << endl;
  } else if(flag == false) {
      cout << "Yes" << endl;
  }#include<bits/stdc++.h>
using namespace std;

int main(){
    int N, M, total = 0;
    int a[10001];
    bool flag = false;

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

    int Res = total / (4 * M);

   /* 数値を降順にソート */
  for (int i = 0; i < N;i++) {
    for (int j = i + 1; j < N; j++) {
      if (a[i] < a[j]) {
        int tmp =  a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  

  for(int i = 0; i < M; i++){
      if(a[i] < Res){
          flag = true;
  }
  }
  if(flag) cout << "No" << endl;
  else cout << "Yes" << endl;

}
}

Compiler output:
a.cc:38:4: error: stray '#' in program
   38 |   }#include<bits/stdc++.h>
      |    ^
a.cc: In function 'int main()':
a.cc:38:5: error: 'include' was not declared in this scope
   38 |   }#include<bits/stdc++.h>
      |     ^~~~~~~
a.cc:38:13: error: 'bits' was not declared in this scope
   38 |   }#include<bits/stdc++.h>
      |             ^~~~
a.cc:38:18: error: 'stdc' was not declared in this scope; did you mean 'std'?
   38 |   }#include<bits/stdc++.h>
      |                  ^~~~
      |                  std
a.cc:39:1: error: expected primary-expression before 'using'
   39 | using namespace std;
      | ^~~~~
a.cc:41:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   41 | int main(){
      |         ^~
a.cc:41:9: note: remove parentheses to default-initialize a variable
   41 | int main(){
      |         ^~
      |         --
a.cc:41:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:41:11: error: a function-definition is not allowed here before '{' token
   41 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
#define llu unsigned long long
#define ll long long
#define INF 0x3f3f3f3f
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl "\n"

using namespace std;

int main()
{
	fast
	int n,m;
	cin>>n>>m;
	int total=0, arr[n], cnt=0;
	for(int i=0; i<n; i++)
	{
		cin>>arr[i];
		total+=arr[i];
	}
	sort(arr,arr+n);
	//int k=ceil(total/(4*m));
	if(total%(4*m)==0)
	{
		k=total/(4*m);
		if(arr[n-m-1]>=k)
			cout<<"Yes";
		else
			cout<<"No";	
	}
	else
	{
		k=total/(4*m);
		if(arr[n-m-1]>k)
			cout<<"Yes";
		else
			cout<<"No";	
	}
}

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

n,m = map(int,input().split())
a = list(map(int, input().split()))
popular = list(filter(lambda e: e>=(1/(4*m))*sum(a),a))
print("Yes" if len(popular) >= m else "No")

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

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

int main(){
  int n,m;
  cin >> n >> m;
  int sum =0;
  int count =0;
  
  vector<int> a(n);
  for(int i=0; i<n; i++){
    cin >> a[i];
    sum+=a[i];
  }
  long long double q = sum/(4*m);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: 'long long' specified with 'double'
   15 |   long long double q = sum/(4*m);
      |        ^~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Qb 
{
	public static void main(String[] Arguments) throws IOException 
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST = new StringTokenizer(BR.readLine());
		int cSum = 0, N = Integer.parseInt(ST.nextToken()), M = Integer.parseInt(ST.nextToken()), Count = 0, itemVotes[] = new int[N];
		double Result = 0.00, Barrier = (double)1 / (double)100001;
		ST = new StringTokenizer(BR.readLine());
		for (int i = 0; i < N; i++)
		{
			itemVotes[i] = Integer.parseInt(ST.nextToken());
			cSum += itemVotes[i];
		}
		Result = (double)1 / (double)(4 * M);
		Result *= (double)cSum;
		for (int i = 0; i < N; i++)
		{
			if (itemVotes[i] - Result - Barrier >= 0)
			{
				Count++;
			}
		}
		System.out.println((Count >= M) ? "Yes" : "No");
	}
}


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

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

int main(){
  int n, m;
  cin >> n >> m;
  vector<int> a;
  int total=0;
  for(int i=0;i<n;++i){
    int x;
    cin >> x;
    a.push_back(x);
    total += x;
  }
  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))
    else count++;
  }
  if(count == m) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: expected primary-expression before 'else'
   21 |     else count++;
      |     ^~~~
Language: Java

import java.util.Scanner;

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

      int count=0;
      
      for(int i=0;i<n;i++){
        c[i] = scan.nextInt();
        count += c[i];
      }
      
      int judge=0;
      for(int i=0;i<n;i++){
        if(c[i]<count/4/m)
        else{
          judge += 1;
        }
      
      }
      
      if(judge>=m){
        System.out.println("Yes");
      }
      else{
        System.out.println("No");
      }
      
      }

  }


Compiler output:
Main.java:21: error: 'else' without 'if'
        else{
        ^
1 error
Language: C++

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

int main(){
        int n, m, a;
        vector<int> v;
        string ans = "Yes" ;

        cin >> n >> m;
        int t = 0;
        for (int i = 0; i < n; ++i){
                cin >> a;
                t += a ;
                v.push_back(a);
        }
        sort(v.begin(), v.end());
        if(v[n-m] < t/(4*m)){
                ans = "No";
        }
        cout << ans << endl;
		}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |         sort(v.begin(), v.end());
      |         ^~~~
      |         short
Language: C++

#include<iostream>
using namespace std;

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

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

#include <stdio.h>

int main()
{
	int N = 0;
    int M = 0;
	scanf("%d %d", &N, &M);
    
    int A[N] = {0};
    int sum = 0;
    int i = 0;
    for(i = 0; i < N; i++){
        scanf("%d ", &A[i]);
        sum += A[i];
    }
    
    int count = 0;
	for(i = 0; i < N; i++){
        if((double)A[i] >= ((double)sum / (4. * (double)M))){
            count++;
        }
    }

    if(count >= M){
        printf("Yes\n");
    }else{
        printf("No\n");
    }

    //Debug
    /*
    printf("N : %d\n",N);
    printf("M : %d\n",M);
    printf("sum : %d\n",sum);
    printf("count : %d\n",count);
    printf("1/4M : %lf\n",((double)sum / (4. * (double)M)));
    printf("A : ");
    for(i = 0; i < N; i++){
        printf("%d ", A[i]);
    }
    */

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:16: error: variable-sized object may not be initialized except with an empty initializer
    9 |     int A[N] = {0};
      |                ^
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();
      while(i=0){
      int a[i-1] = scn.nextInt();
      int sum = 0;
      int sum =  sum+a[i-1];
      i += 1;
      }
      scn.close();
    int k = 4*M;
    if(a[i-1] < sum/k){
    	System.out.println("No");
    }else{
    	System.out.println("Yes");
    }
    }
}


Compiler output:
Main.java:8: error: ']' expected
      int a[i-1] = scn.nextInt();
            ^
Main.java:8: error: not a statement
      int a[i-1] = scn.nextInt();
             ^
Main.java:8: error: ';' expected
      int a[i-1] = scn.nextInt();
               ^
3 errors
Language: C++

package main

import (
	"fmt"
	"sort"
)

func sum(xs []int) int {
	var s int
	for _, x := range xs {
		s += x
	}
	return s
}

func main() {
	var n, m int
	fmt.Scan(&n)
	fmt.Scan(&m)
	var a = make([]int, n)
	var t int
	for i := 0; i < n; i++ {
		fmt.Scan(&t)
		a[i] = t
	}
	s := sum(a)
	sort.Ints(a)
	for i := 0; i < m; i++ {
		if a[n-i-1] < s/(4*m) {
			fmt.Println("No")
			return
		}
	}
	fmt.Println("Yes")
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:16:1: error: 'func' does not name a type
   16 | func main() {
      | ^~~~
Language: C++

#include<cstdio>
int main()
{
	double n,m,sum=0,ans=0;
	scanf("%lf%lf",&n,&m);
	int a[n];
	for(int i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		sum=sum+a[i];
	}
	sum=sum/(m*4);
	for(int i=0;i<n;i++)
	{
		if(a[i]>=sum)
		ans++;
	}
	if(ans>=m)
	printf("Yes\n");
	else
	printf("No\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    6 |         int a[n];
      |               ^
a.cc:6:15: error: could not convert 'n' from 'double' to 'long unsigned int'
    6 |         int a[n];
      |               ^
      |               |
      |               double
a.cc:6:15: error: size of array 'a' has non-integral type 'double'
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();
      while(i=0){
      int a[i] = scn.nextInt();
      int sum = 0;
      int sum =  sum+a[i];
      i += 1;
      }
      scn.close();
    int k = 4*M;
    if(a[i] < sum/k){
    	System.out.println("No");
    }else{
    	System.out.println("Yes");
    }
    }
}


Compiler output:
Main.java:8: error: ']' expected
      int a[i] = scn.nextInt();
            ^
Main.java:8: error: ';' expected
      int a[i] = scn.nextInt();
             ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n
  double m;
  cin>>n>>m;
  int a[n];
  int cnt=0;
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
    cnt+=a[i];
  }
  double k=(double)cnt/(4.0*m);
  int tmp=0;
  for(int j=0;j<n;j++)
  {
    if(a[i]>=k)
    {
      tmp++;
    }
  }
  if(tmp>=m)
  {
    cout<<"Yes";
    return 0;
  }
  cout<<"No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'double'
    6 |   double m;
      |   ^~~~~~
a.cc:7:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   cin>>n>>m;
      |        ^
      |        yn
a.cc:7:11: error: 'm' was not declared in this scope; did you mean 'tm'?
    7 |   cin>>n>>m;
      |           ^
      |           tm
a.cc:12:10: error: 'a' was not declared in this scope
   12 |     cin>>a[i];
      |          ^
a.cc:19:8: error: 'a' was not declared in this scope
   19 |     if(a[i]>=k)
      |        ^
a.cc:19:10: error: 'i' was not declared in this scope
   19 |     if(a[i]>=k)
      |          ^
Language: Java


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(new Integer(sc.nextInt()));
        }
        // Collections.sort(intList);
        // if (intList.get(b) < 4 * a) {
        //     System.out.println("Yes");
        // } else {
        //     System.out.println("No");
        // }
        System.out.println("No");
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
        ArrayList<Integer> intList = new ArrayList<Integer>();
        ^
  symbol:   class ArrayList
  location: class Main
Main.java:7: error: cannot find symbol
        ArrayList<Integer> intList = new ArrayList<Integer>();
                                         ^
  symbol:   class ArrayList
  location: class Main
4 errors
Language: C++

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

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

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

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

int main() {
  int N, M, l=0, k=0;
  cin >> N >> M;
  vector<int> item(N);
  for(int i=0; i < N; i++){
    cin >> item.at(i);
    k += item.at(i)
  }
  for(int j=0; j < N;j++){
    if(item.at(j) > k/(4*M)){
      l += 1;
    }
  }
  if(l >= M){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ';' before '}' token
   10 |     k += item.at(i)
      |                    ^
      |                    ;
   11 |   }
      |   ~
Language: C++

#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include <cmath>
//#include <bits/stdc++.h>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   17 |     sort(A,A+N);
      |     ^~~~
      |     sqrt
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();
      while(i=0){
      int a[i] = scn.nextInt();
      int sum = 0;
      int sum =  sum+a[i];
      i += 1;
      }
      scn.close();
    if(a[]<sum/4*M){
    	System.out.println("No");
    }else{
    	System.out.println("Yes");
    }
    }
}


Compiler output:
Main.java:8: error: ']' expected
      int a[i] = scn.nextInt();
            ^
Main.java:8: error: ';' expected
      int a[i] = scn.nextInt();
             ^
Main.java:14: error: '.class' expected
    if(a[]<sum/4*M){
          ^
3 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,m;
  cin>>n>>m;
  int a[n];
  int cnt=0;
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
    cnt+=a[i];
  }
  double k=(double)cnt/(4.0*(double)m);
  int tmp=0;
  for(int j=0;j<n;j++)
  {
    if(a[i]>=k)
    {
      tmp++;
    }
  }
  if(tmp>=i)
  {
    cout<<"Yes";
    return 0;
  }
  cout<<"No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: 'i' was not declared in this scope
   18 |     if(a[i]>=k)
      |          ^
a.cc:23:11: error: 'i' was not declared in this scope
   23 |   if(tmp>=i)
      |           ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;

int main() {
	
	double t n, m, x, y, z, i;
	long long int a[100];
	cin >> n >> m;
	x = 0;
	z = 0;
	for(i = 0; i < n; i++) {
		cin >> a[i];
		x = a[i] + x;
	}
	y = x / 4;
	y = y / m;
	for(i = 0; i < n; i++) {
		if(y <= a[i]) {
			z = 1 + z;
		}
	}
	if(m <= z) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected initializer before 'n'
    8 |         double t n, m, x, y, z, i;
      |                  ^
a.cc:10:16: error: 'n' was not declared in this scope
   10 |         cin >> n >> m;
      |                ^
a.cc:10:21: error: 'm' was not declared in this scope
   10 |         cin >> n >> m;
      |                     ^
a.cc:11:9: error: 'x' was not declared in this scope
   11 |         x = 0;
      |         ^
a.cc:12:9: error: 'z' was not declared in this scope
   12 |         z = 0;
      |         ^
a.cc:13:13: error: 'i' was not declared in this scope
   13 |         for(i = 0; i < n; i++) {
      |             ^
a.cc:17:9: error: 'y' was not declared in this scope
   17 |         y = x / 4;
      |         ^
a.cc:19:13: error: 'i' was not declared in this scope
   19 |         for(i = 0; i < n; i++) {
      |             ^
Language: C++

#include <iostream>

using namespace std;

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

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

    double kijun = total_vote / ((double)M * 4.0);
     
    double count_ninki;
    for (i = 0; i < N; i++) {
        if (A[i] >= kijun) count_ninki++;
    }

    if (count_ninki >= M) cout << "Yes";
    else cout << "No";

    return 0;
}

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | double main()
      | ^~~~~~
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>();
        instList.add(new Integer(sc.nextInt()));
        // for (int x = 0; x <= a; x++) {
        //     intList.add(sc.nextInt());
        // }
        // Collections.sort(intList);
        // if (intList.get(b) < 4 * a) {
        //     System.out.println("Yes");
        // } else {
        //     System.out.println("No");
        // }
        System.out.println("No");
    }
}

Compiler output:
Main.java:9: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
        instList.add(new Integer(sc.nextInt()));
                     ^
Main.java:9: error: cannot find symbol
        instList.add(new Integer(sc.nextInt()));
        ^
  symbol:   variable instList
  location: class Main
1 error
1 warning
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++)
	count--;
	cout<<1001;
	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:14: error: no post-decrement operator for type
    8 |         count--;
      |              ^~
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <string>
#include <list>

#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))

using namespace std;

int main(void) {

    int  n, sum ;
    double m , btP, bt , sum;

    cin >> n;
    cin >> m;

    vector <int> num(n ,0);

    sum = 0;
    btP =  1 / ( 4 * m) ;

    for (int i = 0; i < n; i++)
    {
        
        cin >> num[i];
        
        sum += num[i];
    }

    bt = btP * sum;

    std::sort(num.begin(), num.end(), std::greater<>());

    int cnt = 0;

    for (int i = 0; i < m; i++ ) {

        if (num[i] > bt) {
            cnt++;
        }
    }

    
    if (cnt == m) {
        cout << "Yes";
    }
    else {
        cout << "No";
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: conflicting declaration 'double sum'
   14 |     double m , btP, bt , sum;
      |                          ^~~
a.cc:13:13: note: previous declaration as 'int sum'
   13 |     int  n, sum ;
      |             ^~~
Language: C++

#include<stdio.h>
int main()
{
  int N,M;
  scanf("%d%d",N,M);
  int i,wa,A[N];
  wa=0;
  for(i=0;i<N;i++){
  scanf("%d",A[i]);
  wa=wa+A[i];}
  double hyou;
  hyou=wa/4/M;
  int M0;
  M0=0;
  for(t=0;t<N;t++){
  if(A[t]<hyou){
    M0=M0+1;
    if(M==M0){
      printf("yes");
    }
    else{
      printf("No");
    }
  }
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 't' was not declared in this scope
   15 |   for(t=0;t<N;t++){
      |       ^
Language: C++

#include <iostream>
using namespace std;

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:30:25: error: expected ';' before '}' token
   30 |             cout << "No"
      |                         ^
      |                         ;
   31 |         }
      |         ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> n >> m;
      |   ^~~
a.cc:13:3: error: 'b' was not declared in this scope
   13 |   b = cnt / (4.0 * m);
      |   ^
Language: C++

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

int main(){
    int n,m;
    int c=0;
    int s=0;
    cin>>n>>m;

    vector<int> a(n);

    rep(i,n){
        cin>>a.at(i);
        s=s+a.at(i);
    }

    int t=s/(4*m);

rep(i,n){
    if(a.at(i)>=t){
        c++;
    }
}

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


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

#include <bits/stdc++.h>
#include <string>
#include <stdio.h>

using namespace std;

int main() {
int n, m = 0;
int a[1000];
int cnt = 0;
int sou = 0;
cin >> n >> m ;
for (int i =0; i < n; i++){
    cin >> a[i];
    sou = sou + a[i];
}
for (int i = 0; i < n; i++){
    if ((a[i] * 4 * m) >= sou)){
        cnt = cnt + 1;
    }
}
if (cnt >= m){
    cout << "Yes" << endl;
}
else{
    cout << "No" << endl;
}
}



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

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

int main()
{
    int n,m;
  	char *str1;
  	char *str2;
    int c=0,i=0,all=0;
  
  scanf("%d %d",&n,&m);
  
    vector<int> vec(n);
  	for (int i = 0; i < n; i++) {
    	cin >> vec.at(i);
      	all+=vec.at(i);
  	}
  
    while(i<=100)
    {
        if(n*4/all<=vec.at(i))
        c+=1;
    }
    if(c>=m)
    printf("Yes");
  	else
    printf("No")
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:17: error: expected ';' before 'return'
   28 |     printf("No")
      |                 ^
      |                 ;
   29 |     return 0;
      |     ~~~~~~
Language: C

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

Compiler output:
main.c:32:5: error: redefinition of 'main'
   32 | int main()
      |     ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int()'
    2 | int main()
      |     ^~~~
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>();
        instList.add(sc.nextInt());
        // for (int x = 0; x <= a; x++) {
        //     intList.add(sc.nextInt());
        // }
        // Collections.sort(intList);
        // if (intList.get(b) < 4 * a) {
        //     System.out.println("Yes");
        // } else {
        //     System.out.println("No");
        // }
        System.out.println("No");
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        instList.add(sc.nextInt());
        ^
  symbol:   variable instList
  location: class Main
1 error
Language: C++

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



Compiler output:
a.cc:14:5: error: redefinition of 'int main()'
   14 | int main() {
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(void) {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:16:10: error: 'N' was not declared in this scope
   16 |   cin >> N >> M;
      |          ^
a.cc:16:15: error: 'M' was not declared in this scope
   16 |   cin >> N >> M;
      |               ^
a.cc:28:21: error: 'p' was not declared in this scope
   28 |     if(A.at(i)/sum>=p/q) {
      |                     ^
a.cc:28:23: error: 'q' was not declared in this scope
   28 |     if(A.at(i)/sum>=p/q) {
      |                       ^
Language: C++

#include<stdio.h>
int main()
{
  int N,M;
  scanf("%d%d",N,M);
  int i,wa,A[i];
  wa=0;
  for(i=0;i<N;i++){
  scanf("%d",A[i]);
  wa=wa+A[i];}
  double hyou;
  hyou=wa/4/M;
  int M0;
  M0=0;
  for(t=0;t<N;t++){
  if(A[t]<hyou){
    M0=M0+1;
    if(M==M0){
      printf("yes");
    }
    else{
      printf("No");
    }
  }
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 't' was not declared in this scope
   15 |   for(t=0;t<N;t++){
      |       ^
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 = 0;
      int sum =  sum+a[].class;
      scn.close();
    if(a[].class<sum/4*M){
    	System.out.println("No");
    }else{
    	System.out.println("Yes");
    }
    }
}


Compiler output:
Main.java:1: error: cannot find symbol
import util.java.Scanner;
                ^
  symbol:   class Scanner
  location: package util.java
Main.java:4: error: cannot find symbol
    Scanner scn = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner scn = new Scanner(System.in);
                      ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: variable sum is already defined in method main(String[])
      int sum =  sum+a[].class;
          ^
Main.java:9: error: cannot find symbol
      int sum =  sum+a[].class;
                     ^
  symbol:   class a
  location: class Main
Main.java:11: error: cannot find symbol
    if(a[].class<sum/4*M){
       ^
  symbol:   class a
  location: class Main
6 errors
Language: C

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

Compiler output:
main.c:32:5: error: redefinition of 'main'
   32 | int main()
      |     ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int()'
    2 | int main()
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int array_sum_from_i(vector<int> &data, int i) {
  // ベースケース
  if (i == data.size()) {
    return 0;  // 対象の要素がないので総和は0
  }
  // 再帰ステップ
  int s = array_sum_from_i(data, i + 1);  // i+1番目以降の要素の総和
  return data.at(i) + s;  // 「i番目以降の要素の総和」=「i番目の要素」+ s
}
 
// dataの全ての要素の総和を計算する
int array_sum(vector<int> &data) {
  return array_sum_from_i(data, 0);
}
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());
  reverse(a.begin(), a.end());
  if (array_sum(a)%(4*m)=0){
  if (a.at(m-1)>=array_sum(a)/(4*m)){
    cout<<"Yes"<<endl;
  }
    else {
      cout<<"No"<<endl;
    }
  }
      else {
  if (a.at(m-1)>=array_sum(a)/(1+4*m)){
    cout<<"Yes"<<endl;
  }
    else {
      cout<<"No"<<endl;
    }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: lvalue required as left operand of assignment
   26 |   if (array_sum(a)%(4*m)=0){
      |       ~~~~~~~~~~~~^~~~~~
Language: C++

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

int main()
{
    int b, m;
    cin >> n >> m;
    int a[n];
    int sum = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        sum += a[i];
    }
    int c = 0;
    for (int i = 0; i < n; i++) {
        if (a[i] > (sum - 1) / (4 * m))
            c++;
    }
    if (c >= m) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'n' was not declared in this scope
    8 |     cin >> n >> m;
      |            ^
a.cc:12:16: error: 'a' was not declared in this scope
   12 |         cin >> a[i];
      |                ^
a.cc:17:13: error: 'a' was not declared in this scope
   17 |         if (a[i] > (sum - 1) / (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++)
	count--;
	cout<<10010111110100010001010001;
	return 0;
}

Compiler output:
a.cc:9:15: warning: integer constant is too large for its type
    9 |         cout<<10010111110100010001010001;
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
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:14: error: no post-decrement operator for type
    8 |         count--;
      |              ^~
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 = 0;
      int sum =  sum+a[];
      scn.close();
    if(a[]<sum/4*M){
    	System.out.println("No");
    }else{
    	System.out.println("Yes");
    }
    }
}


Compiler output:
Main.java:9: error: '.class' expected
      int sum =  sum+a[];
                        ^
Main.java:11: error: '.class' expected
    if(a[]<sum/4*M){
          ^
2 errors
Language: C++

#include<stdio.h>
int main()
{
  int N,M;
  scanf("%d%d",N,M);
  int i,wa;
  wa=0;
  for(i=0;i<N;i++){
  scanf("%d",A[i]);
  wa=wa+A[i];}
  double hyou;
  hyou=wa/4/M;
  int M0;
  M0=0;
  for(t=0;t<N;t++){
  if(A[t]<hyou){
    M0=M0+1;
    if(M==M0){
      printf("yes");
    }
    else{
      printf("No");
    }
  }
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'A' was not declared in this scope
    9 |   scanf("%d",A[i]);
      |              ^
a.cc:15:7: error: 't' was not declared in this scope
   15 |   for(t=0;t<N;t++){
      |       ^
a.cc:16:6: error: 'A' was not declared in this scope
   16 |   if(A[t]<hyou){
      |      ^
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#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;
  }
}

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

    
    


Compiler output:
a.cc:14:23: error: stray '#' in program
   14 |   if (sum)-sum*(4*b)<0#include<bits/stdc++.h>
      |                       ^
a.cc: In function 'int main()':
a.cc:14:23: error: expected ';' before 'include'
   14 |   if (sum)-sum*(4*b)<0#include<bits/stdc++.h>
      |                       ^~~~~~~~
      |                       ;
a.cc:16:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   16 | int main(){
      |         ^~
a.cc:16:9: note: remove parentheses to default-initialize a variable
   16 | int main(){
      |         ^~
      |         --
a.cc:16:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:16:11: error: a function-definition is not allowed here before '{' token
   16 | int main(){
      |           ^
a.cc:37:2: error: expected primary-expression before ')' token
   37 | ;){
      |  ^
a.cc:40:3: error: 'else' without a previous 'if'
   40 |   else{
      |   ^~~~
Language: C++

#include <bits/stdc++>
using namespace std;
#define int long long
signed main() {
  int n, m, sum = 0;
  cin>>n>>m;
  int a[n];
  int c = 0, val;
  for(int i = 0; i < n; i++) {
    cin>>a[i];
    sum += a[i];
  }
  
  int t = sum/(4*m);
  if(floor(t) == ceil(t))	val = t;
  else	val = t+1;
  
  for(int i = 0; i < n; i++)
    if(a[i] >= val)
        c++;
 
  if(m <= c)	cout<<"Yes\n";
  else	cout<<"No\n";
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc++: No such file or directory
    1 | #include <bits/stdc++>
      |          ^~~~~~~~~~~~~
compilation terminated.
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 = 0;
      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:9: error: '.class' expected
      int sum =  sum+a[];
                        ^
Main.java:11: 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 += vec.at(i)
  }
  
  
  int cnt = 0;
  for (int i = 0; i < N; i++) {
    if ( vec.at(i) / sum >= 1 / 4*M ) {
      cnt ++;
    }
   
  if (cnt >= M) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected ';' before '}' token
   16 |     sum += vec.at(i)
      |                     ^
      |                     ;
   17 |   }
      |   ~                  
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<stdio.h>

int main(){

  int N , M , M_max = 0; /*商品数N、人気商品数M、選べる人気商品数の最大M_max*/
  int A[99]; /*得票数*/
  int sum =0; /*総得票数*/
  
  
  
  scanf("%d %d",&N,&M);
  
  for(int i=0 ;i < N ; i++){
    scanf("%d",&A[i]);
    sum = sum +A[i]; /*総得票数を計算する*/
  }
  
   for(int i=0 ;i < N ; i++){
     if(A[i]=>( sum/(4*M))){
       M_max ++;
     }else{
       /*何もしない*/
     }
   }
  
  if(M <= M_max){
    printf("Yes");
  }else{
    printf("No");
  }
  
  return 0;
  
  }

Compiler output:
main.c: In function 'main':
main.c:19:14: error: expected expression before '>' token
   19 |      if(A[i]=>( sum/(4*M))){
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[120],b,c,sum1=0,sum2=0;
bool cmp(int x,int y)
{
  return x>y;
}
int main()
{
  scanf("%d %d",&b,&c);
  for(int i=1;i<=b;i++)
    scanf("%d",&a[i]),sum1+=a[i];
  sum2=sum/c;
  sort(a+1,a+b+1,cmp);
  if(a[c]*c*4>=sum2)printf("Yes\n");
  else printf("No\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'sum' was not declared in this scope; did you mean 'sum2'?
   13 |   sum2=sum/c;
      |        ^~~
      |        sum2
Language: C++

int main() {
  int N,M;
  cin >> N >> M;
  vector<int>vec(N);
  long int sum = 0;
  for(int i=0;i<N;i++){
    cin >> vec.at(i);
    sum += vec.at(i);
  }

  int count = 0;
  for(int i=0;i<N;i++){
    if(vec.at(i)>=sum/(4*M)){
      count++;
    }
  }
  if(count>=M) cout << "Yes" << endl;
  else cout << "No" << endl;
  
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> N >> M;
      |   ^~~
a.cc:4:3: error: 'vector' was not declared in this scope
    4 |   vector<int>vec(N);
      |   ^~~~~~
a.cc:4:10: error: expected primary-expression before 'int'
    4 |   vector<int>vec(N);
      |          ^~~
a.cc:7:12: error: 'vec' was not declared in this scope
    7 |     cin >> vec.at(i);
      |            ^~~
a.cc:13:8: error: 'vec' was not declared in this scope
   13 |     if(vec.at(i)>=sum/(4*M)){
      |        ^~~
a.cc:17:16: error: 'cout' was not declared in this scope; did you mean 'count'?
   17 |   if(count>=M) cout << "Yes" << endl;
      |                ^~~~
      |                count
a.cc:17:33: error: 'endl' was not declared in this scope
   17 |   if(count>=M) cout << "Yes" << endl;
      |                                 ^~~~
a.cc:18:8: error: 'cout' was not declared in this scope; did you mean 'count'?
   18 |   else cout << "No" << endl;
      |        ^~~~
      |        count
a.cc:18:24: error: 'endl' was not declared in this scope
   18 |   else cout << "No" << endl;
      |                        ^~~~
Language: C

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int M,N;
	int A[101];
	int sum=0;
    scanf("%d%d",&M,&N);
    for(int i=0;i<M;i++){
    	if(scanf("%d",&A[i])==1)
    	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:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
int main(){
  int N,M,count;
  int SUM-0;
  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:4:10: error: expected initializer before '-' token
    4 |   int SUM-0;
      |          ^
a.cc:12:5: error: 'SUM' was not declared in this scope
   12 |     SUM+=array[i];
      |     ^~~
a.cc:15:24: error: 'SUM' was not declared in this scope
   15 |     if(array[i]>=1/4/M*SUM)count++;
      |                        ^~~
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];
    }
    int y=int(Math.round((p/(4.0*M)));
    for(i=0;i<N;i++)
    {
      if(A[i]>=y)
      {
        m++;
      }
    }
    if(m>=M)
      System.out.println("Yes");
      else
        System.out.println("No");
  }
}
      
    


Compiler output:
Main.java:15: error: '.class' expected
    int y=int(Math.round((p/(4.0*M)));
             ^
1 error