criyle/codenet-compile-errors huggingface dataset:
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[] a = new int[n];
    int a = 0;
    
    for(int i=0;i<n;i++){
      a[i] = sc.nextInt();
      b = b+a[i];
    }
    
    Arrays.sort(a);
    
    int ms = 0;
    
    for(int j=0;j<m;j++){
      ms = ms+a[n-m+j];
    }
    
    int line = 1/(4*m);
    
    if(ms<b*line){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
}


Compiler output:
Main.java:10: error: variable a is already defined in method main(String[])
    int a = 0;
        ^
Main.java:13: error: array required, but int found
      a[i] = sc.nextInt();
       ^
Main.java:14: error: cannot find symbol
      b = b+a[i];
      ^
  symbol:   variable b
  location: class Main
Main.java:14: error: cannot find symbol
      b = b+a[i];
          ^
  symbol:   variable b
  location: class Main
Main.java:14: error: array required, but int found
      b = b+a[i];
             ^
Main.java:17: error: no suitable method found for sort(int)
    Arrays.sort(a);
          ^
    method Arrays.sort(int[]) is not applicable
      (argument mismatch; int cannot be converted to int[])
    method Arrays.sort(long[]) is not applicable
      (argument mismatch; int cannot be converted to long[])
    method Arrays.sort(short[]) is not applicable
      (argument mismatch; int cannot be converted to short[])
    method Arrays.sort(char[]) is not applicable
      (argument mismatch; int cannot be converted to char[])
    method Arrays.sort(byte[]) is not applicable
      (argument mismatch; int cannot be converted to byte[])
    method Arrays.sort(float[]) is not applicable
      (argument mismatch; int cannot be converted to float[])
    method Arrays.sort(double[]) is not applicable
      (argument mismatch; int cannot be converted to double[])
    method Arrays.sort(Object[]) is not applicable
      (argument mismatch; int cannot be converted to Object[])
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    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>)
Main.java:22: error: array required, but int found
      ms = ms+a[n-m+j];
               ^
Main.java:27: error: cannot find symbol
    if(ms<b*line){
          ^
  symbol:   variable b
  location: class Main
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
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[] a = new int[n];
    int a = 0;
    
    for(int i=0;i<n;i++){
      a[i] = sc.nextInt();
      a = a+a[i];
    }
    
    Arrays.sort(a);
    
    int ms = 0;
    
    for(int j=0;j<m;j++){
      ms = ms+a[n-m+j];
    }
    
    int line = 1/(4*m);
    
    if(ms<a*line){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
}
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[] a = new int[n];
    int a = 0;
    
    for(int i=0;i<n;i++){
      a[i] = sc.nextInt();
      b = b+a[i];
    }
    
    Arrays.sort(a);
    
    int ms = 0;
    
    for(int j=0;j<m;j++){
      ms = ms+a[n-m+j];
    }
    
    int line = 1/(4*m);
    
    if(ms<b*line){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
}

Compiler output:
Main.java:34: error: class, interface, enum, or record expected
import java.util.*;
^
1 error
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[] a = new int[n];
    int a = 0;
    
    for(int i=0;i<n;i++){
      a[i] = sc.nextInt();
      a = a+a[i];
    }
    
    Arrays.sort(a);
    
    int ms = 0;
    
    for(int j=0;j<m;j++){
      ms = ms+a[n-m+j];
    }
    
    int line = 1/(4*m);
    
    if(ms<a*line){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
}

Compiler output:
Main.java:10: error: variable a is already defined in method main(String[])
    int a = 0;
        ^
Main.java:13: error: array required, but int found
      a[i] = sc.nextInt();
       ^
Main.java:14: error: array required, but int found
      a = a+a[i];
             ^
Main.java:17: error: no suitable method found for sort(int)
    Arrays.sort(a);
          ^
    method Arrays.sort(int[]) is not applicable
      (argument mismatch; int cannot be converted to int[])
    method Arrays.sort(long[]) is not applicable
      (argument mismatch; int cannot be converted to long[])
    method Arrays.sort(short[]) is not applicable
      (argument mismatch; int cannot be converted to short[])
    method Arrays.sort(char[]) is not applicable
      (argument mismatch; int cannot be converted to char[])
    method Arrays.sort(byte[]) is not applicable
      (argument mismatch; int cannot be converted to byte[])
    method Arrays.sort(float[]) is not applicable
      (argument mismatch; int cannot be converted to float[])
    method Arrays.sort(double[]) is not applicable
      (argument mismatch; int cannot be converted to double[])
    method Arrays.sort(Object[]) is not applicable
      (argument mismatch; int cannot be converted to Object[])
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    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>)
Main.java:22: error: array required, but int found
      ms = ms+a[n-m+j];
               ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
5 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[] a = new int[n];
    
    for(int i=0;i<n;i++){
      a[i] = sc.nextInt();
    }
    
    Arrays.sort(a);
    
    int ms = 0;
    
    for(int j=0;j<m;j++){
      ms = ms+a[n-m+j];
    }
    
    if(ms<1/(4*M)){
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
}

    
   

Compiler output:
Main.java:23: error: cannot find symbol
    if(ms<1/(4*M)){
               ^
  symbol:   variable M
  location: class Main
1 error
Language: Java


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

public class B {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = Integer.parseInt(scan.next());
        int m = Integer.parseInt(scan.next());

        Integer[] a = new Integer[n];
        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(scan.next());
        }

        scan.close();

        int sum = 0;
        for (int i : a) {
            sum += i;
        }

        int border = (sum + (4 * m) - 1) / (4 * m);

        Arrays.sort(a, Collections.reverseOrder());

        if (a[m - 1] >= border) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }

    }

}


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

#include <stdio.h>
#include <string.h>
#include <vector>
#include <numeric>
#include <functional>

using namespace std;


int main() {
  int n, m;
  scanf("%d %d", &n, &m);

  vector<int> a;
  int x;
  for (int i=0;i<n;++i) {
    scanf("%d", &x);
    a.push_back(x);
  }

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

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


  if (a[m - 1] * 4 * m > sum)
    printf("Yes");
  else
    printf("No");

  return 0;
}


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

#include <stdio.h>
#include <string.h>
#include <vector>
#include <numeric>

using namespace std;


int main() {
  int n, m;
  scanf("%d %d", &n, &m);

  vector<int> a;
  int x;
  for (int i=0;i<n;++i) {
    scanf("%d", &x);
    a.push_back(x);
  }

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

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


  if (a[m - 1] * 4 * m > sum)
    printf("Yes");
  else
    printf("No");

  return 0;
}


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(a.begin(), a.end(), greater<int>());
      |   ^~~~
      |   short
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:42: error: expected ',' or ';' before ')' token
    9 |   double thresh = (double)N/((double)4*M));
      |                                          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:42: error: expected ',' or ';' before ')' token
    9 |   double thresh = (double)N/((double)4*M))
      |                                          ^
a.cc:10:19: error: 'i' was not declared in this scope
   10 |   for (int i = 1; i<=N; i++){
      |                   ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    8 |     for(register int i=1;i<=n;i++)
      |                      ^
a.cc:9:26: error: expected ';' before 'for'
    9 |         cin>>a[i],s+=a[i]
      |                          ^
      |                          ;
   10 |     for(register int i=1;i<=n;i++)
      |     ~~~                   
a.cc:10:26: error: 'i' was not declared in this scope
   10 |     for(register int i=1;i<=n;i++)
      |                          ^
Language: C++

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

Compiler output:
a.cc:5:1: error: expected initializer before 'int'
    5 | int main()
      | ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    7 |     for(register double i=1;i<=n;i++)
      |                         ^
a.cc:8:15: error: invalid types 'double [10005][double]' for array subscript
    8 |         cin>>a[i],s+=a[i]
      |               ^
a.cc:8:23: error: invalid types 'double [10005][double]' for array subscript
    8 |         cin>>a[i],s+=a[i]
      |                       ^
a.cc:9:29: error: 'i' was not declared in this scope
    9 |     for(register double i=1;i<=n;i++)
      |                             ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'cont' was not declared in this scope; did you mean 'count'?
   19 |   if (cont >= n) cout << "Yes" << endl;
      |       ^~~~
      |       count
Language: C++

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

using namespace std;

int main(){
    int n,m;
    int a[110];
    cin>>n>>m;
    int sum=0;
    for(int i=0;i<n;i++){
        cin>>a[i];
        sum+=a[i];
    }
    
    int tmp;
    sort(a,a+n,greater<int>());
    int toku=(a[m-1]*4*m);
    

    if(toku>=sum)
        cout<<"YES"<<endl;   
    else
        cout<<"NO"<<endl;  
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:29: error: expected ';' before 'c'
   17 |         if(a[i]>=(sum/(4*m))
      |                             ^
      |                             ;
   18 |       c++;
      |       ~                      
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^
a.cc:18:11: error: expected ')' before '}' token
   18 |       c++;
      |           ^
      |           )
   19 |   }
      |   ~        
a.cc:17:11: note: to match this '('
   17 |         if(a[i]>=(sum/(4*m))
      |           ^
a.cc:19:3: error: expected primary-expression before '}' token
   19 |   }
      |   ^
Language: C++

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

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

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






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

#include <iostream>
using namespace std;

int main(){
 	int N,M;
  cin>>N,M;
  double A = new double[N];
  double total = 0;
  double shresh = 1.0/4.0*M;
  int count = M;
  for(int i = 0; i < N;i++){
  	cin>>A[i];
    total += A[i];
  }
  shresh *= total;
  for(int i = 0; i<N;i++){
    if(!count) {
     cout<<"Yes";
      return 0;
    }
    if(A[i] >= shresh) count--;   	
  }	
  cout<<"No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: cannot convert 'double*' to 'double' in initialization
    7 |   double A = new double[N];
      |                          ^
      |                          |
      |                          double*
a.cc:12:15: error: invalid types 'double[int]' for array subscript
   12 |         cin>>A[i];
      |               ^
a.cc:13:15: error: invalid types 'double[int]' for array subscript
   13 |     total += A[i];
      |               ^
a.cc:21:9: error: invalid types 'double[int]' for array subscript
   21 |     if(A[i] >= shresh) count--;
      |         ^
Language: C++

//nani?
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#include <ext/pb_ds/detail/standard_policies.hpp>
#define pi acos(-1);
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define f(i,a,b) for( int i = a; i < b ; i++ ) 
#define sor(a) sort( a.begin(), a.end() )
#define rsor(a) sort( a.rbegin(), a.rend() )
#define fastio ios_base::sync_with_stdio(0);cin.tie(0)
//#define inf 1LL<<62
typedef long long ll;
typedef double ld;
using namespace std;
const int inf=1e7;
const ll MOD=1e9+7;
const ll mod=998244353;
// ac cmtr;
const int MAX_N = 1e5+5;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << endl;}
 
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1<<" | ";
  __f(comma+1, args...);}
#else
#define trace(...)
#endif
//---------------------------

ll a[MAX_N];

int main(){
    fastio;
    ll n,m;
    cin>>n>>m;
    ll sum=0;
    ll cont=0;
    f(i,0,n) {cin>>a[i];sum+=a[i];}
    ll val = ceir(sum/(4*m));
    bool ok=true;
    f(i,0,n){
        if(a[i]>val) {cont++;}
    }
    if(cont>=m) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:50:14: error: 'ceir' was not declared in this scope; did you mean 'ceil'?
   50 |     ll val = ceir(sum/(4*m));
      |              ^~~~
      |              ceil
Language: C++

#include <vector>
#include <cmath>
#include <map>
#include <iomanip>
typedef long long ll;
#define rep(i,a,b) for(int i=a;i<b;++i)
#define rrep(i,a,b) for(int i=a;i>=b;--i)
using namespace std;
using vi = vector<int>;
using vll = vector<ll>;
ll mod = 1e9 + 7;
 
using namespace std;
using Graph = vector<vector<int>>;
Graph G;
 
/*int cnt_digit(ll N)
{
	int digit = 0;
 
	while (N > 0)
	{
		N /= 10;
		digit++;
	}
	return digit;
}
 
int n;
vll a;
 
ll solve(bool isp)
{
	ll sum = 0ll;
	ll ret = 0ll;
 
	for (int i = 0; i < n; i++)
	{
		sum += a[i];
		if (isp and sum <= 0)
		{
			ret += -sum + 1;
			sum = 1ll;
		}
		if (not isp and sum >= 0)
		{
			ret += sum + 1;
			sum = -1ll;
		}
		isp ^= 1;
	}
	return ret;
}
 
*/
int main()
{
	//cin.tie(0);
	//ios::sync_with_stdio(false);
	/*
	swap(a, b);
	swap(a, c);
 
	ll N, K;
	cin >> N >> K;
	int ans = 0;
	while (N>=0)
	{
		ans = abs(N - K)%mod;
		if (ans >= N)
		{
			ans = N;
			break;
		}
		else if (ans == 0)
		{
			break;
		}
		N = ans;
		
	}
 
	cout << ans << endl;*/
	ll N, M;
	cin >> N >> M;
	vector<ll> data(N);
	ll sum = 0;
	for (int i = 0; i < N; i++)
	{
		cin >> data[i];
		sum += data[i];
	}
	ll cnt = 0;
	for (auto& i : data)
	{
		if (i >= sum / (4 * M)) cnt++;
	}
	
	if (cnt>=M)
	{
		cout << "Yes" << endl;
 
	}
	else
	{
		cout << "No" << endl;
	}
	
	return 0;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:85:9: error: 'cin' was not declared in this scope
   85 |         cin >> N >> M;
      |         ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <iomanip>
  +++ |+#include <iostream>
    5 | typedef long long ll;
a.cc:101:17: error: 'cout' was not declared in this scope
  101 |                 cout << "Yes" << endl;
      |                 ^~~~
a.cc:101:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:106:17: error: 'cout' was not declared in this scope
  106 |                 cout << "No" << endl;
      |                 ^~~~
a.cc:106:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java

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

public class B {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Integer> al = new ArrayList<Integer>();

        int N = sc.nextInt();
        int M = sc.nextInt();
        for (int i = 0; i < N; i++) {
            al.add(sc.nextInt());
        }

        for (int j = 0; j < M; j++) {
            if (al.get(j) == (1/4*M)) {
                System.out.println("Yes");
            }
            
            else {
                System.out.println("No");
            }
        }
    }
}


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

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

int main(){
	// sengen
	double n,m;

	// nyuryoku
	cin >> n >> m;
	int a[n];
	for(int i=0;i<n;i++){
		 cin >> a[i];
	}
	// keisan
	sort(a,a+n,greater<int>());
	double sum=0;
	for(int i=0;i<n;i++){
		sum += a[i];
	}
	double waru = 4*m;
	double suki=sum/waru;
	if(a[m-1] >= suki){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   11 |         int a[n];
      |               ^
a.cc:11:15: error: could not convert 'n' from 'double' to 'long unsigned int'
   11 |         int a[n];
      |               ^
      |               |
      |               double
a.cc:11:15: error: size of array 'a' has non-integral type 'double'
a.cc:16:17: error: invalid operands of types 'int [1]' and 'double' to binary 'operator+'
   16 |         sort(a,a+n,greater<int>());
      |                ~^~
      |                | |
      |                | double
      |                int [1]
a.cc:23:13: error: invalid types 'int [1][double]' for array subscript
   23 |         if(a[m-1] >= suki){
      |             ^
Language: C++

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

int main(){
	// sengen
	double n,m;

	// nyuryoku
	cin >> n >> m;
	double a[n];
	for(int i=0;i<n;i++){
		 cin >> a[i];
	}
	// keisan
	sort(a,a+n,greater<double>());
	int sum=0;
	for(int i=0;i<n;i++){
		sum += a[i];
	}
	double waru = 4*m;
	double suki=sum/waru;
	if(a[m-1] >= suki){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   11 |         double a[n];
      |                  ^
a.cc:11:18: error: could not convert 'n' from 'double' to 'long unsigned int'
   11 |         double a[n];
      |                  ^
      |                  |
      |                  double
a.cc:11:18: error: size of array 'a' has non-integral type 'double'
a.cc:16:17: error: invalid operands of types 'double [1]' and 'double' to binary 'operator+'
   16 |         sort(a,a+n,greater<double>());
      |                ~^~
      |                | |
      |                | double
      |                double [1]
a.cc:23:13: error: invalid types 'double [1][double]' for array subscript
   23 |         if(a[m-1] >= suki){
      |             ^
Language: C++

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

int main()
{
  int n,m;
  cin>>n>>m;
  vector<int> ans;
  float sum=0;
  for(int i=0;i<n;i++)
  {
    int x;cin>>x;
    sum+=x;
    ans.push_back(x);
    
  }
  sum/4;sum/M;
  int cnt=0;
  for(int i=0;i<ans.size();i++)
  {
    if(ans[i]>=sum) cnt++;
  }
  if(cnt>=m) cout<<"YES";
  else cout<<"NO";
    
}


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

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int n,m;
  cin>>n>>m;
  vector<int> ans;
  float sum=0;
  for(int i=0;i<n;i++)
  {
    int x;cin>>x;
    sum+=x;
    ans.push_back(x);
    
  }
  sum/4;sum/M;
  int cnt=0;
  for(int i=0;i<ans.size();i++)
  {
    if(ans[i]>=sum) cnt++;
  }
  if(cnt>=m) cout<<"YES";
  else cout<<"NO";
    
}
#include<bits/stdc++.h>
using namespace std;

int main()
{
  int n,m;
  cin>>n>>m;
  vector<int> ans;
  float sum=0;
  for(int i=0;i<n;i++)
  {
    int x;cin>>x;
    sum+=x;
    ans.push_back(x);
    
  }
  sum/4;sum/m;
  int cnt=0;
  for(int i=0;i<ans.size();i++)
  {
    if(ans[i]>=sum) cnt++;
  }
  if(cnt>=m) cout<<"YES";
  else cout<<"NO";
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'M' was not declared in this scope
   17 |   sum/4;sum/M;
      |             ^
a.cc: At global scope:
a.cc:30:5: error: redefinition of 'int main()'
   30 | int main()
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main()
      |     ^~~~
Language: C++

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

int main()
{
  int n,m;
  cin>>n>>m;
  vector<int> ans;
  float sum=0;
  for(int i=0;i<n;i++)
  {
    int x;cin>>x;
    sum+=x;
    ans.push_back(x);
    
  }
  sum/4;sum/M;
  int cnt=0;
  for(int i=0;i<ans.size();i++)
  {
    if(ans[i]>=sum) cnt++;
  }
  if(cnt>=m) cout<<"YES";
  else cout<<"NO";
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'M' was not declared in this scope
   17 |   sum/4;sum/M;
      |             ^
Language: Java

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

Compiler output:
Main.java:14: error: incompatible types: possible lossy conversion from double to long
    long cap=total/(4.0*M);
                  ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,m;
  cin >> n >>m;
int sum;
vector<int>A(n);
for(int i = 0;i < n;i++){
  cin >> A[i];
  sum += A[i];
}
sort(A.begin(),A.end());
double p = sum/(4*m)
if( A[n-m] < p){
  cout << "No" <<endl;
}
else{
  cout << "Yes" <<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:1: error: expected ',' or ';' before 'if'
   14 | if( A[n-m] < p){
      | ^~
a.cc:17:1: error: 'else' without a previous 'if'
   17 | else{
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,m;
  cin >> n >>m;
int sum;
vector<int>A(n);
for(int i = 0;i < n;i++){
  cin >> A[i];
  sum += A[i];
}
sort(A.begin(),A.end());

if(double A[n-m] < sum/(4*m)){
  cout << "No" <<endl;
}
else{
  cout << "Yes" <<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: condition declares an array
   14 | if(double A[n-m] < sum/(4*m)){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,m;
  cin >> n >>m;
int sum;
vector<int>A(n);
for(int i = 0;i < n;i++){
  cin >> A[i];
  sum += A[i];
}
sort(A.begin(),A.end());

if(A[n-m] =>sum/(4*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(A[n-m] =>sum/(4*m)){
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include<algorithm>
using namespace std;
int main(void){
    int n,m;
    cin >> n >> m;
    vector<int> a(n);
    
    for(int i = 0;i < n;i++){
        cin >> a[i];
        sum += a[i];
    }
    sort(a.begin(),a.end());
    int popu = 0;
    for(int i = 0;i < m;i++){
        popu += a[i];
    }
    if(pop >= sum / (4 * m) ){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'sum' was not declared in this scope
   12 |         sum += a[i];
      |         ^~~
a.cc:19:8: error: 'pop' was not declared in this scope; did you mean 'popu'?
   19 |     if(pop >= sum / (4 * m) ){
      |        ^~~
      |        popu
a.cc:19:15: error: 'sum' was not declared in this scope
   19 |     if(pop >= sum / (4 * m) ){
      |               ^~~
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[i];
     
     int sum=0;
     
     for(int i = 0; i<N; i++)  sum+=a[i];
     
     int count=0;
     
     
     for(int i = 0; i<N; i++){
         if(a[i]>=sum/(4*M))  count++;
     }
        if(count>=M) cout <<"Yes"<< '\n';
        else cout <<"No"<< '\n';
      
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 'n' was not declared in this scope
   10 |      vector<int> a(n);
      |                    ^
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    double n=sc.nextInt(),m=sc.nextInt(),sum=0;
    int[] a=new int[n];
    for(int i=0;i<n;i++) {
    	a[i]=sc.nextInt();
    	sum+=a[i];
    }
    double f=sum/(4*m);
    boolean flag=true;
    for(int i=0;i<n;i++) {
    	if(a[i]<f) {
    		flag=false;
    	}
    }
    if(flag) {
    	System.out.println("Yes");
    }else {
    	System.out.println("No");
    }
  }
}


Compiler output:
Main.java:6: error: incompatible types: possible lossy conversion from double to int
    int[] a=new int[n];
                    ^
1 error
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:35: error: expected ')' before '{' token
   12 |         for (int i = 0; i < N; i++ {
      |             ~                     ^~
      |                                   )
Language: C++

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

int main () {
	int N, M;
  	cin >> N, M;
  	vector<int> vote(N)
      int sum = 0;
  	for (int i = 0; i < N; i++) {
    int a;
      cin >> a;
      vote.at(i) = a;
      sum += a;
    }
  int count = 0;
  for (int i = 0; i < N; i++) {
  if (4*M*vote.at(i) >= sum) {
  count++;
  }
  }
  if(count >= M ) {
  cout << "Yes" << endl;
  }
  else {
  cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: expected ',' or ';' before 'int'
    8 |       int sum = 0;
      |       ^~~
a.cc:13:7: error: 'sum' was not declared in this scope
   13 |       sum += a;
      |       ^~~
a.cc:17:25: error: 'sum' was not declared in this scope
   17 |   if (4*M*vote.at(i) >= sum) {
      |                         ^~~
Language: C++

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

int main () {
	int N, M;
  	cin >> N, M;
  	vector<int> vote()
      int sum = 0;
  	for (int i = 0; i < N; i++) {
    int a;
      cin >> a;
      vote.at(i) = a;
      sum += a;
    }
  int count = 0;
  for (int i = 0; i < N; i++) {
  if (4*M*vote.at(i) >= sum) {
  count++;
  }
  }
  if(count >= M ) {
  cout << "Yes" << endl;
  }
  else {
  cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    7 |         vector<int> vote()
      |                         ^~
a.cc:7:25: note: remove parentheses to default-initialize a variable
    7 |         vector<int> vote()
      |                         ^~
      |                         --
a.cc:8:7: error: expected initializer before 'int'
    8 |       int sum = 0;
      |       ^~~
a.cc:12:7: error: 'vote' was not declared in this scope
   12 |       vote.at(i) = a;
      |       ^~~~
a.cc:13:7: error: 'sum' was not declared in this scope
   13 |       sum += a;
      |       ^~~
a.cc:17:11: error: 'vote' was not declared in this scope
   17 |   if (4*M*vote.at(i) >= sum) {
      |           ^~~~
a.cc:17:25: error: 'sum' was not declared in this scope
   17 |   if (4*M*vote.at(i) >= sum) {
      |                         ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int n,m;
  cin>>n>>m;
  int arr[n];
  int sum=0;
  for(int i=0;i<n;i++){
    cin>>arr[i];
    sum+=arr[i];
  }
 int rt = (1/4)*(1/m)*(sum);
    bool tt=false;
    for(int i=0;i<n;i++){
      if(arr[i]>sum){
        tt=true;
        cout<<"Yes";
        break;
   if(!tt){
     cout<<"No";
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:14:25: note: to match this '{'
   14 |     for(int i=0;i<n;i++){
      |                         ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int n,m;
  cin>>n>>m;
  int arr[n];
  map<int,int> mm;
  for(int i=0;i<n;i++){
    cin>>arr[i];
    sum+=arr[i];
    mm[arr[i]]++;
 int rt = (1/4)*(1/m)*(sum);
    bool tt=false;
    for(int i=0;i<n;i++){
      if(arr[i]>sum){
        tt=true;
        cout<<"YES";
        break;
   if(!tt){
     cout<<"NO";
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'sum' was not declared in this scope
   10 |     sum+=arr[i];
      |     ^~~
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:14:25: note: to match this '{'
   14 |     for(int i=0;i<n;i++){
      |                         ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:8:23: note: to match this '{'
    8 |   for(int i=0;i<n;i++){
      |                       ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

int main()
{
	int N,M;
    bool flag = true;
  
    cin<< N;
  	cin<< M;
  
  	int votes[N];
  
  	for(int i=0;i<N;i++)
    {
      cin<<votes[i];
      if(votes[i]< double(1/4*M)*N)
        flag = false;
    }
  
  	if(flag == false)
      cout>>"Yes";
    else cout>>'No';
  
}

Compiler output:
a.cc:20:16: warning: multi-character character constant [-Wmultichar]
   20 |     else cout>>'No';
      |                ^~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin<< N;
      |     ^~~
a.cc:19:7: error: 'cout' was not declared in this scope
   19 |       cout>>"Yes";
      |       ^~~~
a.cc:20:10: error: 'cout' was not declared in this scope
   20 |     else cout>>'No';
      |          ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;
int main(void){
    int n,m
    cin >> n >> m;
    vector<int> a;
    int sum = 0;
    for(int i = 0;i < n;i++){
        cin >> a[i];
        sum += a[i];
    }
    int ans = 0;
    for(int i = 0;i < n;i++){
        if(a[i] >= sum / (m * 4))ans+++
    }
    if(anx >= m){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'cin'
    7 |     cin >> n >> m;
      |     ^~~
a.cc:16:27: error: 'm' was not declared in this scope
   16 |         if(a[i] >= sum / (m * 4))ans+++
      |                           ^
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:18:8: error: 'anx' was not declared in this scope; did you mean 'ans'?
   18 |     if(anx >= m){
      |        ^~~
      |        ans
a.cc:18:15: error: 'm' was not declared in this scope
   18 |     if(anx >= m){
      |               ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:29:7: error: break statement not within loop or switch
   29 |       break;
      |       ^~~~~
Language: C

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main()
{
  long int n,m,a[10000];
  scanf("%ld %ld",&n,&m);
  long int i;
  for(i=0;i<n;i++)
  {
    scanf("%ld ",&a[i]);
  }
  long int s=0;
  for(i=0;i<n;i++)
  {
    s=s+a[i];
  }
  long int p,s1=0;
  p=ceil(1.0*s/(4*m)));
  for(i=0;i<n;i++)
  {
    if(a[i]>=p)
    {
      s1=s1+1;
    }
  }
  if(s1>=m)
  {
    printf("Yes");
      break;
  
    }
  
 
  if(c<m)
    printf("No");
  
}

Compiler output:
main.c: In function 'main':
main.c:19:22: error: expected ';' before ')' token
   19 |   p=ceil(1.0*s/(4*m)));
      |                      ^
      |                      ;
main.c:19:22: error: expected statement before ')' token
main.c:30:7: error: break statement not within loop or switch
   30 |       break;
      |       ^~~~~
main.c:35:6: error: 'c' undeclared (first use in this function)
   35 |   if(c<m)
      |      ^
main.c:35:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 9999999999999999;
using ll = long long;
int main(){
  int N,M;
  cin>>N>>M;
  int a[N];
  int susum = 0;
  for(int i = 0;i<N;i++){
    cin>>a[i];
    susum += a[i];
  }
  if(susum%(4*M) == 0){
    susum /= (4*M);
    int ans = 0;
    for(int i = 0;i<N;i++){
      if(a[i]>=susum){
        ans++;
      }
    }
    if(ans>=M){
      cout << "Yes" << endl;
    }
    else{
      cout << "No" << endl;
    }
  }
  else{
    susum /= (4*M);
    int ans = 0;
    for(int i = 0;i<N;i++){
      if(a[i]>susum){
        ans++;
      }
    }
    if(ans>=M){
      cout << "Yes" << endl;
    }
    else{
      cout << "No" << endl;
    }
  }

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  int n,m,sum;
  cin>>n>>m;
  vector<int> v(n);
  sum=0;
  for(int i=0;i<n;i++) {
    cin>>v[i];
    sum+=v[i];
  }
  int w=sum/(4*m);
  int rem=sum%(4*m);
  if(rem!=0) w++:
  int c=0;
  for(int i=0;i<n;i++)
		if(v[i]>=w) c++;
  if(c>=m) cout<<"Yes";
  else cout<<"No";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' before ':' token
   16 |   if(rem!=0) w++:
      |                 ^
      |                 ;
a.cc:19:29: error: 'c' was not declared in this scope
   19 |                 if(v[i]>=w) c++;
      |                             ^
a.cc:20:6: error: 'c' was not declared in this scope
   20 |   if(c>=m) cout<<"Yes";
      |      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  ios:;sync_with_stdio(false); cin.tie(0); cout.tie(0);
  int n,m,sum;
  cin>>n>>m;
  vector<int> v(n);
  sum=0;
  for(int i=0;i<n;i++) {
    cin>>v[i];
    sum+=v[i];
  }
  int w=sum/(4*m);
  int rem=sum%(4*m);
  if(rem!=0) w++;
  int c=0;
  for(int i=0;i<n;i++)
		if(v[i]>w) c++;
  if(c>=m) cout<<"Yes";
  else cout<<"No";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'sync_with_stdio' was not declared in this scope
    5 |   ios:;sync_with_stdio(false); cin.tie(0); cout.tie(0);
      |        ^~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  ios:;sync_with_stdio(false); cin.tie(0); cout.tie(0);
  int n,m,sum;
  cin>>n>>m;
  vector<int> v(n);
  sum=0;
  for(int i=0;i<n;i++) {
    cin>>v[i];
    sum+=v[i];
  }
  int w=sum/(4*m);
  int c=0;
  for(int i=0;i<n;i++)
		if(v[i]>=w) c++;
  if(c>=m) cout<<"Yes";
  else cout<<"No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'sync_with_stdio' was not declared in this scope
    5 |   ios:;sync_with_stdio(false); cin.tie(0); cout.tie(0);
      |        ^~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef		long long       ll;
typedef         long double      dl;
#define		pb              push_back
#define		PB              pop_back
#define		nn              "\n"
#define     O_O             ios_base::sync_with_stdio(false); cin.tie(NULL)
#define		all(p)          p.begin(),p.end()
#define		zz(v)           (ll)v.size()
#define		ss              ' '
#define         arrsize(a)      (sizeof(a)/sizeof(a[0]))
//#define       arrsize(a)      (sizeof(a)/sizeof(*a))
#define 	S(a)            scanf("%lld",&a)
#define 	SS(a,b)         scanf("%lld %lld",&a,&b)
#define 	SSS(a,b,c)      scanf("%lld %lld %lld",&a,&b,&c)
#define		gcd(a,b)        __gcd(a,b)
#define		lcm(a,b)        (a*b)/gcd(a,b)
#define		pi              acos(-1.0)
typedef        pair <int, int>   pii;
typedef       pair <ll, ll>      pll;
typedef      vector< pair <ll, ll> >      vpll;
typedef		vector<ll>      vll;
typedef		map<string,ll>      msl;
typedef		map<ll,ll>      mll;
//#define sort(x) sort(x.begin(), x.end())
#define MAX 1000005
 
 
int main()
{
//O_O ;
    ll ar[10000];
    ll n,m;
    cin>>n>>m;
    ll ans=0;
    for(ll i=1; i<=n; i++)
    {
        cin>>ar[i];
        ans+=ar[i];
    }
    sort(ar,ar+n+1);
    //for(ll i=1; i<=n; i++)
      //  cout<<ar[i]<<nn;
    dl temp2=1.0/(4*m);
    temp=(ans*temp2);
  //  cout<<temp<<nn;
    //cout<<temp<<nn;
    if(ar[n-m+1]>=temp)
        cout<<"Yes"<<nn;
    else
        cout<<"No"<<nn;
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:5: error: 'temp' was not declared in this scope; did you mean 'temp2'?
   46 |     temp=(ans*temp2);
      |     ^~~~
      |     temp2
Language: C++

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

using namespace std;

int main(){
	int n,m;
	cin >> n;
	cin >> m;
	vector<int> vote;
	int input;
	while(cin >> input){
		vote.push_back(input);
	}
	int sum = accumulate(vote.begin(), vote.end(), 0);
	float measure = sum / (4*m);
	int count=0;
	for(auto it :vote){
		if(it*4m >= sum) count++;
	}
	
	if(count >= m) cout << "Yes";
	else cout << "No";
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: unable to find numeric literal operator 'operator""m'
   20 |                 if(it*4m >= sum) count++;
      |                       ^~
Language: C++

#include<iostream>
#include <algorithm>
using namespace std;
int main(){
           double n,k;
           cin>>n>>k;
           double a[n],s=0;
           for(int i=0;i<n;i++){
           cin>>a[i];
            s+=a[i];
             }
           double v=s/(4*k);
           sort(a,a+n);
           for(int i=n-1;i>=0;i--){
           if(a[i]>v)k--;
               }
            if(k>0)cout<<"No";
            else cout<<"Yes";
return 0;
                }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    7 |            double a[n],s=0;
      |                     ^
a.cc:7:21: error: could not convert 'n' from 'double' to 'long unsigned int'
    7 |            double a[n],s=0;
      |                     ^
      |                     |
      |                     double
a.cc:7:21: error: size of array 'a' has non-integral type 'double'
a.cc:13:20: error: invalid operands of types 'double [1]' and 'double' to binary 'operator+'
   13 |            sort(a,a+n);
      |                   ~^~
      |                   | |
      |                   | double
      |                   double [1]
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef		long long       ll;
typedef         long double      dl;
#define		pb              push_back
#define		PB              pop_back
#define		nn              "\n"
#define     O_O             ios_base::sync_with_stdio(false); cin.tie(NULL)
#define		all(p)          p.begin(),p.end()
#define		zz(v)           (ll)v.size()
#define		ss              ' '
#define         arrsize(a)      (sizeof(a)/sizeof(a[0]))
//#define       arrsize(a)      (sizeof(a)/sizeof(*a))
#define 	S(a)            scanf("%lld",&a)
#define 	SS(a,b)         scanf("%lld %lld",&a,&b)
#define 	SSS(a,b,c)      scanf("%lld %lld %lld",&a,&b,&c)
#define		gcd(a,b)        __gcd(a,b)
#define		lcm(a,b)        (a*b)/gcd(a,b)
#define		pi              acos(-1.0)
typedef        pair <int, int>   pii;
typedef       pair <ll, ll>      pll;
typedef      vector< pair <ll, ll> >      vpll;
typedef		vector<ll>      vll;
typedef		map<string,ll>      msl;
typedef		map<ll,ll>      mll;
//#define sort(x) sort(x.begin(), x.end())
#define MAX 1000005
 
int main()
{
//O_O ;
    ll ar[10000];
    ll n,m;
    cin>>n>>m;
    ll ans=0;
    for(ll i=1; i<=n; i++)
    {
        cin>>ar[i];
        ans+=ar[i];
    }
    //sort(ar,ar+n+1);
    //
      //  cout<<ar[i]<<nn;
    ll temp=(1.0/(4*m));
    temp=temp*ans;
  //  cout<<temp<<nn;
    //cout<<temp<<nn;
    for(ll i=1; i<=n; i++){
    if(ar[i]>=temp) c++;
    }
      if(c<temp)  
        cout<<"No"<<nn;
    else
        cout<<"Yes"<<nn;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:21: error: 'c' was not declared in this scope
   49 |     if(ar[i]>=temp) c++;
      |                     ^
a.cc:51:10: error: 'c' was not declared in this scope
   51 |       if(c<temp)
      |          ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,k;
  cin>>n>>k;
  int a[n],s=0;
  for(int i=0;i<n;i++){
  cin>>a[i];
    s+=a[i];
  }
int v=s*(1/(4*k));
  sort(a,a+n);
  for(int i=n-1;i>=0;i--){
  if(a[i]>=v)k--;
  }
if(k>0)cout<<"NO";
  else cout<<"YES";
return 0;
}

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

#include<stdio.h>
int main()
{
    long long int N,M,a[2000],i,c=0,s=0,x;
    scanf("%lld%lld",&N,&M);

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

    }
   double x=s*1.00/4/M;

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

    {
        if(a[i]>=x)
            c++;

    }
    (c>=M)?printf("Yes\n"):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=s*1.00/4/M;
      |           ^
main.c:4:41: note: previous declaration of 'x' with type 'long long int'
    4 |     long long int N,M,a[2000],i,c=0,s=0,x;
      |                                         ^