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

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

using namespace std;
int main(){
	int numKindOfGoods,numSelectGoods;
  	int NumberOfVotes,sum = 0;
  	vector<int> array_NumberOfVotes(0);
  	// 商品の種類数と選ぶ個数を入力
  	cin >> numKindOfGoods >> numSelectGoods;
  	// 商品の種類数分、商品ごとの得票数を入力する
  	for(int i = 0; i < numKindOfGoods; ++i){
      	cin >> NumberOfVotes;
      	array_NumberOfVotes.push_back(NumberOfVotes);
        sum += NumberOfVotes;
    }
  	// yes/no 判断
  	// vectorを降順にソートする
  	std::sort(array_NumberOfVotes.begin(), array_NumberOfVotes.end(), std::greater<int>());
  	if(static_cast<double>array_NumberOfVotes[numSelectGoods - 1] >= static_cast<double>(sum / (4 * numSelectGoods))){
    	cout << "Yes" << endl;
    }
  	else{
    	cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:31: error: expected '(' before 'array_NumberOfVotes'
   21 |         if(static_cast<double>array_NumberOfVotes[numSelectGoods - 1] >= static_cast<double>(sum / (4 * numSelectGoods))){
      |                               ^~~~~~~~~~~~~~~~~~~
      |                               (
a.cc:21:122: error: expected ')' before '{' token
   21 |         if(static_cast<double>array_NumberOfVotes[numSelectGoods - 1] >= static_cast<double>(sum / (4 * numSelectGoods))){
      |           ~                                                                                                              ^
      |                                                                                                                          )
a.cc:27:1: error: expected primary-expression before '}' token
   27 | }
      | ^
Language: C++

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

using namespace std;
int main(){
	int numKindOfGoods,numSelectGoods;
  	int NumberOfVotes,sum = 0;
  	vetor<int> array_NumberOfVotes;
  	// 商品の種類数と選ぶ個数を入力
  	cin >> numKindOfGoods >> numSelectGoods;
  	// 商品の種類数分、商品ごとの得票数を入力する
  	for(int i = 0; i < numKindOfGoods; ++i){
      	cin >> NumberOfVotes;
      	array_NumberOfVotes.push_back(NumberOfVotes);
        sum += NumberOfVotes;
    }
  	// yes/no 判断
  	// vectorを降順にソートする
  	std::sort(array_NumberOfVotes.begin(), array_NumberOfVotes.end(), std::greater<int>());
  	
  	for(int count = 0; count < numSelectGoods; ++count){
      	if(array_NumberOfVotes[count] >= static_cast<double>(sum / 4 * numSelectGoods)){
         	// 選べる条件に該当する場合
          	if(count == (numSelectGoods - 1)){
            	cout << "Yes" << endl;
            }
        }
      	// 選べる条件に該当しない場合
      	cout << "No" << endl;
      	break;
    }
  	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'vetor' was not declared in this scope
    9 |         vetor<int> array_NumberOfVotes;
      |         ^~~~~
a.cc:9:15: error: expected primary-expression before 'int'
    9 |         vetor<int> array_NumberOfVotes;
      |               ^~~
a.cc:15:9: error: 'array_NumberOfVotes' was not declared in this scope; did you mean 'NumberOfVotes'?
   15 |         array_NumberOfVotes.push_back(NumberOfVotes);
      |         ^~~~~~~~~~~~~~~~~~~
      |         NumberOfVotes
a.cc:20:19: error: 'array_NumberOfVotes' was not declared in this scope; did you mean 'NumberOfVotes'?
   20 |         std::sort(array_NumberOfVotes.begin(), array_NumberOfVotes.end(), std::greater<int>());
      |                   ^~~~~~~~~~~~~~~~~~~
      |                   NumberOfVotes
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
 
int main(){
  int N,M,sum=0,k;
  cin>>N>>M;
  int ans=0;
  vector<int> a(N);
    for(int i=0;i<N;i++){
      cin>>a[i];
      sum+=a[i];
    }
  for(int i=0;i<N;i++){
    if(4*M*a[i]>=sum){ans++;}
  }
  if(ans>=M){cout<<"Yes";}
  else{cout<<"No";}
}
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
 
int main(){
  int N,M,sum=0,k;
  cin>>N>>M;
  int ans=0;
  vector<int> 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){ans++;}
  }
  if(ans>=M){cout<<"Yes";}
  else{cout<<"No";}
}


Compiler output:
a.cc:26:5: error: redefinition of 'int main()'
   26 | int main(){
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main(){
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected initializer before 'long'
    8 |         long long sum=0;
      |         ^~~~
a.cc:11:22: error: 'a' was not declared in this scope
   11 |                 cin>>a[i];
      |                      ^
a.cc:12:17: error: 'sum' was not declared in this scope
   12 |                 sum += a[i];
      |                 ^~~
a.cc:16:20: error: 'a' was not declared in this scope
   16 |                 if(a[i]*4*m >=sum){
      |                    ^
a.cc:16:31: error: 'sum' was not declared in this scope
   16 |                 if(a[i]*4*m >=sum){
      |                               ^~~
Language: C++

#include <iostream>
#include <cstdlib>
#include <set>
#include <iterator>
using namespace std;
#define REP(i, a, b) for(int i = a; i < b; i++)

int main(){
  ios::sync_with_stdio(0);
  cin.tie(0);

  int n, m;
  cin >> n >> m;
  int arr[n];
  int total = 0;
  REP(i, 0, n){
    cin >> arr[i];
    total += arr[i];
  }
  sort(arr, arr+n);
  int ans = total/(4*m), flag = 0;
  for(int i = n-1; i >= n-m; i--){
    if(arr[i] < ans){
      flag = 0;
      break;
    } else {
      flag = 1;
    }
  }
  if(flag == 1){
    cout << "YES" << "\n";
  } else {
    cout << "NO" << "\n";
  }
}

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

#include <iostream>
#include <cstdlib>
#include <set>
#include <iterator>
using namespace std;
#define REP(i, a, b) for(int i = a; i < b; i++)

int main(){
  ios::sync_with_stdio(0);
  cin.tie(0);

  int n, m;
  cin >> n >> m;
  int arr[n];
  int total = 0;
  REP(i, 0, n){
    cin >> arr[i];
    total += arr[i];
  }
  sort(arr, arr+n);
  int ans = total/(4*m), flag = 0;
  for(int i = n-1; i >= n-m; i--){
    if(arr[i] < ans){
      flag = 0;
      break;
    } else {
      flag = 1;
    }
  }
  if(flag == 1){
    cout << "YES" << "\n";
  } else {
    cout << "NO" << "\n";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |   sort(arr, arr+n);
      |   ^~~~
      |   short
Language: Java

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

public class TEST {
	public static void main(String[] args) throws IOException {
		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());
		int[] arr = new int[N];
		st = new StringTokenizer(br.readLine());
		int sum = 0;
		for (int i = 0; i < N; i++) {
			arr[i] = Integer.parseInt(st.nextToken());
			sum += arr[i];
		}
		double val = ((double) sum) / (4.0 * (double) M);
		int count = 0;
		for (int i = 0; i < N; i++) {
			if (arr[i] >= val) {
				count++;
			}
		}
		System.out.println(count < M ? "No" : "Yes");
	}
}

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

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: expected primary-expression before ';' token
   18 |       cnt=++;
      |             ^
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define vi vector<int>
#define vl vector<long long>
#define fin(ar,k,n) for(int i=k;i<n;i++) cin>>ar[i]
#define fout(ar,k,n) for(int i=k;i<n;i++) cout<<ar[i]<<' '
#define vs vector<string>
#define mx INT_MAX
#define mn INT_MIN
#define all(z) z.begin(),z.end()
#define mcc 1000000007
#define mcf 998244353
#define mi map<int,int>
#define mem(a,n) memset(a,n,sizeof(a))
using namespace std;

//ll maxl(ll a,ll b) {return (a>b)? a:b;}
//ll minl(ll a,ll b) {return (a<b)? a:b;}
//ll gcdl(ll a,ll b) {return b ? gcdl(b,a%b):a;}


void solve()
{
    int n,m,bdry,ct=0;
    double bdry;
    cin>>n>>m;
    vi v(n);
    for (int i=0;i<n;i++)
    {
        cin>>v[i];
        sum+=v[i];
    }
    bdry=sum/(4*m);
    for (auto &a: v)
    {
        if (a>=bdry) ct++;
    }
    if (ct>=m) cout<<"Yes";
    else cout<<"No";
}


#if 1
int main()
{
    #ifdef __WIN32
    freopen("input.txt","r",stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--) solve();
    return 0;
}
#endif

//------------------------Google-------------------
#if 0
int main()
{
    #ifdef __WIN32
    freopen("input.txt","r",stdin);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    ll t,ct=0;
    cin>>t;
    while(t--)
    {
        cout<<"Case #"<<++ct<<": ";
        solve();
    }
    return 0;
}
#endif


Compiler output:
a.cc: In function 'void solve()':
a.cc:25:12: error: conflicting declaration 'double bdry'
   25 |     double bdry;
      |            ^~~~
a.cc:24:13: note: previous declaration as 'int bdry'
   24 |     int n,m,bdry,ct=0;
      |             ^~~~
a.cc:31:9: error: 'sum' was not declared in this scope
   31 |         sum+=v[i];
      |         ^~~
a.cc:33:10: error: 'sum' was not declared in this scope
   33 |     bdry=sum/(4*m);
      |          ^~~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: unable to find numeric literal operator 'operator""m'
   16 |     x=(1/4m)*n;
      |          ^~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: expression cannot be used as a function
   16 |     if(a[i]>1/4(m)*n)
      |               ~^~~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expression cannot be used as a function
   16 |     if(a[i]>(1/4(m))*n)
      |                ~^~~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: expected identifier before numeric constant
   16 |     if(a[i]>[1/4(m)]*n)
      |              ^
a.cc: In lambda function:
a.cc:16:21: error: expected '{' before '*' token
   16 |     if(a[i]>[1/4(m)]*n)
      |                     ^
a.cc: In function 'int main()':
a.cc:16:21: error: no match for 'operator*' (operand types are 'main()::<lambda()>' and 'int')
   16 |     if(a[i]>[1/4(m)]*n)
      |             ~~~~~~~~^~
      |             |        |
      |             |        int
      |             main()::<lambda()>
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0;i<n;i++)
      |       ^
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   for(i=0;i<n;i++)
      |       ^
a.cc:16:14: error: expected identifier before numeric constant
   16 |     if(a[i]>[1/4(m)]*n)
      |              ^
a.cc: In lambda function:
a.cc:16:21: error: expected '{' before '*' token
   16 |     if(a[i]>[1/4(m)]*n)
      |                     ^
a.cc: In function 'int main()':
a.cc:16:21: error: no match for 'operator*' (operand types are 'main()::<lambda()>' and 'int')
   16 |     if(a[i]>[1/4(m)]*n)
      |             ~~~~~~~~^~
      |             |        |
      |             |        int
      |             main()::<lambda()>
a.cc:18:7: error: 'sum' was not declared in this scope
   18 |       sum=+1;
      |       ^~~
a.cc:21:6: error: 'sum' was not declared in this scope
   21 |   if(sum>=m)
      |      ^~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <functional>

#define INF 100000000

using namespace std;

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

    priority_queue<int> A;

    int N, M, i, num, sum = 0;

    cin >> N;
    cin >> M;

    for (i = 0; i < N; i++)
    {
        cin >> num;
        sum += num;
        A.push(num);
    }

    for (i = 0; i < M; i++)
    {
        num = A.top();
        if(4 * M * num < sum) ) break;
        A.pop();
    }

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

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:31: error: expected primary-expression before ')' token
   36 |         if(4 * M * num < sum) ) break;
      |                               ^
Language: C++

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

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

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

    bool x = true;

    for (int i = 0; i < m; i++)
    {
        if((double)a[i] < sum / (4 * m)){
            x = false;
            break;
        }
    }

    if(x) cout << "Yes" << endl;
    else cout << "No" << endl;    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:42: error: expected primary-expression before ')' token
   16 |     sort(a.begin(), a.end(), greater<int>);
      |                                          ^
Language: Java

import java.util.Scanner;

public class PopularVote {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int totalVote = 0;
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[] votes = new int[n];
        for (int i = 0; i < n; i++) {
            votes[i] = scanner.nextInt();
            totalVote += votes[i];
        }

        int condition = totalVote / 4 * m;
        int count = 0;
        for (int vote : votes) {
            if (vote > condition) {
                count++;
            }
            if (count == m) {
                System.out.println("Yes");
                break;
            }
        }

        if (count != m) {
            System.out.println("No");
        }
    }
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  double n, m;
  cin>>n>>m;
  vector<double>v;
  double sum = 0;
  for(int i = 0; i < n; i++)
  {
    v.push_back(cin>>v[i]);
    sum = sum + v[i];
  }
  for(int j = 0; j < n; j++)
  {
    if(v[j] > = 0.25* sum)
      count++;
  }
  if(count > = m)
    cout<<"Yes";
  else cout<<"No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: no matching function for call to 'std::vector<double>::push_back(std::basic_istream<char>::__istream_type&)'
   11 |     v.push_back(cin>>v[i]);
      |     ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = double; _Alloc = std::allocator<double>; value_type = double]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'const std::vector<double>::value_type&' {aka 'const double&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = double; _Alloc = std::allocator<double>; value_type = double]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::vector<double>::value_type&&' {aka 'double&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
a.cc:16:15: error: expected primary-expression before '=' token
   16 |     if(v[j] > = 0.25* sum)
      |               ^
a.cc:17:12: error: no post-increment operator for type
   17 |       count++;
      |            ^~
a.cc:19:14: error: expected primary-expression before '=' token
   19 |   if(count > = m)
      |              ^
Language: C++

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

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

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


Compiler output:
a.cc:29:5: error: redefinition of 'int a [105]'
   29 | int a[105];
      |     ^
a.cc:4:5: note: 'int a [105]' previously declared here
    4 | int a[105];
      |     ^
a.cc:30:5: error: redefinition of 'int main()'
   30 | int main() {
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main() {
      |     ^~~~
Language: C++

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

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

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

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

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

/* Name of the class has to be "Main" only if the class is public. */
public class codeforces
{
    static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next(){
            while(st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt(){
            return Integer.parseInt(next());
        }
        long nextLong(){
            return Long.parseLong(next());
        }
        double nextDouble(){
            return Double.parseDouble(next());
        }
        String nextLine(){
            String str = "";
            try{
                str = br.readLine();
            } catch (Exception e){
                e.printStackTrace();
            }
            return str;
        }
    }
  public static void main(String[] args)throws Exception{
    FastReader in = new FastReader();
    int n = in.nextInt(), m = in.nextInt();
    Integer[] a = new Integer[n];
    int s = 0;
    for(int i = 0; i < n; i++){
      a[i] = in.nextInt();
      s+= a[i];
    }
    Arrays.sort(a, Collections.reverseOrder());
    int min = s / (4*m);
    boolean ok = true;
    for(int i = 0; i < m; i++){
      if(a[i] < min){
        ok = false;
        break;
      }
    }
    System.out.println((ok)?"Yes":"No");
  }
}

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

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

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
    static void createSgmt(int[] a, int[] s, int l, int h, int p){
        if(l == h){
            s[p] = a[l];
            return;
        }
        int mid = (l + h)/2;
        createSgmt(a, s, l, mid, 2*p + 1);
        createSgmt(a, s, mid + 1, h, 2*p + 2);
        
        s[p] = s[2*p + 1]*s[2*p + 2];
    }
    static int query(int[] s, int l, int h, int ql, int qh, int p){
        if(ql <= l && qh >= h){
            return s[p];
        }
        if(ql > h || qh < l){
            return 1;
        }
        int mid = (l+h)/2;
        
        return query(s, l, mid, ql, qh, 2*p + 1) * query(s, l, h, ql, qh, 2*p + 2);
    }
    static class FastReader{
        BufferedReader br;
        StringTokenizer st;
        public FastReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String next(){
            while(st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        int nextInt(){
            return Integer.parseInt(next());
        }
        long nextLong(){
            return Long.parseLong(next());
        }
        double nextDouble(){
            return Double.parseDouble(next());
        }
        String nextLine(){
            String str = "";
            try{
                str = br.readLine();
            } catch (Exception e){
                e.printStackTrace();
            }
            return str;
        }
    }
  public static void main(String[] args)throws Exception{
    FastReader in = new FastReader();
    int n = in.nextInt(), m = in.nextInt();
    int[] a = new int[n];
    int s = 0;
    for(int i = 0; i < n; i++){
      a[i] = in.nextInt();
      s+= a[i];
    }
    Arrays.sort(a, Collections.reverseOrder());
    int min = s / (4 *m);
    boolean ok = true;
    for(int i = 0; i < m; i++){
      if(a[i] < min){
        ok = false;
        break;
      }
    }
    System.out.println((ok)?"Yes":"No");
  }
}

Compiler output:
Main.java:74: error: no suitable method found for sort(int[],Comparator<Object>)
    Arrays.sort(a, Collections.reverseOrder());
          ^
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (inference variable T#1 has incompatible bounds
        equality constraints: int
        upper bounds: Object)
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'a' was not declared in this scope
   16 |     if(a[i]*4*m >= sum){
      |        ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: 's' was not declared in this scope
   17 |     if(a[i]*(4*m) >= s){
      |                      ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'a' was not declared in this scope
   10 |     cin >> a[i];
      |            ^
a.cc:16:22: error: 's' was not declared in this scope
   16 |     if(a[i]*(4*m) >= s){
      |                      ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'a' was not declared in this scope
   10 |     cin >> a[i];
      |            ^
a.cc:15:8: error: 'a' was not declared in this scope
   15 |     if(a[i]*(4*m) >= s){
      |        ^
a.cc:15:22: error: 's' was not declared in this scope
   15 |     if(a[i]*(4*m) >= s){
      |                      ^
Language: C++

#include <iostream>
using namespace std;

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

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

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

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'
Language: C++

#include<bits/stdc++.h>

using namespace std;

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

a.sort(0, N, greater<int>());

int sum = 0;
for(i=0; i<N; i++){
sum += a[i];
}
  
int dt = sum / (M*4);
if(a[M-1] > dt){cout << "Yes"};
else cout << "No";
return 0;  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: request for member 'sort' in 'a', which is of non-class type 'int [110]'
   14 | a.sort(0, N, greater<int>());
      |   ^~~~
a.cc:22:30: error: expected ';' before '}' token
   22 | if(a[M-1] > dt){cout << "Yes"};
      |                              ^
      |                              ;
a.cc:23:1: error: 'else' without a previous 'if'
   23 | else cout << "No";
      | ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

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

a.sort(0, N, greater<int>());

int sum = 0;
for(i=0; i<N; i++){
sum += a[i];
}
  
int dt = sum / (M*4)
if(a[M-1] > dt)cout << "Yes";
else cout << "No";
return 0;  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: request for member 'sort' in 'a', which is of non-class type 'int [110]'
   14 | a.sort(0, N, greater<int>());
      |   ^~~~
a.cc:22:1: error: expected ',' or ';' before 'if'
   22 | if(a[M-1] > dt)cout << "Yes";
      | ^~
a.cc:23:1: error: 'else' without a previous 'if'
   23 | else cout << "No";
      | ^~~~
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];
  for (int i=0; i<N; i++) {
    int sum+=A[i]}
  int counter=0;
  for (int i=0; i<N; i++) {
    if (A[i]>=sum/(4*M)){
      counter++;
    }
  }
  if (counter>=M) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected initializer before '+=' token
    9 |     int sum+=A[i]}
      |            ^~
a.cc:12:15: error: 'sum' was not declared in this scope
   12 |     if (A[i]>=sum/(4*M)){
      |               ^~~
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];
  int counter=0;
  for (int i=0; i<N; i++) {
    if (A[i]>=N/(4*M)){
      counter++;
    }
  }
  if (conter>=M) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'conter' was not declared in this scope; did you mean 'counter'?
   14 |   if (conter>=M) cout<<"Yes"<<endl;
      |       ^~~~~~
      |       counter
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 sum = 0 ;
    	for(int i = 0;i < n; i++){
	    	a[i] = sc.nextInt();
    		sum += a[i];
	    }
     
    	double border = sum*(1d/(4*m));  
		int count = 0;
	    for(int i =0; i <n; i++({
			if(a[i]>= border){
            	count++;
        	}
    	}  
    	if(count >= m){
    		System.out.print("Yes");
    	}else{
        	System.out.print("No");
    	}
    }
}    

Compiler output:
Main.java:4: error: illegal character: '\u3000'
  ?public static void main(String[] args){
  ^
Main.java:17: error: ')' expected
	    for(int i =0; i <n; i++({
	                           ^
Main.java:17: error: illegal start of expression
	    for(int i =0; i <n; i++({
	                            ^
3 errors
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
int MOD = 1000000007;

signed 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];
    }
    
    sum = sum/(4*M);
    
    int cnt = 0;
    for(int i=0;i<N;i++){
        if(A[i] >= sum) cnt++;
    }
    
    if(cnt>=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:6:14: note: to match this '{'
    6 | signed main(){
      |              ^
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+=a[i];
  } //sumNumを求める
  
  for(int j=0; j<n; j++)
  {
    if(a[j]*4*m>=s) c++
  }
  if(c>=m) printf("Yes");
  else printf("No");
  return 0;
}
    
    


Compiler output:
main.c: In function 'main':
main.c:15:24: error: expected ';' before '}' token
   15 |     if(a[j]*4*m>=s) c++
      |                        ^
      |                        ;
   16 |   }
      |   ~
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+=a[i];
  } //sumNumを求める
  
  for(int j=0; j<n; j++)
  {
    if(a[j]*4*m>=s) c++
  }
  if(c>=m) printf("Yes");
  else printf("No");
}
    
    

Compiler output:
main.c: In function 'main':
main.c:15:24: error: expected ';' before '}' token
   15 |     if(a[j]*4*m>=s) c++
      |                        ^
      |                        ;
   16 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;

int main(void){
  int num, selectNum;
  cin >> num >> selectNum;
  int A[num];
  int allVote = 0;
  for(int i = 0; i < num; i++){
    cin >> A[i];
    allVote += A[i];
  }
  int selectedNum = 0;
  for(int i = 0; i < num; i++){
    if(A[i] > (allVote / (4 * selectNum))){
      selectedNum++;
    }
  }
  if(selectedNum >= selectNum){cout << "Yes" << endl;}
  else {cout << "No" << endl;}


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

#include <iostream>
using namespace std;

int main(void){
  int num, selectNum;
  cin >> num >> selectNum;
  int A[num];
  int allVote = 0;
  for(int i = 0; i < num; i++){
    cin >> A[i];
    allVote += A[i];
  }
  int selectedNum = 0;
  for(int i = 0; i < num; i++){
    if(A[i] > (allVote / (4 * selectNum))){
      selectedNum++;
    }
  }
  if(selectedNum >= selectNum) cout << "Yes" << endl;
  else cout << "No" << endl;


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

#include <iostream>
using namespace std;

int main(void){
  int num, selectNum;
  cin >> num >> selectNum;
  int A[num];
  int allVote = 0;
  for(int i = 0; i < num; i++){
    cin >> A[i];
    allVote += A[i];
  }
  int selectedNum = 0;
  for(int i = 0; i < num; i++){
    if(A[i] > (allVote / (4 * selectNum))){
      selectedNum++;
    }
  if(selectedNum >= selectNum) cout << "Yes" << endl;
  else cout << "No" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:19:29: error: expected '}' at end of input
   19 |   else cout << "No" << endl;
      |                             ^
a.cc:14:31: note: to match this '{'
   14 |   for(int i = 0; i < num; i++){
      |                               ^
a.cc:19:29: error: expected '}' at end of input
   19 |   else cout << "No" << endl;
      |                             ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
 
using namespace std;
int main()
{
  int N;
  int M;
  int Ain;
  long sum;
 
  Ain = 0;
  sum = 0;
  
  cin >> N >> M;
  vector<int> AM(M);
 
  // Mまではそのまま挿入
  for(int i=0; i < M; i++){
    cin >> AM[i]; 
    sum += AM[i];
  }
 
  for(int i=0; i < N-M; i++){
    cin >> Ain;
    sum += Ain;
    sort(AM.begin(), AM.end());
    reverse(AM.begin(), AM.end());
    if(AM[M-1] < Ain){
      AM[M-1] = Ain;
    }
  }
  
  if(AM[M-1]*4*M < (sum){
   	cout << "No\n"; 
  }
  else{
   	cout << "Yes\n";  
  }
  
      return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: expected ';' before '{' token
   37 |   if(AM[M-1]*4*M < (sum){
      |                         ^
      |                         ;
a.cc:40:3: error: expected primary-expression before 'else'
   40 |   else{
      |   ^~~~
a.cc:39:4: error: expected ')' before 'else'
   39 |   }
      |    ^
      |    )
   40 |   else{
      |   ~~~~
a.cc:37:5: note: to match this '('
   37 |   if(AM[M-1]*4*M < (sum){
      |     ^
Language: C++

#include<iosteam>
using namespace std;

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

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

int main(void) {
	int N, M, *A, SN = 0;
	int i, count = 0;

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
    5 |         scanf("%d", &N);
      |         ^~~~~
a.cc:8:20: error: 'malloc' was not declared in this scope
    8 |         A = (int *)malloc(N);
      |                    ^~~~~~
a.cc:1:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | int main(void) {
a.cc:19:25: error: 'printf' was not declared in this scope
   19 |         if (count >= M) printf("Yes\n");
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void) {
a.cc:20:14: error: 'printf' was not declared in this scope
   20 |         else printf("No\n");
      |              ^~~~~~
a.cc:20:14: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:22:9: error: 'free' was not declared in this scope
   22 |         free(A);
      |         ^~~~
a.cc:22:9: note: 'free' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
using LL = long long;
int main(int argc, char *argv[])
{
    int n,m;
    cin >> n >>m ;
    vector<int> v;
    LL total = 0;
    while(n--)
    {
        int x;
        cin >> x;
        v.push_back(x);
        total += x;
    }
    for(auto i : v)
    {
        if(i * 4 * m >= sum) m--;
    }
    if(m >0)
        cout<<"No"<<endl;
    else
        cout<<"Yes"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:19:25: error: 'sum' was not declared in this scope
   19 |         if(i * 4 * m >= sum) m--;
      |                         ^~~
Language: Java

public class Main {
public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		int[] p = new int[n];
		int sotoku = 0;
		int pop = 0;
		int comp = 0;


		for (int i = 0; i < n; i ++){
			p[i] = sc.nextInt();
			sotoku = sotoku + p[i];
		}

		if (sotoku % (4 * m) == 0){
			comp = sotoku / (4 * m);
		} else {
			comp = sotoku / (4 * m) + 1;
		}

		for (int point : p){
			if (point >= comp){
				pop ++;
			}
		}

		if (pop >= m){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}



	}

}


Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'M' was not declared in this scope
    4 |   int N;M;
      |         ^
Language: C++

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

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

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


Compiler output:
main.c: In function 'main':
main.c:6:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'double'
    6 |     double sum=0;
      |     ^~~~~~
main.c:7:7: error: 'i' undeclared (first use in this function)
    7 |   for(i=0;A[i]!='\0';i++){
      |       ^
main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:9: error: 'sum' undeclared (first use in this function)
    9 |         sum+=A[i];
      |         ^~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:12:42: error: expected statement before ')' token
   12 |      if((double)A[i]/sum>(double)1/(4*M))){
      |                                          ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:12:9: error: expected expression before 'double'
   12 |      if(double (A[i]/sum)>double (1/(4*M))){
      |         ^~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:11:4: error: expected ',' or ';' before 'for'
   11 |    for(i=0;A[i]!='\0';i++){
      |    ^~~
main.c:11:26: error: expected ';' before ')' token
   11 |    for(i=0;A[i]!='\0';i++){
      |                          ^
      |                          ;
main.c:11:26: error: expected statement before ')' token
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[] vote = new int[N];
    int sum = 0;
    for(int i=0; i<N; i++){
      int tmp = sc.nextInt();
      vote[i] = tmp;
      sum += tmp;
    }
    double AVG = sum*(0.25*M);
    int cnt = 0;
    for(int i=0; i<N; i++){
      if(vote[i] < AVG);
      else cnt++;
      }
    }
    if(cnt<M)System.out.print("No");
  	else System.out.print("Yes");
  }
}
    
    


Compiler output:
Main.java:21: error: illegal start of type
    if(cnt<M)System.out.print("No");
    ^
Main.java:21: error: > or ',' expected
    if(cnt<M)System.out.print("No");
            ^
Main.java:21: error: <identifier> expected
    if(cnt<M)System.out.print("No");
                             ^
Main.java:21: error: illegal start of type
    if(cnt<M)System.out.print("No");
                              ^
Main.java:22: error: illegal start of type
  	else System.out.print("Yes");
  	^
Main.java:22: error: <identifier> expected
  	else System.out.print("Yes");
  	                     ^
Main.java:22: error: illegal start of type
  	else System.out.print("Yes");
  	                      ^
Main.java:24: error: class, interface, enum, or record expected
}
^
8 errors
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[] vote = new int[N];
    int sum = 0;
    for(int i=0; i<N; i++){
      int tmp = sc.nextInt();
      vote[i] = tmp;
      sum += tmp;
    }
    Arryas.sort(vote);
    double AVG = sum*(0.25*M);
    int cnt = 0;
    for(int i=0; i<N; i++){
      if(vote[i] < AVG);
      else cnt++;
      
      if(cnt>=M){
        System.out.print("Yes");
        return;
      }
    }
    System.out.print("No");
  }
}
    
    

Compiler output:
Main.java:14: error: cannot find symbol
    Arryas.sort(vote);
    ^
  symbol:   variable Arryas
  location: class Main
1 error
Language: C++

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

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

int main() {
  	fastio;
    int n, m;
    cin >> n >> m;
    int a[n];
    for(int i = 0; i < n; ++i) cin >> a[i];
    int min = sum(a, a+n);
	int count = 0;
	for(int i = 0; i < n; ++i) {
		if(a[i] * 4 * m >= min) count++;
	}

	cout << (count >= m) ? "YES" : "NO";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'sum' was not declared in this scope
   12 |     int min = sum(a, a+n);
      |               ^~~
Language: C

#include <stdio.h>

int main()
{
  int n,m,total,count;
  scanf("%d%d",&n,&m);
  int li[1001];
  for (int i = 0;i < n;i++)
  {
    scanf("%d",&li[i]);
    total += li[i];
  }
  for (int i = 0;i < n;i++)
    if (li[i] >= 1/(4*m)*total)
      count += 1;
  if (count >= m)
    print("Yes");
  else
    print("No");
  

Compiler output:
main.c: In function 'main':
main.c:17:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   17 |     print("Yes");
      |     ^~~~~
      |     printf
main.c:19:5: error: expected declaration or statement at end of input
   19 |     print("No");
      |     ^~~~~