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

#include<iostream>
using namespace std;
int main(){
    int N, M;
    int count = 0;
    cin >> N;
    int A[N];
    for(int i; i < N; i++){
        cin >> A[i]
    }

    for(int i; i < N; i++){
        if(A[i] >= 1 / (4 * M)){
            count++
        }
    }
    if(count >= M){
        cout << 'Yes' << endl;
    }
    else{
        cout << 'No' << endl;
    }
}

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

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

int main(){
  int N, M;
  std::cin >> N, M;
  
  vector<int> items;
  int item;
  float score = 0;
  
  while (cin >> item){
    items.push_back(item);
    score += item;
  }
  
  std::sort(items.begin(), items.end());
  
  if (items[M - 1] < score / 4 / M) std::cout << "No";
  else std::cout << "Yes";
  
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector<int> items;
      |   ^~~~~~
a.cc:9:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   vector<int> items;
      |          ^~~
a.cc:13:10: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   13 |   while (cin >> item){
      |          ^~~
      |          std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:5: error: 'items' was not declared in this scope; did you mean 'item'?
   14 |     items.push_back(item);
      |     ^~~~~
      |     item
a.cc:18:13: error: 'items' was not declared in this scope; did you mean 'item'?
   18 |   std::sort(items.begin(), items.end());
      |             ^~~~~
      |             item
Language: C++

/**   
 *   Author:    @glaucoacassioc
 *   Created on 11.09.2020, 15:32:16
**/
#include <bits/stdc++.h>
#define INF 1000000000
using namespace std;

typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
vector<vii> AdjList;

vi pai, color, dist, ts;

int main()
{
	freopen("in.txt","r", stdin);
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, m, ans, sum = 0, cont=0;

	cin >> n >> m;
	vi v(n);
	for(int i=0; i < n; i++)
	{
		cin >> v[i];
		sum+= v[i];
	}
	ans = (double)(ceil(sum/(4*m));
	bool popular = false;
	for(int i=0; i<n; i++)
	{
		if(v[i] >= ans) cont++;
		if(cont==m) popular=true;
	}
	popular ? cout << "No\n" : cout << "Yes\n";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:39: error: expected ')' before ';' token
   30 |         ans = (double)(ceil(sum/(4*m));
      |                       ~               ^
      |                                       )
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
#define PI 3.14159265358979323846264338327950L
using namespace std;
using P = pair<int,int>;
using ll = long long;
using namespace std;
int main(void){
    // Your code here!
    int n, m;
    cin >> n >> m;
    int a[n];
    int ans=0;
    rep(i, n){cin >> a[i]; ans+= a[i];}
    sort(a, a+n, greater<int>());
    rep(i, m){
        if(a[i] < ans/4/m)){cout << "No" << endl; return 0;}
    }
    cout << "Yes" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: expected primary-expression before ')' token
   17 |         if(a[i] < ans/4/m)){cout << "No" << endl; return 0;}
      |                           ^
Language: C++

#include <bits/stdc++.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: no matching function for call to 'accumulate(std::vector<int>::iterator, std::vector<int>::iterator)'
    7 |   int sum = std::accumulate(a.begin(), a.end());
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/numeric:62,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:58,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_numeric.h:134:5: note: candidate: 'template<class _InputIterator, class _Tp> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp)'
  134 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:134:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_numeric.h:161:5: note: candidate: 'template<class _InputIterator, class _Tp, class _BinaryOperation> _Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation)'
  161 |     accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
      |     ^~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:161:5: note:   candidate expects 4 arguments, 2 provided
Language: C++

#include <iostream>
#include <vector>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'accumulate' is not a member of 'std'
    8 |   int sum = std::accumulate(a.begin(), a.end());
      |                  ^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int n;
int a[N];
bool st[N];

bool check(int x){
	for(int i=2;i<=x/i;++i){
		if(x%i==0){
			if(st[i]) return false;
			while(x%i==0) x/=i;
			st[i]=true;
		}
	}
	if(x>1){
		if(st[x]) return false;
		st[x]=true;
	}
	return true;
}


int main() {
    //ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    cin>>n;
	bool flag=true;
	for(int i=1;i<=n;++i){
		cin>>a[i];
		if(!check(a[i])) flag=false;
	}
	int gcd=a[1];
	for(int i=2;i<=n;++i){
		gcd=__gcd(gcd,a[i]);
	}

	if(flag) puts("pairwise coprime");
	else if(gcd==1) puts("setwise coprime");
	else puts("not coprime");

    return 0;
}

Compiler output:
a.cc:5:7: error: 'N' was not declared in this scope
    5 | int a[N];
      |       ^
a.cc:6:9: error: 'N' was not declared in this scope
    6 | bool st[N];
      |         ^
a.cc: In function 'bool check(int)':
a.cc:11:28: error: 'st' was not declared in this scope; did you mean 'std'?
   11 |                         if(st[i]) return false;
      |                            ^~
      |                            std
a.cc:13:25: error: 'st' was not declared in this scope; did you mean 'std'?
   13 |                         st[i]=true;
      |                         ^~
      |                         std
a.cc:17:20: error: 'st' was not declared in this scope; did you mean 'std'?
   17 |                 if(st[x]) return false;
      |                    ^~
      |                    std
a.cc:18:17: error: 'st' was not declared in this scope; did you mean 'std'?
   18 |                 st[x]=true;
      |                 ^~
      |                 std
a.cc: In function 'int main()':
a.cc:29:22: error: 'a' was not declared in this scope
   29 |                 cin>>a[i];
      |                      ^
a.cc:32:17: error: 'a' was not declared in this scope
   32 |         int gcd=a[1];
      |                 ^
Language: C++

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

int main(){

  int n,m,sum,pa;
  cin >>n >>m;
  vector<int>vec(n);
  for(int i;vec){
    cin >> vec.at(i);
    sum=vec.at(i);
  }
  pa=0;
  for(int i=0;i<n;i++){
    if((double)sum/(4*m)>=vec.at(i)){
     pa++ ;
    }
  }
  if(pa>=m){
    cout <<"Yes" <<endl;
  }
  else{
    cout <<"No" <<endl;
  }
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: could not convert 'vec' from 'std::vector<int>' to 'bool'
    9 |   for(int i;vec){
      |             ^~~
      |             |
      |             std::vector<int>
a.cc:9:16: error: expected ';' before ')' token
    9 |   for(int i;vec){
      |                ^
      |                ;
Language: C++

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

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 ans = 0;
    rep(i, n)
    {
        if(a[i] * (4 - m) >= s)
        ans++;
    }
    if(ans >= m){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected unqualified-id before ';' token
    7 |     int n,m,;
      |             ^
Language: C

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

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

import java.util.Scanner;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt(); //N種類の商品
    int M = sc.nextInt(); //M個を選ぶ
    int[] A = new int[N]; //得票数
    int sum = 0; //総投票数
    int cnt = 0; //許容選択数
    String S = ""; //空
    
      for(int i=0; i<N; i++) { //商品 i
        A[i]=sc.nextInt(); 
        sum += A[i];
      }
      for(int i=0; i<N; i++){
        if(A[i]*4*M) >= sum){
          cnt++;
        } 
      }
      if(cnt>=M) {
        S="Yes";
      } else {
        S="No";
      }
    System.out.println(S);
  }
}

Compiler output:
Main.java:17: error: illegal start of expression
        if(A[i]*4*M) >= sum){
                     ^
Main.java:17: error: ';' expected
        if(A[i]*4*M) >= sum){
                           ^
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
  ll a,b,c;
  cin>>a>>b;
  c=0;
  vector<ll>vec(a);
  for(ll i=0;i<a;i++){
    cin>>vec.at(i);
    c+=vec.at(i);
  }
  sort(vec.begin(),vec,end());
  if(vec.at(b-1)>=c/4/b+1){
    cout<<"Yes"<<endl;
    return 0;
  }
  cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: no matching function for call to 'end()'
   13 |   sort(vec.begin(),vec,end());
      |                        ~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1249 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1249:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1265:5: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

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

#include <bits/stdc++.h>

int main(void) {
  int n,m,i,ans,g;
  int a[10000];
  ans=0;
  cin >> n >> m;
  for(i=0;i<n;i++)
  {
    cin>>a[i];
    g+=a[i];
  }
  for(i=0;i<n;i++)
  {
    if(a[i]*4*m>=g)
    {
      ans++;
    }
  }
  if(ans>=m)
  {
    printf("Yes");
  }
  else
  {
    printf("No");
  }
  

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> n >> m;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <stdio.h>

int main(void) {
  int n,m,i,p,ans,g;
  int a[10000];
  ans=0;
  cin >> n >> m;
  for(i=0;i<n;i++)
  {
    cin>>a[i];
    g+=a[i];
  }
  for(i=0;i<n;i++)
  {
    if(a[i]*4*m>=g)
    {
      ans++;
    }
  }
  if(ans>=m)
  {
    printf("Yes");
  }
  else
  {
    printf("No");
  }
  

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> n >> m;
      |   ^~~
Language: C

#include<stdio.h>
int main()
{
int n,m,i,sw;
float bo,m,sum;
  sum=0;
scanf("%d %f",&n,&m);
int a[n];
  
  for(i=0;i<n;++i)
  {
  scanf("%d",&a[i]);
  sum=sum+a[i];
  }
  bo=sum/(4*m);
  
  for(i=0;i<n;++i)
  {
  if(a[i]>=bo) sw++; 
  }
  
  if(sw>=m) printf("Yes");
  else printf("No");
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:10: error: conflicting types for 'm'; have 'float'
    5 | float bo,m,sum;
      |          ^
main.c:4:7: note: previous declaration of 'm' with type 'int'
    4 | int n,m,i,sw;
      |       ^
Language: C++

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

int main() {
    int a,b;
    cin >> a >> b;
    int count = 0;
    int num = 0;
    vector <int> vec(a);
    for(int i = 0;i<a;i++){
      cin >> vec.at(i);
      count += vec.at(i);
    }
    for(int i = 0;i<a;i++){
      if(vec.at(i)>=(count/4)num++;
    }
  if(num>=b) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:30: error: expected ';' before 'num'
   15 |       if(vec.at(i)>=(count/4)num++;
      |                              ^~~
      |                              ;
a.cc:16:5: error: expected primary-expression before '}' token
   16 |     }
      |     ^
a.cc:15:36: error: expected ')' before '}' token
   15 |       if(vec.at(i)>=(count/4)num++;
      |         ~                          ^
      |                                    )
   16 |     }
      |     ~                               
a.cc:16:5: error: expected primary-expression before '}' token
   16 |     }
      |     ^
Language: C++

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

typedef long long ll;
typedef long double ld;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ld, ld> pd;

typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, a) for (int i = 0; i < (a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= (a); i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
#define trav(a, x) for (auto& a : x)
#define deb(x)     cout << #x << " = "<<x<<endl

#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound

#define sz(x) (int)x.size()
#define beg(x) x.begin()
#define en(x) x.end()
#define all(x) beg(x), en(x)

int MOD = 1000000007; // 998244353
const ll INF = 1e18;
const int MX = 200005;


ll gcd(ll  a , ll b) {
	return (b == 0) ? a : gcd(b, a % b);
}
ll binpow(ll a, ll b) {
	ll res = 1;
	while (b > 0) {
		if (b & 1)
			res = res * a;
		a = a * a;
		b >>= 1;
	}
	return res;
}
ll powmod(ll a, ll b, ll m) {
	a %= m;
	ll res = 1;
	while (b > 0) {
		if (b & 1)
			res = res * a % m;
		a = a * a % m;
		b >>= 1;
	}
	return res;
}
ll modinv(ll n, ll p)
{
	return powmod(n, MOD - 2, MOD);
}
void max_self(ll &a, ll b) {
	a = max(a, b);
}
bool is_ap(vl v, int n) {
	ll d = v[1] - v[0];
	F0R(i, n) {
		if (v[i] != v[0] + i * d)
			return false;
	}
	return true;
}


int main(int argc, char const *argv[])
{
	// two magical lines to speed up IO
	cin.tie(0);
	ios_base::sync_with_stdio(false);
#ifndef ONLINE_JUDGE
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	int n, m;
	cin >> n >> m;
	int a[n];
	double sum = 0,
	       int cnt = 0;
	F0R(i, n) {
		cin >> a[i];
		sum += a[i];
	}
	sum /= (4 * m);
	F0R(i, n) {
		if (a[i] >= (sum + 1)) {
			cnt++;

		}


	}
	if (cnt >= m)
		cout << "Yes\n";
	else
		cout << "No\n";




}




Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:95:16: error: expected unqualified-id before 'int'
   95 |                int cnt = 0;
      |                ^~~
a.cc:103:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
  103 |                         cnt++;
      |                         ^~~
      |                         int
a.cc:109:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
  109 |         if (cnt >= m)
      |             ^~~
      |             int
Language: C++

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



}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: expected ';' before '}' token
   14 |   if(a[i]<1/(4*m)){count++}
      |                           ^
      |                           ;
Language: C++

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



}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:6: error: 'i' was not declared in this scope
   13 |  for(i=0;i<n;i++){
      |      ^
a.cc:14:16: error: 'M' was not declared in this scope
   14 |   if(a[i]<1/(4*M)){count++}
      |                ^
a.cc:14:27: error: expected ';' before '}' token
   14 |   if(a[i]<1/(4*M)){count++}
      |                           ^
      |                           ;
Language: C++

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



}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: structured binding declaration cannot have type 'int'
    6 |  int [n];
      |      ^~~
a.cc:6:6: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:6:7: error: conflicting declaration 'auto n'
    6 |  int [n];
      |       ^
a.cc:4:6: note: previous declaration as 'int n'
    4 |  int n,m;
      |      ^
a.cc:6:9: error: expected initializer before ';' token
    6 |  int [n];
      |         ^
a.cc:10:9: error: 'a' was not declared in this scope
   10 |    cin>>a[i];
      |         ^
a.cc:13:6: error: 'i' was not declared in this scope
   13 |  for(i=0;i<n;i++){
      |      ^
a.cc:14:6: error: 'a' was not declared in this scope
   14 |   if(a[i]<1/(4*M)){count++}
      |      ^
a.cc:14:16: error: 'M' was not declared in this scope
   14 |   if(a[i]<1/(4*M)){count++}
      |                ^
a.cc:14:27: error: expected ';' before '}' token
   14 |   if(a[i]<1/(4*M)){count++}
      |                           ^
      |                           ;
Language: C

#include <stdio.h>
void sort(int a[],int n){
  int i,j,temp;
   for(i=0;i<n;i++){
     for(j=n-1;j>=i+1;j--){
       if(a[j]<a[j-1]){
         temp=a[j];
         a[j]=a[j-1];
         a[j-1]=temp;
       })
     }
   }
}
int main(void){
  int n,m;
  scanf("%d %d",&n,&m);
  int a[n];
  int i;
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }

  sort(a[i],n);
  return 0;
  }

Compiler output:
main.c: In function 'sort':
main.c:10:9: error: expected statement before ')' token
   10 |        })
      |         ^
main.c: In function 'main':
main.c:23:9: error: passing argument 1 of 'sort' makes pointer from integer without a cast [-Wint-conversion]
   23 |   sort(a[i],n);
      |        ~^~~
      |         |
      |         int
main.c:2:15: note: expected 'int *' but argument is of type 'int'
    2 | void sort(int a[],int n){
      |           ~~~~^~~
Language: C++

#include<bits/stdc++.h>
#include <decimal/decimal>
using namespace std;
int main(){
  int n;
  double m;
  cin >> n >> m;
  vector<int> a(n);
  double summation = 0;
  for (int i = 0; i < n; i++){
    double c;
    cin >> c;
    a.at(i) = c;
    summation = summation + c; 
  }
  std::decimal::decimal32 border = summation / (4 * m);
  int judge = 0;
  for (int i = 0; i < n; i++){
    if (a.at(i) >= border){
      judge++;
    }
  }
  if (judge >= m){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:46: error: conversion from 'double' to 'std::decimal::decimal32' is ambiguous
   16 |   std::decimal::decimal32 border = summation / (4 * m);
      |                                    ~~~~~~~~~~^~~~~~~~~
In file included from a.cc:2:
/usr/include/c++/14/decimal/decimal:251:5: note: candidate: 'std::decimal::decimal32::decimal32(__decfloat32)'
  251 |     decimal32(__decfloat32 __z)                 : __val(__z) {}
      |     ^~~~~~~~~
/usr/include/c++/14/decimal/decimal:248:5: note: candidate: 'std::decimal::decimal32::decimal32(long long unsigned int)'
  248 |     decimal32(unsigned long long __z)           : __val(__z) {}
      |     ^~~~~~~~~
/usr/include/c++/14/decimal/decimal:247:5: note: candidate: 'std::decimal::decimal32::decimal32(long long int)'
  247 |     decimal32(long long __z)                    : __val(__z) {}
      |     ^~~~~~~~~
/usr/include/c++/14/decimal/decimal:246:5: note: candidate: 'std::decimal::decimal32::decimal32(long unsigned int)'
  246 |     decimal32(unsigned long __z)                : __val(__z) {}
      |     ^~~~~~~~~
/usr/include/c++/14/decimal/decimal:245:5: note: candidate: 'std::decimal::decimal32::decimal32(long int)'
  245 |     decimal32(long __z)                         : __val(__z) {}
      |     ^~~~~~~~~
/usr/include/c++/14/decimal/decimal:244:5: note: candidate: 'std::decimal::decimal32::decimal32(unsigned int)'
  244 |     decimal32(unsigned int __z)                 : __val(__z) {}
      |     ^~~~~~~~~
/usr/include/c++/14/decimal/decimal:243:5: note: candidate: 'std::decimal::decimal32::decimal32(int)'
  243 |     decimal32(int __z)                          : __val(__z) {}
      |     ^~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include <decimal/decimal>
using namespace std;
int main(){
  int n;
  double m;
  cin >> n >> m;
  vector<int> a(n);
  double summation = 0;
  for (int i = 0; i < n; i++){
    double c;
    cin >> c;
    a.at(i) = c;
    summation = summation + c; 
  }
  decimal32 border = summation / (4 * m);
  int judge = 0;
  for (int i = 0; i < n; i++){
    if (a.at(i) >= border){
      judge++;
    }
  }
  if (judge >= m){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'decimal32' was not declared in this scope; did you mean 'std::decimal::decimal32'?
   16 |   decimal32 border = summation / (4 * m);
      |   ^~~~~~~~~
      |   std::decimal::decimal32
In file included from a.cc:2:
/usr/include/c++/14/decimal/decimal:227:9: note: 'std::decimal::decimal32' declared here
  227 |   class decimal32
      |         ^~~~~~~~~
a.cc:19:20: error: 'border' was not declared in this scope
   19 |     if (a.at(i) >= border){
      |                    ^~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'i' was not declared in this scope
   11 |     cin>>A.at(i);
      |               ^
a.cc:17:20: error: 'i' was not declared in this scope
   17 |     if(count<=A.at(i)){
      |                    ^
Language: C

#include<stdio.h>
int main(void){
  int  count,i,n,m,a[110],all=0;
  scanf("%d %d",&n,&m);
  for(i=0;i<n;i++){ scanf("%d",&a[i]);  all=all+a[i];  }
  i=0;
  count=n;
  for(i=0;i<n;i++){ if(a[i]<=all/(4*m)){count--;} }
  puts(count=>m?"Yes":"No");
  return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected expression before '>' token
    9 |   puts(count=>m?"Yes":"No");
      |              ^
Language: C++

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

int main(){
  int N,M,wa=0;
  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());
  if(A[N-M]*4*M < sum){
    cout<<"No"<<endl;
    return 0;
  }
    cout<<"Yes"<<endl;
}


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

#include<stdio.h>
int main() {
    int n, m, vote = 0, count = 0, a[100];
    scanf("%d %d", &n, &m);
    for (int i = 0; i < n; i++)
    {
        scanf("%d", &a[i]);
    }
    for (int i = 0; i < n; i++)
    {
        total = total + a[i];
    }
    for (int i = 0; i < n; i++)
    {
        if (a[i] >= total / (4 * m))
        {
            count = count + 1;
        }

    }

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

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:9: error: 'total' undeclared (first use in this function)
   11 |         total = total + a[i];
      |         ^~~~~
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'duble' was not declared in this scope; did you mean 'double'?
    7 |     duble a = 0;
      |     ^~~~~
      |     double
a.cc:14:7: error: 'a' was not declared in this scope
   14 |       a = a + vec.at(i);
      |       ^
a.cc:17:3: error: 'a' was not declared in this scope
   17 |   a = a/(4 * m);
      |   ^
Language: C++

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

int main(){
    int n, m;
    cin >> n >> m;
    int a[n];
    int i;
    int all=0;
    for (i = 0; i<n ; i++){
        cin >> a[i];
        all += a[i];
    }
    
    int bunki=all / 4 / m;
    sort(a, a+n, std::greater<>());
    for (i = 0; i<m; i++){
        if(a[i] < bunki){
            std::cout << "No" << std::endl;
            return 0;
        }
    }
    std::cout << "Yes" << std::endl;
    return 0;

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

def main():
    n,m = map(int, input().split())
    a = sorted(list(map(int, input().split())),reverse = True)
    all = sum(a)
    cnt = 0
    for i in(a):
        if(i * 4 * m >= all and cnt < m):
            cnt += 1
    if cnt >= m:
        print('Yes')
    else:
        print('No')
main()

Compiler output:
a.cc:10:15: warning: multi-character character constant [-Wmultichar]
   10 |         print('Yes')
      |               ^~~~~
a.cc:12:15: warning: multi-character character constant [-Wmultichar]
   12 |         print('No')
      |               ^~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
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();
      System.out.println();
      int A[]=new int[N];
      int cnt=0;
      int total=0;
      for(int i=0;i<N;i++){
         A[i]=sc.nextInt();
         total+=A[i];
      }
      for(int j=0;j<N;j++){
         if(A[j]>=float(total/(4*M))){
            cnt++;
         }
      }
      if(cnt>=M){
         System.out.println("Yes");
      }else{
         System.out.println("No");
      }
   }
}


Compiler output:
Main.java:16: error: '.class' expected
         if(A[j]>=float(total/(4*M))){
                       ^
Main.java:16: error: ';' expected
         if(A[j]>=float(total/(4*M))){
                                    ^
2 errors
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();
      System.out.println();
      int A[]=new int[N];
      int cnt=0;
      int total=0;
      for(int i=0;i<N;i++){
         A[i]=sc.nextInt();
         total+=A[i];
      }
      for(int j=0;j<N;j++){
         if(A[j]>=double(total/(4*M))){
            cnt++;
         }
      }
      if(cnt>=M){
         System.out.println("Yes");
      }else{
         System.out.println("No");
      }
   }
}


Compiler output:
Main.java:16: error: '.class' expected
         if(A[j]>=double(total/(4*M))){
                        ^
Main.java:16: error: ';' expected
         if(A[j]>=double(total/(4*M))){
                                     ^
2 errors
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();
      System.out.println();
      int A[]=new int[N];
      int cnt=0;
      int total=0;
      for(int i=0;i<N;i++){
         A[i]=sc.nextInt();
         total+=A[i];
      }
      for(int j=0;j<N;j++){
         if(A[i]>=total/4*M){
            cnt++;
         }
      }
      if(cnt>=M){
         System.out.println("Yes");
      }else{
         System.out.println("No");
      }
   }
}


Compiler output:
Main.java:16: error: cannot find symbol
         if(A[i]>=total/4*M){
              ^
  symbol:   variable i
  location: class Main
1 error
Language: C

#include<stdio.h>
#define NUM 1000

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


Compiler output:
main.c: In function 'main':
main.c:14:15: error: invalid suffix "m" on integer constant
   14 |       if(a[i]*4m>=total){
      |               ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m; cin >> n >> m;
  vector<int> a(n);
  int vote = 0;
  int cnt = 0;
  for(int i = 0; i < n; i++){
    cin >> a.at(i);
    vote += a.at(i);
  }
  vote = vote /(4 * m);
  
  for(int i = 0; i < n; i++){
    if(a.at(i) >= vote){
      cnt++;
      if(cnt == m){
    	cout << "Yes";
        return 0;
      }
    }
  }

  else
    cout << "No";
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: 'else' without a previous 'if'
   24 |   else
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m; cin >> n >> m;
  vector<int> a(n);
  int vote = 0;
  int cnt = 0;
  for(int i = 0; i < n; i++){
    cin >> a.at(i);
    vote += a.at(i);
  }
  vote = vote /(4 * m);
  
  for(int i = 0; i < n; i++){
    if(a.at(i) >= vote)
      cnt++;
      if(cnt == m){
    	cout << "Yes";
        return 0;
      }
  }

  else
    cout << "No";
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: 'else' without a previous 'if'
   23 |   else
      |   ^~~~
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:18:16: error: 'm' undeclared (first use in this function)
   18 |      if(count>=m) {
      |                ^
main.c:18:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:14:7: error: 'm' undeclared (first use in this function)
   14 |       m--;
      |       ^
main.c:14:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
  int n,m;
  cin >> n >> m;
  int t=0;
  vector<int> a;
  rep(i,n){
    int b;
    scanf("%d",&b);
    a.push_back(b);
    t+=b;
  }
  bool k=0;
  int c=0;
  t /=(4*m);
  rep(i,n){
    if(a[i]>=t)++c;
    if(c==m){
      k=1;
      break;
    }
  }
  if(k) printf("%s\n", "Yes");
  else printf("%s\n", "No");
  return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <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:11:3: error: 'vector' was not declared in this scope
   11 |   vector<int> a;
      |   ^~~~~~
a.cc:11:10: error: expected primary-expression before 'int'
   11 |   vector<int> a;
      |          ^~~
a.cc:14:5: error: 'scanf' was not declared in this scope
   14 |     scanf("%d",&b);
      |     ^~~~~
a.cc:15:5: error: 'a' was not declared in this scope
   15 |     a.push_back(b);
      |     ^
a.cc:22:8: error: 'a' was not declared in this scope
   22 |     if(a[i]>=t)++c;
      |        ^
a.cc:28:9: error: 'printf' was not declared in this scope
   28 |   if(k) printf("%s\n", "Yes");
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include <bits/stdc++.h>
a.cc:29:8: error: 'printf' was not declared in this scope
   29 |   else printf("%s\n", "No");
      |        ^~~~~~
a.cc:29:8: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:15:6: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
   15 |   if(cnt>=m)printf("Yes\n");
      |      ^~~
      |      int
main.c:15:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:6:20: error: variable-sized object may not be initialized except with an empty initializer
    6 |         int a[n] = {0},i,sum = 0;
      |                    ^
Language: C

#include <stdio.h>
int main(){
  int M, N;
  int A[1000];
  scanf("%d %d", &N, &M);
  for (int i < 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  int total = 0;
  for (int i = 0; i < N; i++) {
    total += A[i];
  }
  int count = 0;
  for (int i = 0; i < N; i++) {
    if (A[i] >= total / (4.0 * M)) {
      count += 1;
    }
  }
  if (count >= M) {
    printf("Yes");
  }
  else {
    printf("No");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    6 |   for (int i < 0; i < N; i++) {
      |              ^
main.c:6:19: error: 'i' undeclared (first use in this function)
    6 |   for (int i < 0; i < N; i++) {
      |                   ^
main.c:6:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:24: error: expected ')' before ';' token
    6 |   for (int i < 0; i < N; i++) {
      |       ~                ^
      |                        )
Language: C++

// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

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

//for loop関係
#define rep(i,a,n) for(int i=(a);i<(n);++i)
#define repe(i,a,n) for(int i=(a);i<=(n);++i)
#define rrep(i,n,a) for(int i=(n);n>(a);--i)
#define rrepe(i,n,a) for(int i=(n);n>=(a);--i)

//略記
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define ENDL << "\n"

using ll = long long;
using P = pair<int,int>;
using itn = int;

//定数
const int INF = 1<<30;
const ll MOD = 1000000007;
const long double PI =(acos(-1));

//Degree <-> Radian
double toRad(double d){ double rad; rad=d*PI/180; return rad; }
double toDegree(double rad){ double d; d=rad*180/PI; return d; }
//The least common multiple : lcm
ll lcm(int a,int b){ return a*b/__gcd(a,b); }
//素数判定
bool isPrime(int n){
    int i; 
    if(n<2) return 0;
    else if(n==2) return 1;
    if(n%2==0) return 0;
    for(i=3;i*i<=n;i+=2) if(n%i==0) return 0;
    return 1;
}


int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n,m;
    cin >> n >> m;
    int count=0;
    int a=0;
    for(int i=0;i<N;++i){
        cin >> a;
        if(a>(1/(4*m))) count++;
    }
    if(count>=m){
        cout << "Yes" ENDL;
    }else cout << "No" ENDL;
    
    return 0;
}

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

#include <iostream>
using namespace std;
int main(){
 	int cnt=0,n,m,sum=0;
  	cin>>n>>m;
  	int a[n];
  	for(int i=0;i<n;i++){
     	cin>>a[i];
      	sum+=a[i]
    }
  	for(int i=0;i<n;i++){
     	if(a[i]>sum/4/m){
         	cnt++; 
        }
    }
  	if(cnt>=m){
    	cout<<'Yes';  
    }
  	else cout<<'No';
}

Compiler output:
a.cc:17:15: warning: multi-character character constant [-Wmultichar]
   17 |         cout<<'Yes';
      |               ^~~~~
a.cc:19:20: warning: multi-character character constant [-Wmultichar]
   19 |         else cout<<'No';
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before '}' token
    9 |         sum+=a[i]
      |                  ^
      |                  ;
   10 |     }
      |     ~
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:13:35: error: expected ')' before 'a'
   13 |   for(int i=0; i<n; i++)if((double a[i]>=t)cnt++;
      |                            ~      ^~
      |                                   )
main.c:13:49: error: expected ')' before ';' token
   13 |   for(int i=0; i<n; i++)if((double a[i]>=t)cnt++;
      |                           ~                     ^
      |                                                 )
main.c:16:1: error: expected expression before '}' token
   16 | }
      | ^
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'i' undeclared (first use in this function)
    6 |   int a[i], sum=0;
      |         ^
main.c:6:9: 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;
  cin>>n>>m;
  int a[n];
  for(int i=0;i<n;i++){
	int temp;
    cin>>temp;
    a[i]=temp;
    sum+=temp;
  }
  int g=sum/4*m;
  sort(a,a+n);
  reverse(a,a+n);
  int cnt=0;
  for(int i=0;i<n;i++){
	if(a[i]>=g){
      cnt++;
    }
  }
  if(cnt>=m){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'sum' was not declared in this scope
   11 |     sum+=temp;
      |     ^~~
a.cc:13:9: error: 'sum' was not declared in this scope
   13 |   int g=sum/4*m;
      |         ^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   19 |       cnt++;
      |       ^~~
      |       int
a.cc:22:6: error: 'cnt' was not declared in this scope; did you mean 'int'?
   22 |   if(cnt>=m){
      |      ^~~
      |      int
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'sum' was not declared in this scope
   11 |     sum+=temp;
      |     ^~~
a.cc:13:9: error: 'sum' was not declared in this scope
   13 |   int g=sum/4*m;
      |         ^~~
a.cc:18:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   18 |       cnt++;
      |       ^~~
      |       int
a.cc:21:6: error: 'cnt' was not declared in this scope; did you mean 'int'?
   21 |   if(cnt>=m){
      |      ^~~
      |      int
Language: Java


import java.util.Scanner;

public class B {
    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 sum = 0;
        for (int i = 0; i < N; i++) {
            a[i] = sc.nextInt();
            sum += a[i];
        }

        int count = 0;

        double reg = sum / 4 / M + sum % (4*M);

        for (int k: a) {
            if (k < reg) continue;
            else count++;
        }
        if (count >= 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: Java

import java.util.Scanner;
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];
        int sum = 0;
        for (int i = 0; i < N; i++) {
            a[i] = sc.nextInt();
            sum += a[i];
        }

        int count = 0;

        double reg = sum / 4 / M;

        for (int k: a) {
            if (k >= reg) count++;
        }
        if (count >= M) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

Compiler output:
Main.java:26: error: reached end of file while parsing
    }
     ^
1 error
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:16:7: error: 'F' undeclared (first use in this function)
   16 |       F++;
      |       ^
main.c:16:7: note: each undeclared identifier is reported only once for each function it appears in