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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: redeclaration of 'int j'
   13 |   int j=0;
      |       ^
a.cc:7:7: note: 'int j' previously declared here
    7 |   int j;
      |       ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n,m;
  cin >>n>>m;
  int a[n];
  int total=0;
  int number=0;
  int i;
  for(i=0;i<=n-1;i++){
    int v;
    cin >>v;
    total = total+v;
    a[i]=v;}
  for(i=0;i<=n-1;i++){
    if (total%(4*m) ==0){
      if (a[i]>=total/(4*m)) number+=1;}
    else{if(a[i]>=total/(4*m)+1) number+=1;}
  if (number>=m) cout<<"Yes";
  else cout<<"No";}

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

#include <iostream>
using namespace std;

int main() {
	int N,M,sum=0,count=0;
	int A[110];
	cin>>N>>M;
	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))cout++;
	}
	if(count>=M)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:40: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   13 |                 if(A[i]>=sum/(4*M))cout++;
      |                                    ~~~~^~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int N,M,sum=0,count=0;
	int A[110];
	cin>>N>>M;
	for(int i=0;i<N){
		cin>>A[i];
		sum+=A[i];
	}
	for(int i=0;i<N){
		if(A[i]>=sum/(4*M))cout++;
	}
	if(count>=M)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: expected ';' before ')' token
    8 |         for(int i=0;i<N){
      |                        ^
      |                        ;
a.cc:12:24: error: expected ';' before ')' token
   12 |         for(int i=0;i<N){
      |                        ^
      |                        ;
a.cc:13:40: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   13 |                 if(A[i]>=sum/(4*M))cout++;
      |                                    ~~~~^~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n,m;
  cin >>n>>m;
  int a[n];
  int total=0;
  int number=0;
  int i;
  for(i=0;i<n;i++){
    int v;
    cin >>v;
    total = total+v;
    a[i]=v;}
  for(i=0;i<n;i++){
    if (a[i]>= total/(4*M)) number+=1;}
  if (number>=m) cout<<"Yes";
  else cout<<"No";}

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

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

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

Compiler output:
a.cc:4:12: error: 'Long' does not name a type; did you mean 'long'?
    4 | using ll = Long Long;
      |            ^~~~
      |            long
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[200005];
int main()
{
  	int n,m;
  	cin>>n>>m;
  	long long sum=0;
  	for(int i=1;i<=n;i++)
    {
      cin>>a[i];
      sum+=a[i];
    }
  	sum/=(4*m);
  	int ans=0;
  	for(int i=1;i<=n;i++)
      ans+=(a[i]>=sum);
  	if(an==m) cout<<"YES";
  	else cout<<"NO";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: 'an' was not declared in this scope; did you mean 'ans'?
   18 |         if(an==m) cout<<"YES";
      |            ^~
      |            ans
Language: C++

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

int main(){
  int n,m;
  cin >> n >> m;
  vector<int> a(n);
  for (int i=0; i<n; i++){
    cin >> a.at(i);
  }
  sort(a.begin(),a.end());
  if(a.at(m-1)=>n/(m*4)){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected primary-expression before '>' token
   12 |   if(a.at(m-1)=>n/(m*4)){
      |                ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'll' was not declared in this scope
    5 |          ll n, m, count = 0, sum = 0;
      |          ^~
a.cc:6:11: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |      cin>>n>>m;
      |           ^
      |           yn
a.cc:6:14: error: 'm' was not declared in this scope; did you mean 'tm'?
    6 |      cin>>n>>m;
      |              ^
      |              tm
a.cc:10:10: error: 'sum' was not declared in this scope
   10 |          sum += v[i];
      |          ^~~
a.cc:14:14: error: 'sum' was not declared in this scope
   14 |          y = sum / (4 * m);
      |              ^~~
a.cc:16:22: error: overloaded function with no contextual type information
   16 |             count += 1;
      |                      ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'veutor' was not declared in this scope
    8 |   veutor <int> vec(N);
      |   ^~~~~~
a.cc:8:11: error: expected primary-expression before 'int'
    8 |   veutor <int> vec(N);
      |           ^~~
a.cc:10:12: error: 'vec' was not declared in this scope
   10 |     cin >> vec.at(i);
      |            ^~~
a.cc:16:8: error: 'vec' was not declared in this scope
   16 |     if(vec.at(i) * 4 * M => sum) {
      |        ^~~
a.cc:16:27: error: expected primary-expression before '>' token
   16 |     if(vec.at(i) * 4 * M => sum) {
      |                           ^
a.cc:21:14: error: expected primary-expression before '>' token
   21 |   if (count => M) {
      |              ^
Language: Java

import java.util.Scanner;
import java.util.ArrayList;
/**
 * Write a description of class Main_B here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */

public class MainB
{

    public static void main(String[] args)
    {
        ArrayList<Integer> numeros = new ArrayList<Integer>();
        Scanner scan = new Scanner (System.in);
        int N = scan.nextInt();
        double M = scan.nextFloat();
        int contador = 0;
        int sumaTotal = 0;
        double valor = 0;
        double porcentaje = (1/(4*M));
        while(contador < N){
            int numerito = scan.nextInt();
            numeros.add(numerito);
            sumaTotal += numerito;
            contador++;
        }
        valor = sumaTotal*porcentaje;
        contador = 0;
        for(Integer a: numeros)
        {
            if(a > valor){
                contador++;
            }
        }
        if(contador > M)
            System.out.println("Yes");
        else
            System.out.println("No");
    }
}

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

import java.util.Scanner;
import java.util.ArrayList;
/**
 * Write a description of class Main_B here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */

public class Main_B
{

    public static void main(String[] args)
    {
        ArrayList<Integer> numeros = new ArrayList<Integer>();
        Scanner scan = new Scanner (System.in);
        int N = scan.nextInt();
        double M = scan.nextFloat();
        int contador = 0;
        int sumaTotal = 0;
        double valor = 0;
        double porcentaje = (1/(4*M));
        while(contador < N){
            int numerito = scan.nextInt();
            numeros.add(numerito);
            sumaTotal += numerito;
            contador++;
        }
        valor = sumaTotal*porcentaje;
        contador = 0;
        for(Integer a: numeros)
        {
            if(a > valor){
                contador++;
            }
        }if(contador >= M)
            System.out.println("Yes");
        else
            System.out.println("No");
    }
}

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

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int m = scan.nextInt();
    int sum = 0;
    int count = 0;
    int[] pop = new int[n];
    for(int i = 0; i < n; i++){
      pop[i] = scan.nextInt();
      sum += pop[i];
    }
    for(int i = 0; i < n; i++){
      sum += pop[i];
    }
    int border = sum/(4*m);
    for(int i = 0; i<n; i++){
      if(pop[i] >= border){
        count++;
      }
    }
      if(count == m){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
  }
}


Compiler output:
Main.java:31: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

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

class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    int m = scan.nextInt();
    int sum = 0;
    int count = 0;
    int[] pop = new int[n];
    for(int i = 0; i < n; i++){
      pop[i] = scan.nextInt();
      sum += pop[i];
    }
    Arrays.sort(pop, Collections.reverseOrder());
    int border = sum/(4*m);
    for(int i = 0; i< n; i++){
      if(pop[i] >= border){
        count++;
      }else{
        break;
      }
      if(count == m){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
  }
}

Compiler output:
Main.java:16: error: cannot find symbol
    Arrays.sort(pop, Collections.reverseOrder());
                     ^
  symbol:   variable Collections
  location: class Main
1 error
Language: C++

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

int main() {
    int N, M, count, hyou;
    count = 0;
    hyou = 0;
    cin >> N >> M;
    vector<int> A(N);
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        hyou = hyou + A[i];
    }
    double a = round(hyou / (M * 4));
    for (int i = 0; i < N; i++) {
        if (a <= A[i]) {
            count++;
        }
    }
    if (count >= M) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: 'round' was not declared in this scope
   17 |     double a = round(hyou / (M * 4));
      |                ^~~~~
Language: C++

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

int main() {
    int N, M, count, hyou;
    count = 0;
    hyou = 0;
    cin >> N >> M;
    vector<int> A(N);
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        hyou = hyou + A[i];
    }
    double a = 1.0*hyou / (M * 4);
    for (int i = 0; i < N; i++) {
        if (round(hyou / (M * 4) <= A[i]) {
            count++;
        }
    }
    if (count >= M) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'round' was not declared in this scope
   19 |         if (round(hyou / (M * 4) <= A[i]) {
      |             ^~~~~
a.cc:19:42: error: expected ')' before '{' token
   19 |         if (round(hyou / (M * 4) <= A[i]) {
      |            ~                             ^~
      |                                          )
a.cc:22:5: error: expected primary-expression before '}' token
   22 |     }
      |     ^
Language: C++

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

int main() {
    int N, M, count, hyou;
    count = 0;
    hyou = 0;
    cin >> N >> M;
    vector<int> A(N);
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        hyou = hyou + A[i];
    }
    double a = 1.0*hyou / (M * 4);
    for (int i = 0; i < N; i++) {
        if (round(hyou / (M * 4)) <= A[i]) {
            count++;
        }
    }
    if (count >= M) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'round' was not declared in this scope
   19 |         if (round(hyou / (M * 4)) <= A[i]) {
      |             ^~~~~
Language: C++

#include <iostream>

using namespace std;
int main(){
  int N,M,number;
  cin>>N>>M;
  for (int a=1;a<=N;a++)
    int v;
    cin >>v;
    if (v<1/4M) number=number;
    else number=number+1;
  if (number<M) cout<<"No";
  else cout<<"Yes";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'v' was not declared in this scope
    9 |     cin >>v;
      |           ^
a.cc:10:13: error: unable to find numeric literal operator 'operator""M'
   10 |     if (v<1/4M) number=number;
      |             ^~
Language: C++

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

int main()
{
    int N, M;
    cin >> N >> M;
    vector<int> vec(N);
    int a;
    for (int i = 0;i < N; i++){
        cin >> vec.at(i);
    }
    for (int i = 0; i< N; i++){
        a += vec.at(i);
    }
    sort(vec.begin(),vec.end());
    reverse(vec.begin(),vec.end());
    int b = 0;
    for(int x = 0; x < M; x++){
        if(vec.at(x) >= a /4 / M){
        }
        else{
            b++;
        }
    }
    if(b == 0){
        cout << "Yes" << endl;
    }
    else(
        cout << "No" << endl;
    )
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:29: error: expected ')' before ';' token
   30 |         cout << "No" << endl;
      |                             ^
      |                             )
a.cc:29:9: note: to match this '('
   29 |     else(
      |         ^
a.cc:31:5: error: expected primary-expression before ')' token
   31 |     )
      |     ^
Language: C++

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

int main()
{
    int N, M;
    cin >> N >> M;
    vector<int> vec(N);
    int a;
    for (int i = 0;i < N; i++){
        cin >> vec.at(i);
    }
    for (int i = 0; i< N i++){
        a += vec.at(i);
    }
    sort(vec.begin(),vec.end());
    reverse(vec.begin(),vec.end());
    int b = 0;
    for(int x = 0; x < M; x++){
        if(vec.at(x) >= a /4 / M){
        }
        else{
            b++;
        }
    }
    if(b == 0){
        cout << "Yes" << endl;
    }
    else(
        cout << "No" << endl;
    )
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: expected ';' before 'i'
   13 |     for (int i = 0; i< N i++){
      |                         ^~
      |                         ;
a.cc:30:29: error: expected ')' before ';' token
   30 |         cout << "No" << endl;
      |                             ^
      |                             )
a.cc:29:9: note: to match this '('
   29 |     else(
      |         ^
a.cc:31:5: error: expected primary-expression before ')' token
   31 |     )
      |     ^
Language: C++

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

int main()
{
    int N, M;
    cin >> N >> M;
    vector<int> vec(N);
    int a;
    for (int i = 0;i < N; i++){
        cin >> vec.at(i);
    }
    for (int i = 0; i< N i++){
        a += vec.at(i);
    }
    sort(vec.begin(),vec.end());
    reverse(vec.begin(),vec.end());
    int b = 0;
    for(int x = 0; x < M; x++){
        if(vec.at(x) >= a /4 / M){
        }
        else{
            b++
        }
    }
    if(b = 0){
        cout << "Yes" << endl;
    }
    else(
        cout << "No" << endl;
    )
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: expected ';' before 'i'
   13 |     for (int i = 0; i< N i++){
      |                         ^~
      |                         ;
a.cc:23:16: error: expected ';' before '}' token
   23 |             b++
      |                ^
      |                ;
   24 |         }
      |         ~       
a.cc:30:29: error: expected ')' before ';' token
   30 |         cout << "No" << endl;
      |                             ^
      |                             )
a.cc:29:9: note: to match this '('
   29 |     else(
      |         ^
a.cc:31:5: error: expected primary-expression before ')' token
   31 |     )
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    vector<int> vec(100);
    
    int n, m;cin >> n >> m;
    for(int i = 0;i < n;i++){
        cin >> vec.at(i);
        ans += vec.at(i);
    }
    ans = ans / (4.0 * m);
    sort(vec.rbegin(), vec.rend());
    if(vec.at(m-1) >= ans)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |         ans += vec.at(i);
      |         ^~~
      |         abs
a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     ans = ans / (4.0 * m);
      |     ^~~
      |     abs
Language: C++

include<iostream>

using namespace std;

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


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> n >> m;
      |   ^~~
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |   if (cnt >= m) cout << "Yes\n";
      |                 ^~~~
a.cc:20:8: error: 'cout' was not declared in this scope
   20 |   else cout << "No\n";
      |        ^~~~
Language: C++

inlcude<iostream>

using namespace std;

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

Compiler output:
a.cc:1:1: error: 'inlcude' does not name a type
    1 | inlcude<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> n >> m;
      |   ^~~
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |   if (cnt >= m) cout << "Yes\n";
      |                 ^~~~
a.cc:20:8: error: 'cout' was not declared in this scope
   20 |   else cout << "No\n";
      |        ^~~~
Language: C++

n,m = int(input().split())
a=list(int(input().split()))
s=sum(a)
cnt=0
for i in a:
    if a>=s/(4*m):
        cnt+=1
if cnt>=m:
    print("Yes")
else:
    print("No")

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

#include <iostream>
using namespace std;

int main()
{
  int n, m, total=0;
  cin>>n>>m;
  vector<int> v(n);
  for(int i=0; i<n; i++)
  {
    cin>>v[i];
    total+=v[i];
  }
  
  sort(v.begin(), v.end());
  for(int i=0; i<m; i++)
    if(v[i]>=total/(4*m)) cout<<v[i]<<" ";
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> v(n);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> v(n);
      |          ^~~
a.cc:11:10: error: 'v' was not declared in this scope
   11 |     cin>>v[i];
      |          ^
a.cc:15:8: error: 'v' was not declared in this scope
   15 |   sort(v.begin(), v.end());
      |        ^
a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |   sort(v.begin(), v.end());
      |   ^~~~
      |   short
Language: C++

bits/stdc++.h>
using namespace std;

int main() {
   
  int N,M,all,line,count;
  int A[110] = {0};
  
  cin >> N >> M;
  
  for(int i = 0; i < N; i++){
    cin >> A[i];
  }
  for(int i = 0; i < N; i++){
    all += A[i]; 
  }
  line = all / (4*M);
  
  for(int i = 0; i < N; i++){
    if(A[i]>=line){
      count++;
    }
    
    else
      continue;
  }
  
  if(count>=M){
    cout << "Yes" <<endl;
  }
  
  else
    cout << "No" <<endl;
  
}

Compiler output:
a.cc:1:1: error: 'bits' does not name a type
    1 | bits/stdc++.h>
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> N >> M;
      |   ^~~
a.cc:29:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   29 |     cout << "Yes" <<endl;
      |     ^~~~
      |     count
a.cc:29:21: error: 'endl' was not declared in this scope
   29 |     cout << "Yes" <<endl;
      |                     ^~~~
a.cc:33:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   33 |     cout << "No" <<endl;
      |     ^~~~
      |     count
a.cc:33:20: error: 'endl' was not declared in this scope
   33 |     cout << "No" <<endl;
      |                    ^~~~
Language: C++

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

int main() {
   
  int N,M,all,line,count;
  int A[110];
  
  cin >> N >> M;
  
  for(int i = 0; i < N; i++){
    cin >> A[i];
    all += A[i];
  }
  
  line = all / (4*M);
  
  for(int i = 0; i < N; i++){
    if(A[i]>=line){
      count++;
    }
    
    else
      continue;
  }
  
  if(count>=M){
    cout << "Yes" <<endl;
  }
  
  else
    cout << "No" <<endl;
  

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

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

int main(){
  int n;
  int m;
  cin >> n >> m;
  int a[n];
  int l=0;
  int total=0;
  while(cin >> a[l]){
    total = total + a[l];
      l++;
  }
  double MMM = total / 4 / m;
  int hhh=0;
  for(int i=n-1; i>=0; i--){
    if(a[i] > MMM)hhh++;
  }
  if(hhh >= m){
    cout << "Yes" << endl;return 0;}
  
  if(hhh < m){cout << "No" << endl;return 0}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:44: error: expected ';' before '}' token
   23 |   if(hhh < m){cout << "No" << endl;return 0}
      |                                            ^
      |                                            ;
Language: Java

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

public class PopularVote {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		Integer[] votes = new Integer[N];
		for (int i = 0; i < N; i++) {
			votes[i] = sc.nextInt();
		}
		
		Arrays.sort(votes);
		
		int totalScores = 0;
		for (int i = 0; i < N; i++) {
			totalScores += votes[i];
		}
		
		for (int i = 0; i < M; i++) {
			if (votes[i] * 4 * M < totalScores) {
				System.out.println("no");
				return;			
			}
		}
		
		System.out.println("yes");

	}
}

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

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

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int M = sc.nextInt();
		Integer[] votes = new Integer[N];
		for (int i = 0; i < N; i++) {
			votes[i] = sc.nextInt();
		}
		
		Arrays.sort(votes, Comparator.reverseOrder());
		
		int totalScores = 0;
		for (int i = 0; i < N; i++) {
			totalScores += votes[i];
		}
		
		for (int i = 0; i < M; i++) {
			if (votes[i] * 4 * M < totalScores) {
				System.out.println("no");
				return;			
			}
		}
		
		System.out.println("yes");

	}
}

Compiler output:
Main.java:15: error: cannot find symbol
		Arrays.sort(votes, Comparator.reverseOrder());
		                   ^
  symbol:   variable Comparator
  location: class Main
1 error
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  int A[N];
  int total;
  for(int i=0; i<N; i++){
    cin >> A[i];
    total = total + A[i];
  }
  int os;
  int pg;
  int t;
  pg = 4*M;
  os = total/pg;
  for(int i=0; i<N; i++){
    if(A[I] >= os) t++;
  }
  if(t>=M){
    cout << "Yes" << endl;
  }else {
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: 'I' was not declared in this scope
   19 |     if(A[I] >= os) t++;
      |          ^
Language: C++

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

    int n, m;
    cin >> n >> m;
    int arr[n], sum = 0;
    for(int i = 0; i < n; i++)
    {
      cin >> arr[i];
      sum += arr[i];
    }
    double bound = (double)sum/(m*4);
    int c = 0;
    for(int i = 0; i < n; i++)
    {
        if(arr[i] >= bound)
          c++;
    }
    if(c >= m)
      cout << "Yes";
    else
      cout << "No";

Compiler output:
a.cc:5:5: error: 'cin' does not name a type
    5 |     cin >> n >> m;
      |     ^~~
a.cc:6:13: error: size of array 'arr' is not an integral constant-expression
    6 |     int arr[n], sum = 0;
      |             ^
a.cc:7:5: error: expected unqualified-id before 'for'
    7 |     for(int i = 0; i < n; i++)
      |     ^~~
a.cc:7:20: error: 'i' does not name a type
    7 |     for(int i = 0; i < n; i++)
      |                    ^
a.cc:7:27: error: 'i' does not name a type
    7 |     for(int i = 0; i < n; i++)
      |                           ^
a.cc:14:5: error: expected unqualified-id before 'for'
   14 |     for(int i = 0; i < n; i++)
      |     ^~~
a.cc:14:20: error: 'i' does not name a type
   14 |     for(int i = 0; i < n; i++)
      |                    ^
a.cc:14:27: error: 'i' does not name a type
   14 |     for(int i = 0; i < n; i++)
      |                           ^
a.cc:19:5: error: expected unqualified-id before 'if'
   19 |     if(c >= m)
      |     ^~
a.cc:21:5: error: expected unqualified-id before 'else'
   21 |     else
      |     ^~~~
Language: C++

#include<istream>
#include<algorithm>
#include<vector>

using namespace std;

int main(){
    int N,M;
    int t;
    vector<int> A;

    for (int i=0;i<N;i++){
        cin >> t;
        A.push_back(t);
    }
    sort(A.begin(),A.end());
    int cnt=0;
    for(int i=N-1;i>=0;i--){
        if (float(A[i])>=1.0/(4.0*M)){
            cnt+=1;
        }
    }
    if (cnt>=M){
        cout << "Yes" << endl;
    }
    else{
        cout <<"No"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'cin' was not declared in this scope
   13 |         cin >> t;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<vector>
  +++ |+#include <iostream>
    4 | 
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:24:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:9: error: 'cout' was not declared in this scope
   27 |         cout <<"No"<<endl;
      |         ^~~~
a.cc:27:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m,i,j,k,l,sum=0;
    double av;
    double am;
    cin>>n>>m;
    int ar[n];

    for(i=0;i<n;i++)
    {
        cin>>ar[i];
        sum=sum+ar[i];
    }
//    cout<<sum<<endl;
    am=(1*1.0/(4*m*1.0));
    av=am*sum;
//    cout<<av<<endl;
//    cout<<am<<endl;
    int c=0;
   
    for(i=0;i<n;i++)
    {
        if(ar[i]>=av)
            c++;
        if(c==m)
        {
            flag=1;
            break;
        }
    }
    if(flag==1)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: 'flag' was not declared in this scope
   29 |             flag=1;
      |             ^~~~
a.cc:33:8: error: 'flag' was not declared in this scope
   33 |     if(flag==1)
      |        ^~~~
Language: C

#include <stdio.h>

int main(void)
{
    int n, m, sum=0;
    int a[100];

    scanf("%d%d", &n, &m);

    for (int i=0; i<n; i++)
        scanf("%d", &a[i]);

    sum = 0;
    for (int i=0; i<n; i++)
        sum += a[i];

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

    if (c>=m)
        printf("Yes\n");
    else
        printf("No\n");

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:28: error: 'M' undeclared (first use in this function)
   19 |         if (a[i]>=sum/(4.0*M))  c++;
      |                            ^
main.c:19:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, m  ;
    int arr[1001];
   while (cin >> n >> m && n <= 100 && n > 0 && m <= 100 && m >=1 )
   {
       int , sum = 0, x=0 ; 
    for (int i = 0 ; i < n ; i++)
        cin >> arr[i];
    for (int i = 0 ; i < n ; i++)
        sum=sum+arr[i];
    int total = 1/ (4.0 * m ) * sum; 
    for (int i = 0 ; i < n ; i++)
    {
        if (total < arr[i])
        {
            x+=1 ;
        }
    }
    if (x >= m)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
   }

    return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected unqualified-id before ',' token
    9 |        int , sum = 0, x=0 ;
      |            ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {

double n,m;

cin>>n>>m;

int v[n];

double s=0;

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

cin>>v[i];
s+=v[i];

}

double k=(s/4*m);int c=0;

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

if(v[i] >=k) {
c++;
} 

}

if(c>=m) {

cout<<"Yes"<<endl; 

} else{

cout<<"No"<<endl;

} 

return 0;

} 


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

#include <bits/stdc++.h>

using namespace std;

int main() {

double n,m;

cin>>n>>m;

double v[n];

double s=0;

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

cin>>v[i];

s+=v[i];

}

double k=(s/4*m);int c=0;

bool t=false;

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

if(v[i] >=k) {

c++;

} 

}

if(c>=m) {

cout<<"Yes"<<endl; 

} else{

cout<<"No"<<endl;

} 

return 0;

} 

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

#include <bits/stdc++.h>

using namespace std;

int main() {

double n,m;

cin>>n>>m;

double v[n];

double s=0;

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

cin>>v[i];

s+=v[i];

}

int k=(s/4*m);int c=0;

bool t=false;

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

if(v[i] >=s/4*m) {

c++;

} 

}

if(c>=m) {

cout<<"Yes"<<endl; 

} else{

cout<<"No"<<endl;

} 

return 0;

} 



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

#include <bits/stdc++.h>

using namespace std;

int main() {

double n,m;

cin>>n>>m;

double v[n];

double s=0;

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

cin>>v[i];

s+=v[i];

}

int k=(s/4*m);int c=0;

bool t=false;

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

if(v[i] >=(s/4*m) ) {

c++;

} 

}

if(c>=m) {

cout<<"Yes"<<endl; 

} else{

cout<<"No"<<endl;

} 

return 0;

} 



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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: expected ')' before ';' token
   15 |     ll d=((sum)/(4*m);
      |          ~           ^
      |                      )
Language: C++

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


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:15:31: error: expected ')' before '{' token
   15 |     if((arr[i]>=(1*sum/(4*m))){
      |       ~                       ^
      |                               )
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C++

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


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:17:24: error: expected primary-expression before ')' token
   17 |     if(sum==arr[i]*4*m)){
      |                        ^
Language: C++

#include<iostream>
#include<vector>
 
using namespace std;
 
void popular(vector<int>& arr,int m,int sum){
  int popular = 0;
  int unpopular = 0;
  cout<<m;
  //int checker = (1 * sum)/(4*m) ;
  cout<<checker<<endl;
  for(int i=0;i < arr.size();i++){
    //  cout<<"k";
    if(arr[i] > checker ){
      popular++;
     // cout<<popular;
    }
    else
      unpopular++;  
  }
  if(popular > m){
    cout<<"Yes";
  }
  else
    cout<<"No";
  
}
 
int main(int args,char **argv){
  int n;
  cin>>n;
  vector<int>arr(n);
  for(int i=0;i<arr.size();i++){
    cin>>arr[i];
  }
  int m;
  cin>>m;
  int sum = 0;
  for(int i=0;i<arr.size();i++){
    sum = sum + arr[i];
  }
  cout<<sum<<endl;
  popular(arr,m,sum);
  
}

Compiler output:
a.cc: In function 'void popular(std::vector<int>&, int, int)':
a.cc:11:9: error: 'checker' was not declared in this scope
   11 |   cout<<checker<<endl;
      |         ^~~~~~~
Language: C++

#include<iostream>
#include<vector>
 
using namespace std;
 
void popular(vector<int>& arr,int m,int sum){
  int popular = 0;
  int unpopular = 0;
  int checker = (1/(4*m)) * sum);
  for(int i = 0;i < arr.size();i++){
    if(arr[i] > sum ){
      popular++;
    }
    else
      unpopular++;  
  }
  if(popular > m){
    cout<<"Yes";
  }
  else
    cout<<"No";
  
}
 
int main(int args,char **argv){
  int n;
  cin>>n;
  vector<int>arr(n);
  for(int i=0;i < arr.size();i++){
    cin>>arr[i];
  }
  int m;
  cin>>m;
  int sum = 0;
  for(int i=0;i<arr.size();i++){
    sum = sum + arr[i];
  }
  popular(arr,m,sum);
  
}

Compiler output:
a.cc: In function 'void popular(std::vector<int>&, int, int)':
a.cc:9:32: error: expected ',' or ';' before ')' token
    9 |   int checker = (1/(4*m)) * sum);
      |                                ^
Language: C++

#include<iostream>
#include<vector>
 
using namespace std;
 
void popular(vector<int>& arr,int m,int sum){
  int popular = 0;
  int unpopular = 0;
  int checker = (1/(4*m)) * sum)
  for(int i=0;i < arr.size();i++){
    if(arr[i] > sum ){
      popular++;
    }
    else
      unpopular++;  
  }
  if(popular > m){
    cout<<"Yes";
  }
  else
    cout<<"No";
  
}
 
int main(int args,char **argv){
  int n;
  cin>>n;
  vector<int>arr(n);
  for(int i=0;i<arr.size();i++){
    cin>>arr[i];
  }
  int m;
  cin>>m;
  int sum = 0;
  for(int i=0;i<arr.size();i++){
    sum = sum + arr[i];
  }
  popular(arr,m,sum);
  
}

Compiler output:
a.cc: In function 'void popular(std::vector<int>&, int, int)':
a.cc:9:32: error: expected ',' or ';' before ')' token
    9 |   int checker = (1/(4*m)) * sum)
      |                                ^
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   for(int i=0;i < arr.size();i++){
      |               ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

void popular(vector<int& arr,int m,int sum){
  int popular = 0;
  int unpopular = 0;
  int checker = (1/(4*m)) * sum)
  for(int i=0;i < arr.size();i++){
    if(arr[i] > sum ){
      popular++;
    }
    else
      unpopular++;  
  }
  if(popular > m){
    cout<<"Yes";
  }
  else
    cout<<"No";
  
}

int main(int args,char **argv){
  int n;
  cin>>n;
  vector<int>arr(n);
  for(int i=0;i<arr.size();i++){
    cin>>arr[i];
  }
  int m;
  cin>>m;
  int sum = 0;
  for(int i=0;i<arr.size();i++){
    sum = sum + arr[i];
  }
  popular(arr,m,sum);
  
}

Compiler output:
a.cc:6:40: error: template argument 1 is invalid
    6 | void popular(vector<int& arr,int m,int sum){
      |                                        ^~~
a.cc:6:40: error: template argument 2 is invalid
a.cc:6:40: error: template argument 1 is invalid
a.cc:6:40: error: template argument 2 is invalid
a.cc:6:40: error: template argument 1 is invalid
a.cc:6:40: error: template argument 2 is invalid
a.cc:6:14: error: invalid template-id
    6 | void popular(vector<int& arr,int m,int sum){
      |              ^~~~~~
a.cc:6:6: error: variable or field 'popular' declared void
    6 | void popular(vector<int& arr,int m,int sum){
      |      ^~~~~~~
a.cc:6:43: error: missing template arguments before ')' token
    6 | void popular(vector<int& arr,int m,int sum){
      |                                           ^
a.cc: In function 'int main(int, char**)':
a.cc:38:3: error: 'popular' was not declared in this scope
   38 |   popular(arr,m,sum);
      |   ^~~~~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int suma=0;
      	int populares=0;
		int n = sc.nextInt();
		int m = sc.nextInt();
      	int a[] = new int[n];      	
		for(int i=0;i<n;i++)
        {
          a[i]= sc.nextInt();
          suma+=a[i];
        }
      for(int j: a[])
        {
          if(j>=suma/(4*m))
          {
            populares+=1;
          }
        }
      	if(populares>=m)
        {
          System.out.println(("Yes")); 
        }else if(populares<m)
        {
          System.out.println(("No"));
        }
		
	}
}


Compiler output:
Main.java:15: error: '.class' expected
      for(int j: a[])
                    ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int suma=0;
      	int populares=0;
		int n = sc.nextInt();
		int m = sc.nextInt();
      	int a[] = new int[n];
      	
		for(int i=0;i<=n;i++)
        {
          a[i]= sc.nextInt();
          suma+=a[i];
        }
      for(int i=0;i<=n;i++)
        {
          a[i]= sc.nextInt();
          if(a[i]>=suma/(4*m))
          {
            pupulares+=1;
          }
        }
      	if(populares>=m)
        {
          System.out.println(("Yes")); 
        }else
        {
          System.out.println(("No"));
        }
		
	}
}


Compiler output:
Main.java:21: error: cannot find symbol
            pupulares+=1;
            ^
  symbol:   variable pupulares
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int suma=0;
      	int populares=0;
		int n = sc.nextInt();
		int m = sc.nextInt();
      	int a[] = new int[n];
      	
		for(int i=0;i<=n;i++)
        {
          a[i]= sc.nextInt();
          suma+=a[i];
        }
      for(int i=0;i<=n;i++)
        {
          a[i]= sc.nextInt();
          if(a[i]>=suma/(4*m))
          {
            pupulares++;
          }
        }
      	if(populares>=m)
        {
          System.out.println(("Yes")); 
        }else
        {
          System.out.println(("No"));
        }
		
	}
}


Compiler output:
Main.java:21: error: cannot find symbol
            pupulares++;
            ^
  symbol:   variable pupulares
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int suma=0;
      	String populares=0;
		int n = sc.nextInt();
		int m = sc.nextInt();
      	int a[] = new int[n];
      	
		for(int i=0;i<=n;i++)
        {
          a[i]= sc.nextInt();
          suma+=a[i];
        }
      for(int i=0;i<=n;i++)
        {
          a[i]= sc.nextInt();
          if(a[i]>=suma/(4*m))
          {
            pupulares++;
          }
        }
      	if(populares>=m)
        {
          System.out.println(("Yes")); 
        }else
        {
          System.out.println(("No"));
        }
		
	}
}

Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to String
      	String populares=0;
      	                 ^
Main.java:21: error: cannot find symbol
            pupulares++;
            ^
  symbol:   variable pupulares
  location: class Main
Main.java:24: error: bad operand types for binary operator '>='
      	if(populares>=m)
      	            ^
  first type:  String
  second type: int
3 errors
Language: C++

#include<iostream>
using namespace std;
main()
{
  intn,m;
  cin>>n>>m;
  int a[n],sum=0;
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
    sum+=a[i];
  }
  sort(a,a+n);
  int c=0;
  for(int i=n-1;i>=0;i--)
  {
    if(a[i]>=sum/(4*m))
      c++;
  }
  if(c>=m)
    cout<<"Yes\n";
  else
    cout<<"No\n";
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'intn' was not declared in this scope; did you mean 'int'?
    5 |   intn,m;
      |   ^~~~
      |   int
a.cc:5:8: error: 'm' was not declared in this scope; did you mean 'tm'?
    5 |   intn,m;
      |        ^
      |        tm
a.cc:6:8: error: 'n' was not declared in this scope
    6 |   cin>>n>>m;
      |        ^
a.cc:10:10: error: 'a' was not declared in this scope
   10 |     cin>>a[i];
      |          ^
a.cc:13:8: error: 'a' was not declared in this scope
   13 |   sort(a,a+n);
      |        ^
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |   sort(a,a+n);
      |   ^~~~
      |   short
Language: C++

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

int main() {
    int n, m, total;
    cin >> n >> m;
    vector<int> a(n);
    for (int i=0; i<n; i++) {
        cin >> a.at(i);
        total += a.at(i);
    }
    if (a.at(m-1) >= total//(4*m)) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: expected ';' before 'cout'
   13 |     if (a.at(m-1) >= total//(4*m)) {
      |                           ^
      |                           ;
   14 |         cout << "Yes" << endl;
      |         ~~~~               
a.cc:15:5: error: expected primary-expression before '}' token
   15 |     }
      |     ^
a.cc:14:31: error: expected ')' before '}' token
   14 |         cout << "Yes" << endl;
      |                               ^
      |                               )
   15 |     }
      |     ~                          
a.cc:13:8: note: to match this '('
   13 |     if (a.at(m-1) >= total//(4*m)) {
      |        ^
a.cc:15:5: error: expected primary-expression before '}' token
   15 |     }
      |     ^
a.cc: At global scope:
a.cc:16:5: error: expected unqualified-id before 'else'
   16 |     else {
      |     ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
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 s=0;
 for (int i=0;i<n;i++) s+=a[i];
 int cnt = 0;
 for (int i=0;i<n;i++){
   if (a[i]*4*m >= s) cnt++;
 }
  if (cnt >= m) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}
   cin >> a[i];
}


Compiler output:
a.cc:22:4: error: 'cin' does not name a type
   22 |    cin >> a[i];
      |    ^~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

int main()
{
  int N, M, min, x=0, sum=0;
  cin>>N>>M;
  int A[N];
  for(int i=0; i<N; i++)
  {  cin>>A[i];
     sum+=A[i];
  }
  min=sum/(4*M);
  for(int j=0; j<N; j++)
  {if(A[i]>=min)
     x++;
   else
     continue;
  }
  if(x>=M)
    cout<<"Yes";
  else
    cout<<"No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'i' was not declared in this scope
   15 |   {if(A[i]>=min)
      |         ^
Language: C++

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

int main() {
    int n,m;
    cin >> n >> m;
    vector<int> a(n);
    for(auto& e:a){
        cin >> e;
    }
    auto sum = accumulate(begin(a),end(a),0);
    int cnt = 0;
    for(auto e:a){
        cnt += 4*m*e >= sum;
    }
    cout << (cnt >= m ? "Yes\n" : "No\n")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:42: error: expected ';' before '}' token
   16 |     cout << (cnt >= m ? "Yes\n" : "No\n")
      |                                          ^
      |                                          ;
   17 | }
      | ~