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

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


Compiler output:
main.c: In function 'main':
main.c:13:11: error: conflicting types for 'x'; have 'double'
   13 |    double x=sum/(4.0*m);
      |           ^
main.c:4:13: note: previous declaration of 'x' with type 'int'
    4 |     int n,m,x,i,sum=0,c;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,m;
    cin>>n>>m;
    int ar[n];
    int total_votes=0;
    for(int i=0;i<n;i++){
        cin>>ar[i];
        total_votes=total_votes + ar[i];
    }
    int cnbeselected=0;
    for(int i=0;i<n;i++){
        if(ar[i]>= static_cast<double>total_votes/(4*m)){
            cnbeselected++;
        }
    }
    if(cnbeselected>=m) cout<<"Yes";
    else cout<<"No";

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:39: error: expected '(' before 'total_votes'
   14 |         if(ar[i]>= static_cast<double>total_votes/(4*m)){
      |                                       ^~~~~~~~~~~
      |                                       (
a.cc:14:57: error: expected ')' before '{' token
   14 |         if(ar[i]>= static_cast<double>total_votes/(4*m)){
      |           ~                                             ^
      |                                                         )
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
Language: C++

#include<bits\stdc++.h>
using namespace std;
int main()
{
    double u;
    int N,M,A[105],sum,num,i;
    cin>>N>>M;
    for(i=1;i<=N;i++)
    {
        cin>>A[i];
        sum=sum+A[i];
    }
    u=sum/(4*M);
    for(i=1;i<=N;i++)
    {
        if(A[i]>=u)
            num++;
    }
    if(num>=M)
        cout<<"YES";
    else
        cout<<"NO";
    return 0;
}


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

#include<bits\stdc++.h>
using namespace std;
int main()
{
    double u;
    int N,M,A[1001],sum,num,i;
    cin>>N>>M;
    for(i=1;i<=N;i++)
    {
        cin>>A[i];
        sum=sum+A[i];
    }
    u=sum/(4*M);
    for(i=1;i<=N;i++)
    {
        if(A[i]>=u)
            num++;
    }
    if(num>=M)
        cout<<"YES";
    else
        cout<<"NO";
    return 0;
}


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

 N, M = map(int,input().split()) 
 A = list(map(int,input().split())) 
 S = sum(A) 
 cnt = 0 
   for a in A; 
   if a >= S / (4*M); 
     cnt += 1 
   if cnt >= M:;
      print("Yes") 
   else  print("No")


Compiler output:
a.cc:1:2: error: 'N' does not name a type
    1 |  N, M = map(int,input().split())
      |  ^
a.cc:6:4: error: expected unqualified-id before 'if'
    6 |    if a >= S / (4*M);
      |    ^~
a.cc:7:6: error: 'cnt' does not name a type; did you mean 'int'?
    7 |      cnt += 1
      |      ^~~
      |      int
a.cc:9:12: error: expected constructor, destructor, or type conversion before '(' token
    9 |       print("Yes")
      |            ^
Language: C++

n, m = map(int, input().split())
l = list(map(int,input().split()))
l = sorted(l)[::-1]
check = l[m - 1] > (sum(l) / 4 / m)
print("Yes" if check 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;
  int M;

  cin >> N >> M;
  
  vector<int> A(N);
  int total = 0;
  for (auto it = A.begin(); it != A.end(); it++) {
    cin >> *it;
    total += *it;
  }

  bool is_ok = false;
  int selected = 0;
  int cut_off = total / (4 * M);
  
  for (i = 0; i < N; i++) {
    if (A.at(i) >= cut_off) {
      selected++;
    }
  }

  if (selected >= M) {
    is_ok = true;
  }

  if(is_ok == true) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }

  return 0;
}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: 'sum' was not declared in this scope
   16 |     if(arr[n-m]>= sum)  cout << "Yes";
      |                   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int n,m,a[105],sum,num;
int main()
{
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
		sum+=a[i];
	}
	double x=sum/(4.0*m);
	for(int i=1;i<=n;i++)
		if(a[i]>=x)
			num++;
	if(num>=m)
		cout<<"Yes";
	else
		cout<<"No";
	return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: expected ';' before '}' token
   21 |         return 0
      |                 ^
      |                 ;
   22 | }
      | ~
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class ABC161B {
    public static void main(String args[]){
        boolean judge = true;

        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int M = Integer.parseInt(sc.next());

        int A[] = new int[N];
        int sum = 0;

        for(int i=0; i<N; i++)
        {
            A[i] = Integer.parseInt(sc.next());
            sum += A[i];
        }

        Arrays.sort(A);

        for(int j=N-1; j>(N-1)-M; j--)
        {
            if(A[j]< 1.0*sum/4/M) judge = false;
        }

        if(judge) System.out.println("Yes");
        else System.out.println("No");
        sc.close();
    }
}

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

#include<bits/stdc++.h>
using namespace std;
#defin ll long long
int n,m,num;
int a[105],sum;
int main(){
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
		sum+=a[i];
	}
	double x=sum/(4.0*m)
	for(int i=1;i<=n;i++)
	{
		if(a[i]>=x)
		num++;
	}
	if(num>m)
    cout<<"Yes"
    else
    cout<<"No"
return 0;
}


Compiler output:
a.cc:3:2: error: invalid preprocessing directive #defin; did you mean #define?
    3 | #defin ll long long
      |  ^~~~~
      |  define
a.cc: In function 'int main()':
a.cc:14:9: error: expected ',' or ';' before 'for'
   14 |         for(int i=1;i<=n;i++)
      |         ^~~
a.cc:14:21: error: 'i' was not declared in this scope
   14 |         for(int i=1;i<=n;i++)
      |                     ^
a.cc:20:16: error: expected ';' before 'else'
   20 |     cout<<"Yes"
      |                ^
      |                ;
   21 |     else
      |     ~~~~
Language: Java

import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        Integer A[]= new Integer[N];
        int sum = 0;
        for(int i=0;i<N;i++){
            A[i] = sc.nextInt();
            sum += A[i];
        }
        Arrays.sort(A,Collections.reverseOrder());
        int b = A[M-1]*4*M;
        if(b<sum){
            System.out.println("No");
        }else{
            System.out.println("Yes");
        }

    }
}
}


Compiler output:
Main.java:26: error: class, interface, enum, or record expected
}
^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long double;
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define rep( i, a, n ) for( ll i=a; i<n; i++ )
#define repp( i, a, n, p ) for( ll i=a; i<n; i+=p )
#define per( i, a, n ) for( ll i=n-1; i>=a; i-- )

int main () {
  ll n, m;
  cin >> n >> m;
  ll arr[n];
  ll req=0;
  rep ( i, 0, n ) {
    cin >> arr[i];
    req += arr[i];
  }

  req /= 4;
  req /= m;

  ll count =0;
  rep ( i, 0, n ) {
    if ( arr[i] >= req ) 
      count++;
  }
  if ( count >= m ){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: conversion from 'll' {aka 'long double'} to 'long unsigned int' in a converted constant expression
   14 |   ll arr[n];
      |          ^
a.cc:14:10: error: could not convert 'n' from 'll' {aka 'long double'} to 'long unsigned int'
   14 |   ll arr[n];
      |          ^
      |          |
      |          ll {aka long double}
a.cc:14:10: error: size of array 'arr' has non-integral type 'll' {aka 'long double'}
a.cc:17:15: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   17 |     cin >> arr[i];
      |               ^
a.cc:18:15: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   18 |     req += arr[i];
      |               ^
a.cc:26:13: error: invalid types 'll [1] {aka long double [1]}[ll {aka long double}]' for array subscript
   26 |     if ( arr[i] >= req )
      |             ^
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 num = 0;
  for (i = 0; i < N; i++) {
    if (a.at(i) > (1 / (4*M))) num++;
  }
  
  if (num > M) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:55: error: expected primary-expression before ')' token
   17 |                 if (v[i] >= (total + mult - 1) / mult));
      |                                                       ^
Language: Java

import java.util.*;
public class Euler {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            int n = sc.nextInt();
            int m = sc.nextInt();
            int total = 0;
            int [] votes = new int[n];
            for(int i = 0; i<n; i++){
                votes[i] = sc.nextInt();
                total += votes[i];
            }
            Arrays.sort(votes);
            double threshold = (double)1/(4*m)*(double)total;
            for(int i = votes.length-1; i>=n-m; i--){
                if(votes[i]<threshold) {
                    System.out.println("No");
                    return;
                }
            }
            System.out.println("Yes");
        }
    }

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

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

public class Main {
    public static void main(String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader((System.in)));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken());
        int m = Integer.parseInt(st.nextToken());
        st = new StringTokenizer(br.readLine());
        int total = 0;
        int[] votes = new int[n];
        for (int i = 0; i < n; i++) {
            votes[i] = Integer.parseInt(st.nextToken());
            total += votes[i];
        }

        int necessaryVotes = Math.ceil(double)total / (4 * m));
        int canPrint = 0;
        for (int i = 0; i < n; i++) {
            if (votes[i] >= necessaryVotes) canPrint++;
        }

        System.out.println(canPrint >= m ? "Yes" : "No");
//        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
//        bw.write("\n");
//        bw.close();
    }

}

Compiler output:
Main.java:19: error: '.class' expected
        int necessaryVotes = Math.ceil(double)total / (4 * m));
                                             ^
Main.java:19: error: ';' expected
        int necessaryVotes = Math.ceil(double)total / (4 * m));
                                              ^
Main.java:19: error: not a statement
        int necessaryVotes = Math.ceil(double)total / (4 * m));
                                                    ^
Main.java:19: error: ';' expected
        int necessaryVotes = Math.ceil(double)total / (4 * m));
                                                             ^
4 errors
Language: C++

#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];
 sort(a,a+N,greater<int>());
 int sum=0;
 for(int i=0;i<N;i++){
     sum+=a[i];
 }
 float num=(float)sum/(2*M);
 if(a[M-1]>=num){
     cout<<"Yes"<<endl;
 }else{
     cout<<"No"<<endl;
 }
}

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

n,m=map(int,input().split())
a=list(map(int,input().split()))
cnt=0
b=sum(a)
for i in range(n):
 if a[i]<b/(4*m):
  continue
 else:
  cnt+=1
if cnt>=m:
 print('Yes')
else:
 print('No')

Compiler output:
a.cc:11:8: warning: multi-character character constant [-Wmultichar]
   11 |  print('Yes')
      |        ^~~~~
a.cc:13:8: warning: multi-character character constant [-Wmultichar]
   13 |  print('No')
      |        ^~~~
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,a[100005],i,j,k;
    cin>>n>>m;
    int sum=0;
    for(i=0;i<n;i++)
    {
        cin>>a[i]
        sum=sum+a[i];
    }
    j=sum/(4*m);
    int cnt=0;
    for(i=0;i<n;i++)
    {
        if(a[i]>=j){cnt++;}
    }
    if(cnt>=m){cout<<"Yes"<<endl;}
    else{cout<<"No"<<endl;}
    return 0;
}

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

#include<stdio.h>

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

	return 0;

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

#include<stdio.h>

int main() {
	int n[100], m, num, sum = 0, rez = 0;
	int flag = 0;

	scanf_s("%d", &num);
	scanf_s("%d", &m);

	for (int i = 0; i < num; i++) {
		scanf("%d", &n[i]);
		sum += n[i];
	}
	rez = sum / (4 * m);

	for (int i = 0; i < num; i++) 
		if (n[i] >= rez) 
			flag++; 

	if (flag >= m) {
		printf("Yes");
	}
	else {
		printf("No");
	}
	
	 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scanf_s("%d", &num);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

int main() {
	int n[100], m, num, sum = 0, rez = 0;
	int flag = 0;

	scanf_s("%d", &num);
	scanf_s("%d", &m);

	for (int i = 0; i < num; i++) {
		scanf("%d", &n[i]);
		sum += n[i];
	}
	rez = sum / (4 * m);

	for (int i = 0; i < num; i++) 
		if (n[i] >= rez) 
			flag++; 

	if (flag >= m) {
		printf("Yes ");
	}
	else {
		printf("No ");
	}
	
	 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scanf_s("%d", &num);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

int main() {
	int n[100], m, num, sum = 0, rez = 0;;

	scanf_s("%d", &num);
	scanf_s("%d", &m);

	for (int i = 0; i < num; i++) {
		scanf("%d", &n[i]);
		sum += n[i];
	}
	rez = sum / (4 * m);

	printf(" %d", rez); 

	for (int i = 0; i < num; i++)
		for (int j = 0; j <= m; j++)
			if (n[i] >= rez)
				printf("Yes");
			else
				printf("No");
		
	
	 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d", &num);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>

using namespace std;

int main(){
    int N, M;
    cin >> N >> M;
    vector<int> a(N);
    for(int i=0; i<N; i++)
      cin >> a[i];

    sort(a.begin(), a.end(), greater<int>());
    int sum = accumulate(a.begin(), a.end(), 0);

    // cout << sum << endl;

    // for(auto v: a)
    //   cout << v << endl;

    cout << (double)sum / (4 * M) << endl;

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

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

#include <iostream>
#include <vector>
using namespace std;
 
int main() {
  int M, N, v;
  vector <int> votes;
  cin >> M >> N;
  int sum = 0;
  while (cin >> v) {
    votes.push_back(v);
    sum += v;
  }
  sort(votes.begin(), votes.end());
  int threshold = sum/(4*M);
  
  for(int i = 0; i < M; i++){
    if (votes[i] < threshold){
      cout << "No";
      return 0;
    }
  }
  
  cout << "Yes";
  
  return 0;
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: redeclaration of 'float selection'
   17 |   float selection =((float)sum/(4*m));
      |         ^~~~~~~~~
a.cc:9:9: note: 'float selection' previously declared here
    9 |   float selection;
      |         ^~~~~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: lvalue required as left operand of assignment
   16 |   (float)selection =((float)sum /(4*m));
      |   ^~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m,c;
    long long int vote=0;
    cin>>n>>m;
    int ar[n];
    for(int i=0;i<n;i++){
        cin>>ar[i];
        vote+=ar[i];
    }
    c=n;
    int d=(vote/(4*m));
    for(int i=0;i<n;i++){
        if(ar[i]<=d){
            c--;
        }
    }
    if(c>=m) cout<<"Yes"<<endl;
    else     cout<<"No"<,endl;
}






Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: expected primary-expression before ',' token
   22 |     else     cout<<"No"<,endl;
      |                         ^
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds; 
using namespace std;
#define int long long
#define ll long long
#define pll pair<ll,ll>
#define pii pair<int,int>
#define mll map<ll,ll>
#define mii map<int,int>
#define mp make_pair
#define pb push_back
#define rep(i,b) for(ll (i)=0;i<(b);i++)
#define all(c) (c).begin(), (c).end()
#define F first
#define S second
#define CLR(p) memset(p, 0, sizeof(p))
#define SET(p) memset(p, -1, sizeof(p))
#define DEBUG true
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);
//typedef long long int ll;
typedef tree<int, null_type, less<int>, rb_tree_tag, 
tree_order_statistics_node_update> new_data_set; 
const int MAX=200005;
#define MOD 1000000007
/*std::cout << std::fixed;
std::cout << std::setprecision(6);*/
//(a%mod-b%mod+mod)%mod



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


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

vector<vector<ll>>v;
ll T=0;
ll cnt1=0,cnt0=0;
vector<ll>dep;
bool visited[MAX];
vector<ll>par;
vector<ll>tin,tout;
vector<ll>col;
ll f=0,k=1;
map<pll,ll>m;
ll dp1[MAX],dp2[MAX];
ll red,blue;
ll ans;
ll dp[MAX];

ll lca(ll u,ll v){
	while(u!=v){
		ll l1,l2;
		l1 = log2(u);
		l2 = log2(v);
		//cout<<l1<<"$$"<<l2<<endl;
		if(l1<l2)
			swap(u,v);
		u /=2;
	}
	return u;
}





signed main(){
	boost;
	int t=1;
	// cin>>t;
	while(t--){
		int m,n;
		cin>>n>>m;
		int a[n];
		int sum=0;
		rep(i,n){
			cin>>a[i];
			sum+=a[i];
		}
		int x = ceil((1.0*sum)/(4*m);
		int cnt=0;
		rep(i,n){
			if(a[i]>=x)
				cnt++;
		}
		if(cnt>=m)
			cout<<"Yes\n";
		else cout<<"No\n";
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:83:45: error: expected ')' before ';' token
   83 |                 int x = ceil((1.0*sum)/(4*m);
      |                             ~               ^
      |                                             )
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds; 
using namespace std;
#define int long long
#define ll long long
#define pll pair<ll,ll>
#define pii pair<int,int>
#define mll map<ll,ll>
#define mii map<int,int>
#define mp make_pair
#define pb push_back
#define rep(i,b) for(ll (i)=0;i<(b);i++)
#define all(c) (c).begin(), (c).end()
#define F first
#define S second
#define CLR(p) memset(p, 0, sizeof(p))
#define SET(p) memset(p, -1, sizeof(p))
#define DEBUG true
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);
//typedef long long int ll;
typedef tree<int, null_type, less<int>, rb_tree_tag, 
tree_order_statistics_node_update> new_data_set; 
const int MAX=200005;
#define MOD 1000000007
/*std::cout << std::fixed;
std::cout << std::setprecision(6);*/
//(a%mod-b%mod+mod)%mod



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


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

vector<vector<ll>>v;
ll T=0;
ll cnt1=0,cnt0=0;
vector<ll>dep;
bool visited[MAX];
vector<ll>par;
vector<ll>tin,tout;
vector<ll>col;
ll f=0,k=1;
map<pll,ll>m;
ll dp1[MAX],dp2[MAX];
ll red,blue;
ll ans;
ll dp[MAX];

ll lca(ll u,ll v){
	while(u!=v){
		ll l1,l2;
		l1 = log2(u);
		l2 = log2(v);
		//cout<<l1<<"$$"<<l2<<endl;
		if(l1<l2)
			swap(u,v);
		u /=2;
	}
	return u;
}





signed main(){
	boost;
	int t=1;
	// cin>>t;
	while(t--){
		int m,n;
		cin>>n>>m;
		int a[n];
		int sum=0;
		rep(i,n){
			cin>>a[i];
			sum+=a[i];
		}
		
		int x = (sum)/(4*m));
		// cout<<sum<<" "<<x<<endl;
		int cnt=0;
		rep(i,n){
			if(a[i]>=x)
				cnt++;
		}
		if(cnt>=m)
			cout<<"Yes\n";
		else cout<<"No\n";
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:84:36: error: expected ',' or ';' before ')' token
   84 |                 int x = (sum)/(4*m));
      |                                    ^
Language: C++

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


int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n,m;
  cin>>n>>m;
  int a[150];
  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(4*m*a[i]>=sum){
        c++;
    }
  }
  if(c>=m){
    cout<<"Yes";
  }else{
    cout<<"No"
  }


  
  }}




Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: expected ';' before '}' token
   26 |     cout<<"No"
      |               ^
      |               ;
   27 |   }
      |   ~            
a.cc: At global scope:
a.cc:31:4: error: expected declaration before '}' token
   31 |   }}
      |    ^
Language: C++

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


int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n,m;
  cin>>n>>m;
  int a[150];
  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(4*m*a[i]>=sum){
        c++;
    }
  }
  if(c>=m){
    cout<<"Yes";
  }else{
    cout<<"No"
  }


  
  }




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

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

typedef double db;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef complex<double> com;

#define endl '\n'
#define eb emplace_back
#define pb push_back
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define unique_sort(x) (sort(x.begin(), x.end()), x.resize(distance(x.begin(), unique(x.begin(), x.end()))))
#define fast_io() ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define dbg(x) cout << #x << " = " << x << '\n'
#define dbg2(x,y) cout<<#x<<" = "<<x<<" & "<<#y<<" = "<<y<<endl;

void test()
{
	double m,n,c=0,sum=0;
	cin>>n>>m;

	double a[n];

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

	for(int i=0;i<n;i++)
	{
		if(a[i] >= sum / (4*m) )
			c++;
	}

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


}

int main()
{   
fast_io();
cout << fixed << setprecision(15);
int t = 1;

//cin>>t;

for(int i = 0; i < t; i++)
{
	test();
}
return 0;
}

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

M,N=map(int,input().split())
A = list(map(int,input().split()))
b=sum(A)
s=sorted(A)
if s[-M]>=(b/(4*M)):
    print("Yes")
else:
    print("No")

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: invalid types 'double [n][double]' for array subscript
   13 |   if(a[m-1]<ceil(s/(4*m)))cout << "No";
      |       ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    6 |   double a[n];
      |            ^
a.cc:6:12: error: could not convert 'n' from 'double' to 'long unsigned int'
    6 |   double a[n];
      |            ^
      |            |
      |            double
a.cc:6:12: error: size of array 'a' has non-integral type 'double'
a.cc:8:13: error: invalid types 'double [1][double]' for array subscript
    8 |     cin >> a[i];
      |             ^
a.cc:9:9: error: invalid types 'double [1][double]' for array subscript
    9 |     s+=a[i];
      |         ^
a.cc:11:11: error: invalid operands of types 'double [1]' and 'double' to binary 'operator+'
   11 |   sort(a,a+n,greater<int>());
      |          ~^~
      |          | |
      |          | double
      |          double [1]
a.cc:12:7: error: invalid types 'double [1][double]' for array subscript
   12 |   if(a[m-1]<ceil(s/(4*m)))cout << "No";
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N, M;
  cin >> N >> M;
  
  vector<int> vec(N);
  for(int i = 0; i < N; i++){
    cin >> vec.at(i);
  }
  
  sort(vec.begin(), vec.end()); //大きい順にソート
  reverse(vec.begin(), vec.end());
  int sum = 0;
   for(int i = 0; i < N; i++){
    sum += vec.at(i)
  }
  
  for(int i = 0; i < M; i++){
    if(vec.at(i) < sum/(4*M)){
      cout << "No" << endl;
    }
  }
 cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: expected ';' before '}' token
   17 |     sum += vec.at(i)
      |                     ^
      |                     ;
   18 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N, M;
  cin >> N >> M;
  
  vector<int> vec(N);
  for(int i = 0; i < N; i++){
    cin >> vec.at(i);
  }
  
  sort(vec.begin(), vec.end()); //大きい順にソート
  reverse(vec.begin(), vec.end());
  int sum = 0;
   for(int i = 0; i < N; i++){
    sum += vec.at(i)
  }
  
  for(int i = 0; i < M; i++){
    if(vec.at(i) < 1/(4*M)*sum){
      cout << "No" << endl;
    }
  }
 cout << "Yes" << endl;
}

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

reverse (A.begin(),A.end());
  
int count=0;
for(int i=0;i<N;i++){
  count+=A.at(i);
}

if(A.at(M-1)<(double)A/(M*4)){
  cout<<"No"<<endl;
}
else{
  cout<<"Yes"<<endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: invalid cast from type 'std::vector<int>' to type 'double'
   21 | if(A.at(M-1)<(double)A/(M*4)){
      |              ^~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int a[101];
int n,m,i,s;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin >> n >> m;
    for (i=1;i<=n;i++)
    {
        cin >> a[i];
        s+=a[i];
    }
    sort(a+1,a+1+n);
    if (a[n-m+1] >= ceil(s/(4*m))) cout << "Yes";
    else cout << "No";
}

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: request for member 'begin' in 'A.std::vector<int>::at(((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   11 |     reverse(A.at(i).begin(),A.at(i).end());
      |                     ^~~~~
a.cc:11:37: error: request for member 'end' in 'A.std::vector<int>::at(((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   11 |     reverse(A.at(i).begin(),A.at(i).end());
      |                                     ^~~
Language: C++

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
	<FileVersion major="1" minor="6" />
	<Project>
		<Option title="at1" />
		<Option pch_mode="2" />
		<Option compiler="gcc" />
		<Build>
			<Target title="Debug">
				<Option output="bin/Debug/at1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Debug/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-g" />
				</Compiler>
			</Target>
			<Target title="Release">
				<Option output="bin/Release/at1" prefix_auto="1" extension_auto="1" />
				<Option object_output="obj/Release/" />
				<Option type="1" />
				<Option compiler="gcc" />
				<Compiler>
					<Add option="-O2" />
				</Compiler>
				<Linker>
					<Add option="-s" />
				</Linker>
			</Target>
		</Build>
		<Compiler>
			<Add option="-Wall" />
			<Add option="-fexceptions" />
		</Compiler>
		<Unit filename="main.cpp" />
		<Extensions>
			<code_completion />
			<envvars />
			<debugger />
			<lib_finder disable_auto="1" />
		</Extensions>
	</Project>
</CodeBlocks_project_file>


Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
      | ^
Language: Java

import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;



public class PopularVote {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		int n = sc.nextInt();
		int m = sc.nextInt();
		Integer[] arr = new Integer[n];
		long sum =0;
		for (int i=0; i<n; i++) {
			arr[i]=sc.nextInt();
			sum+=arr[i];
		}
		Arrays.sort(arr);
		int mtaken = 0;
//		System.out.println(sum);
//		System.out.println((1.0/4*m));
//		System.out.println(sum*(1.0/4*m));
		long mustbegreaterthanoreq = (long) Math.floor(sum*(1.0/(4*m)));
//		System.out.println(mustbegreaterthanoreq);
		for(int i=n-1; i>=0 ;i--) {
			if(arr[i]>=mustbegreaterthanoreq) {
				mtaken++;
//				System.out.println(mtaken);
				if(mtaken==m)
					break;
			}
			else
				break;
		}
		if(mtaken>=m)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
	


	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


Compiler output:
Main.java:7: error: class PopularVote is public, should be declared in a file named PopularVote.java
public class PopularVote {
       ^
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 sum=0;
  for(int i=0;i<N;i++){
    sum=sum+A.at(i)
  }
  sum=sum/(4*M);
  int count=0;
  for(int i=0;i<N;i++){
    if(A.at(i)>=sum){
      count=count+1;
    }
    else{
    }
  }
  if(count>=M){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: expected ';' before '}' token
   12 |     sum=sum+A.at(i)
      |                    ^
      |                    ;
   13 |   }
      |   ~
Language: C

#include<cstdio>
using namespace std;
double n,m,a[105],per,tot;
int main(){
	scanf("%lf%lf",&n,&m);m*=4.0;
	for(int i=1;i<=n;i++) scanf("%lf",&a[i]);
	per=1.0/m;
	for(int i=1;i<=n;i++) if(a[i]>=per) tot+=1.0;
	if(tot>=m) printf("YES\n");
	else printf("NO\n");
	return 0;
}

Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C++

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: invalid types 'int[int]' for array subscript
   11 |   if(count/4*M>A[M-1]){
      |                 ^
Language: C

#include<stdio.h>
 int main(void)
   long A[10000];
   int M,N,i,j=0,k,L=0;
   scanf("%d%d",&N,&M);
   for(i=0;i<N;i++){
     scanf("%d",&A[i]);
     j=j+A[i];
   }
   for(i=0;i<N;i++)
     if(4*M*A[i]>j) L++;
   if(L>=M) printf("Yes\n");
      else  printf("No\n");
   return 0;
}





Compiler output:
main.c: In function 'main':
main.c:4:4: error: parameter 'j' is initialized
    4 |    int M,N,i,j=0,k,L=0;
      |    ^~~
main.c:4:4: error: parameter 'L' is initialized
main.c:5:4: error: expected declaration specifiers before 'scanf'
    5 |    scanf("%d%d",&N,&M);
      |    ^~~~~
main.c:6:4: error: expected declaration specifiers before 'for'
    6 |    for(i=0;i<N;i++){
      |    ^~~
main.c:6:12: error: expected declaration specifiers before 'i'
    6 |    for(i=0;i<N;i++){
      |            ^
main.c:6:16: error: expected declaration specifiers before 'i'
    6 |    for(i=0;i<N;i++){
      |                ^
main.c:10:4: error: expected declaration specifiers before 'for'
   10 |    for(i=0;i<N;i++)
      |    ^~~
main.c:10:12: error: expected declaration specifiers before 'i'
   10 |    for(i=0;i<N;i++)
      |            ^
main.c:10:16: error: expected declaration specifiers before 'i'
   10 |    for(i=0;i<N;i++)
      |                ^
main.c:12:4: error: expected declaration specifiers before 'if'
   12 |    if(L>=M) printf("Yes\n");
      |    ^~
main.c:13:7: error: expected declaration specifiers before 'else'
   13 |       else  printf("No\n");
      |       ^~~~
main.c:14:4: error: expected declaration specifiers before 'return'
   14 |    return 0;
      |    ^~~~~~
main.c:15:1: error: expected declaration specifiers before '}' token
   15 | }
      | ^
main.c:2:6: error: old-style parameter declarations in prototyped function definition
    2 |  int main(void)
      |      ^~~~
main.c:19: error: expected '{' at end of input
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,M;
  int count=0;
  cin>>N>>M;
  for(int i=0;i<N;i++){
  
    cin>>A;
    count+=A;
    if(1/4*M>A/count){
    cout<<"No"<<endl;
    }
    else{
    coutn<<"Yes"<<endl;
    }
  
  }
  
 

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'A' was not declared in this scope
    9 |     cin>>A;
      |          ^
a.cc:15:5: error: 'coutn' was not declared in this scope; did you mean 'count'?
   15 |     coutn<<"Yes"<<endl;
      |     ^~~~~
      |     count
Language: C++

 #include<stdio.h>
 int main(void)
 {
     int a[10000],M,N,i,j=0,k,L=0;
     scanf("%d%d",&N,&M);
     for(i=0;i<N;i++){
       scanf("%d",&A[i]);
       j=j+A[i];
     }
     for(k=0;k<=N;k++)
       if(A[k]>j/(4*M)) L++;
   
     if(L>=M) printf("Yes\n");
        else     printf("No\n");
     return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'A' was not declared in this scope
    7 |        scanf("%d",&A[i]);
      |                    ^
a.cc:11:11: error: 'A' was not declared in this scope
   11 |        if(A[k]>j/(4*M)) L++;
      |           ^
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:25:15: error: expected ';' before '}' token
   25 |       return 0
      |               ^
      |               ;
   26 |     }else{
      |     ~
Language: C++

#include<iostream>
using namespace std;
 
int main()
{
  int n,min;
  bool val=true;
  cin>>n>>min;
  int arr[n];
  int sum=0
  for(int i=0;i<n;i++)
  {
    cin>>arr[i];
    sum+= arr[i]
  }
  for(int i=0;i<n;i++)
  {  
      if (arr[i]<(1/4*(min))*(sum)){
     val = false;
       break;
     }
  }
  if (val==1) cout<<"Yes";
  else cout<<"No";
  return 0;
}

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

#include<iostream>
using namespace std;

int main()
{
  int n,min;
  bool val=true
  cin>>n>>min;
  int arr[n]
  for(int i=0;i<n;i++)
  {
    cin>>arr[i]
  }
  for(int i=0;i<n;i++)
  {
     if(arr[i]<1/(4*min)) {
     val = false;
       break
     }
  }
  cout<<val;
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'cin'
    8 |   cin>>n>>min;
      |   ^~~
a.cc:10:3: error: expected initializer before 'for'
   10 |   for(int i=0;i<n;i++)
      |   ^~~
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   for(int i=0;i<n;i++)
      |               ^
a.cc:16:9: error: 'arr' was not declared in this scope
   16 |      if(arr[i]<1/(4*min)) {
      |         ^~~
a.cc:18:13: error: expected ';' before '}' token
   18 |        break
      |             ^
      |             ;
   19 |      }
      |      ~       
a.cc:22:11: error: expected ';' before '}' token
   22 |   return 0
      |           ^
      |           ;
   23 | }
      | ~
Language: Java

import java.util.*;
class Main
{
  public static void main(String[] args)
  {
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt(); //総商品数
    int m = sc.nextInt(); //選びたい商品数
    
    int[] param = new int[n];
    long sum1 = 0; //総得票数
    int sum2 = 0; //選ぶことができる商品数
    
    //全ての商品の票数を入力する
    for(int i = 0 ; i<n ; i++){
      param[i] = sc.nextInt();
      sum1 += param[i];
    }
    
    //全ての票数と条件とを照らし合わせる
    for(int i=0 ; i<n ; i++){
      if( (param[i] =(sum1/(4*m))) ||  (param[i] >(sum1/(4*m)))){
        sum2++;
      }
    }
    
    //選ぶことができるかどうかを確かめる
    if(sum2>=m){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }
}


Compiler output:
Main.java:23: error: incompatible types: possible lossy conversion from long to int
      if( (param[i] =(sum1/(4*m))) ||  (param[i] >(sum1/(4*m)))){
                          ^
Main.java:23: error: bad operand types for binary operator '||'
      if( (param[i] =(sum1/(4*m))) ||  (param[i] >(sum1/(4*m)))){
                                   ^
  first type:  int
  second type: boolean
2 errors
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:14:19: error: stray '\' in program
   14 |         if(a[j]>=s\4\m)
      |                   ^
main.c:14:19: error: expected ')' before numeric constant
   14 |         if(a[j]>=s\4\m)
      |           ~       ^~
      |                   )
main.c:14:21: error: stray '\' in program
   14 |         if(a[j]>=s\4\m)
      |                     ^
Language: C++

#include<iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: 'cot' was not declared in this scope
   26 |     cot<<"Yes"<<endl;
      |     ^~~
Language: C++

#include<iostream>
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];
  }
  double ok = (double) sum / (4 * m);
  int count = 0;
  for(int i = 0; i < n; i++){
    if(ok =< a[i]){
      count++;
    }
  }
  if(count >= m){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}
	
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: expected primary-expression before '<' token
   14 |     if(ok =< a[i]){
      |            ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before '}' token
   10 |     s += a[i]
      |              ^
      |              ;
   11 |   }
      |   ~
Language: C++

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

int main(){
    int n,m,all=0,count=0;
    cin >>n>>m;
    int a[n];
    for(int i=0;i<n;i++){
        cin >>a[i];
        all+=a[i];
    }
    int mm=all/4/m;
    for(int i=0;i<n;i++){
        if(a[i]-mmm0){count++;}
    }
    if(count>=m){
        cout << "Yes" <<endl;
    }else{
        cout << "No" <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'mmm0' was not declared in this scope; did you mean 'mm'?
   14 |         if(a[i]-mmm0){count++;}
      |                 ^~~~
      |                 mm
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>

using namespace std;
using ll = long long;


int main(){
    int m, n;
    cin >> n >> m;
    int ai,s=0;
    vector<int> a(n);
    for(int i=0; i<n; i++){
        cin >> ai;
        a[i] = ai;
        s += ai;
    }
    double x = double(s/4/m));

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

Compiler output:
a.cc: In function 'int main()':
a.cc:23:29: error: expected ',' or ';' before ')' token
   23 |     double x = double(s/4/m));
      |                             ^