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

#include<cstring>
#include<iostream>
#include<algorithm>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;
using namespace std;

int main() {
    int n, m;
    int a[101];
    cin >> n >> m;
    rep(i, n) cin >> a[i];
    int to = 0;
    rep(i, n) {
        to += a[i];
    }
    
    int count = 0;

    rep(i, n) {
        if (a[i]*4m >= to) count += 1;
    }
    if (count < m) {
        cout << "No" << endl;
    } else {
        cout << "Yes" << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: unable to find numeric literal operator 'operator""m'
   21 |         if (a[i]*4m >= to) count += 1;
      |                  ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: invalid types 'double[int]' for array subscript
   15 |   if(a[m-1]<sum)
      |       ^
Language: C++

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

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

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

int main(){
  int N,M;
  cin>>N>>M;
  vector<int> a(N);
  rep(i,N) cin>>a[i];
  int sum=0;
  rep(i,N) sum=sum+a[i];
  int check=sum/(4*M);
  sort(a.begin(),a.end());
  reverse(a.begin(),a.end());
  if(a[M-1]>=check) cout<<"Yes"<<endl;
  if(a[m-1]<check) cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: 'm' was not declared in this scope
   18 |   if(a[m-1]<check) cout<<"No"<<endl;
      |        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before 's'
   12 |         g=1
      |            ^
      |            ;
   13 |   s/=(4*m); s-=g;
      |   ~
Language: C++

#include<iostream>
using namespace std;
int main()
{
	double r,d,n,k,x,i,x1=0,sum=0;
	double  a,b,c;
	cin>>n>>k;
	double ara[n];
	for(i=0;i<n;i++)
	{
		cin>>ara[i];
		sum+=ara[i];
	}
	x1=(sum/(4*k));
	double cnt=0;
	for(i=0;i<n;i++)
	{
		if(ara[i]>x1)cnt++;
		
	}
	if(cnt>=k)
	cout<<"Yes";
	else cout<<"No";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    8 |         double ara[n];
      |                    ^
a.cc:8:20: error: could not convert 'n' from 'double' to 'long unsigned int'
    8 |         double ara[n];
      |                    ^
      |                    |
      |                    double
a.cc:8:20: error: size of array 'ara' has non-integral type 'double'
a.cc:11:25: error: invalid types 'double [1][double]' for array subscript
   11 |                 cin>>ara[i];
      |                         ^
a.cc:12:25: error: invalid types 'double [1][double]' for array subscript
   12 |                 sum+=ara[i];
      |                         ^
a.cc:18:23: error: invalid types 'double [1][double]' for array subscript
   18 |                 if(ara[i]>x1)cnt++;
      |                       ^
Language: C++

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

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

#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    cin >> n >> m;
    int cnt = 0;
    int sum = 0;
    for (int i = 1; i <= n; i ++)
    {
        cin >> v[i];
        sum += v[i];
    }
    int prod = 4 * m;
    for (int i = 1; i <= n; i ++)
    {
        if (v[i] * prod >= sum)
            ++ cnt;
    }
    cout << (cnt >= m ? "Yes" : "No");
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'n' was not declared in this scope; did you mean 'yn'?
   10 |     cin >> n >> m;
      |            ^
      |            yn
a.cc:10:17: error: 'm' was not declared in this scope; did you mean 'tm'?
   10 |     cin >> n >> m;
      |                 ^
      |                 tm
a.cc:15:16: error: 'v' was not declared in this scope
   15 |         cin >> v[i];
      |                ^
a.cc:21:13: error: 'v' was not declared in this scope
   21 |         if (v[i] * prod >= sum)
      |             ^
Language: C++

#include <iostream>
#include <vector>

int main() {
  int n, m;
  std::cin >> n >> m;
                                                                                
  std::vector<int> a(n);
  int total = 0;
  for (int i = 0; i < n; ++i) {
    std::cin >> a.at(i);
    total += a[i];
  }
  int threshold = total / (4 * m);
  std::sort(a.begin(), a.end(), std::greater<int>());
  std::cout << ((a[m-1] < threshold) ? "No" : "Yes") << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   15 |   std::sort(a.begin(), a.end(), std::greater<int>());
      |        ^~~~
      |        qsort
Language: C++

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

#define deb(x) cout << #x << " " << x << endl;
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<n;i++)
#define vi vector<int>
#define ii pair<int,int>
#define vii vector<ii>
#define ll long long
#define pb push_back
#define endl "\n"
#define mp map<int,int>
#define F first
#define S second
#define sz(v) (int)v.size()
#define mod 1000000007

void c_p_c()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

}

bool cmp(int a, int b){
	return a > b;
}

int main(){
	c_p_c();
	int n,m; cin >> n >> m;
	ll sum = 0;
	int a[n];
	fo(i,n){
		cin >> a[i];
		sum += a[i];
	}
	//sum += 1;

	//bool flag = false;
	// int cnt = 0;
	// sort(a,a+n,cmp);
	// fo(i,n){
	// 	if(a[i] < sum/(4*m)) break;
	// 	cnt++;
	// }

	// if(cnt>=m) cout << "Yes" << endl;
	// else cout << "No" << endl;

	if(a[m-1] >= s/(4*m)) cout << "Yes" << endl;
	else cout << "No" << endl;

	return 0;
}

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

#include <iostream>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

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: In function 'int main()':
a.cc:8:9: error: 'vector' was not declared in this scope
    8 |         vector<int> a(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 | #define rep(i,n) for(int i=0;i<n;i++)
a.cc:8:16: error: expected primary-expression before 'int'
    8 |         vector<int> a(n);
      |                ^~~
a.cc:9:25: error: 'a' was not declared in this scope
    9 |         rep(i,n) cin >> a[i];
      |                         ^
a.cc:11:21: error: 'a' was not declared in this scope
   11 |         rep(i,n) s+=a[i];
      |                     ^
a.cc:14:20: error: 'a' was not declared in this scope
   14 |                 if(a[i]*4*m >= s ) cnt++;
      |                    ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:15:18: error: expected ')' before '{' token
   15 |     if(s%(4*m!=0){
      |       ~          ^
      |                  )
main.c:18:3: error: expected expression before '}' token
   18 |   }
      |   ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:17:5: error: implicit declaration of function 'Printf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   17 |     Printf("No");
      |     ^~~~~~
      |     printf
Language: C++

#include<stdio.h>
 
void bsort(int a[], int n){
	int i, j, temp;
 
	for(i = 0; i < n - 1; i++){
		for(j = n - 1; j > i; j--){
			if(a[j-1] > a[j]){
				temp = a[j-1];
				a[j-1] = a[j];
				a[j] = temp;
			}
		}
	}
}
 
int main(void){
	int i, N, M, SUM, A[101] = {0};
 
	scanf("%d %d", &N, &M);
 
	for(i = 0; i < N ; i++)
		scanf("%d", &A[i]);
 
 
	for(i = 0; i < N; i++)
		SUM = SUM + A[i];
 
	bsort(A, N);
 
 
	if(A[N-M] >= (float SUM)/(4*M))
		printf("Yes");
	else
		printf("No");
 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:23: error: expected primary-expression before 'float'
   32 |         if(A[N-M] >= (float SUM)/(4*M))
      |                       ^~~~~
a.cc:32:23: error: expected ')' before 'float'
   32 |         if(A[N-M] >= (float SUM)/(4*M))
      |                      ~^~~~~
      |                       )
a.cc:33:30: error: expected ')' before ';' token
   33 |                 printf("Yes");
      |                              ^
      |                              )
a.cc:32:11: note: to match this '('
   32 |         if(A[N-M] >= (float SUM)/(4*M))
      |           ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define int int64_t
using namespace std;

int main() {
	int N, M;
	cin >> N >> M;
	vector<int> a(N, 0);


	for (int i = 1; i <= N; i++) {
		cin >> a.at(i - 1);
	}

	sort(a.begin(), a.end());
	reverse(a.begin(), a.end());

	int sum = 0;
	for (int i = 1; i <= N; i++) {
		sum += a.at(i - 1);
	}

	if (a.at(M-1) * 4 * M >= sum) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

}

Compiler output:
a.cc:4:13: error: '::main' must return 'int'
    4 | #define int int64_t
      |             ^~~~~~~
a.cc:7:1: note: in expansion of macro 'int'
    7 | int main() {
      | ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <numeric>
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl


int main() {
    ll n,m;
    cin >> n >> m;
    float a[n];
    float cnt = 0;
    bool flg = true;
    for(ll i=0;i < n;i++){
        cin >> a[i];
        cnt += a[i];
    }
    sort(a, a+n, greater<int>());

    for(ll i=0;i < m;i++){
        if(!cnt <= 4 * m * a[i]){{
            flg = false;
        }
    }
    Yes(flg);


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:13:12: note: to match this '{'
   13 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <algorithm>
#include <numeric>
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl


int main() {
    ll n,m;
    cin >> n >> m;
    float a[n];
    float cnt = 0;
    bool flg = true;
    for(ll i=0;i < n;i++){
        cin >> a[i];
        cnt += a[i];
    }
    sort(a, a+n, greater<int>());

    for(ll i=0;i < m;i++){
        if(floor(cnt <= 4 * m * a[i]){
            flg = false;
        }
    }
    Yes(flg);


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:38: error: expected ')' before '{' token
   26 |         if(floor(cnt <= 4 * m * a[i]){
      |           ~                          ^
      |                                      )
a.cc:29:5: error: expected primary-expression before '}' token
   29 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using lint = long;
using ll = long long;
#define rep(i,n) for(lint (i) = 0;(i) < (lint)(n);(i)++)
#define repInRange(i,start,end) for(lint (i) = (start);(i) < (end);++(i))
using lpair = pair<lint,lint>;
using vl = vector<lint>;
using vll = vector<long long>;
using Llist = list<lint>;
using vs = vector<string>;
#define all(v) (v).begin(),(v).end()
#define out1(x) cout << (x) << '\n';

ll pow(ll k,ll l) {
	ll ret = 1;
	rep(i,l) {
		ret *= k;
	}
	return ret;
}

template <typename T>
T sum(vector<T> vec) {
	ll ret = 0;
	rep(i,vec.size()) {
		ret += vec.at(i);
	}
	return ret;
}

void Main() {
	lint m,n,sum = 0,c;
	cin >> m >> n;
	vl a(n);
	rep(i,n) {
		cin >> a[i];
		sum += a[i];
	}
	sort(all(a));
	rep(c,n)
		if ((double)a[n-c-1] <= (double)(sum/(4*m)))
			break;
	if (c >= m)
		out1("Yes");
	else
		out1("No");
}

signed main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	Main();
	return 0;
}


Compiler output:
a.cc: In function 'void Main()':
a.cc:46:9: error: 'else' without a previous 'if'
   46 |         else
      |         ^~~~
Language: C++

nclude<stdio.h>
 
void bsort(int a[], int n){
	int i, j, temp;
 
	for(i = 0; i < n - 1; i++){
		for(j = n - 1; j > i; j--){
			if(a[j-1] > a[j]){
				temp = a[j-1];
				a[j-1] = a[j];
				a[j] = temp;
			}
		}
	}
}
 
int main(void){
	int i, N, M, SUM, A[101] = {0};
 
	scanf("%d %d", &N, &M);
 
	for(i = 0; i < N ; i++)
		scanf("%d", &A[i]);
 
 
	for(i = 0; i < N; i++)
		SUM = SUM + A[i];
 
	bsort(A, N);
 
 
	if(A[N-M] >= SUM/(4*M))
		printf("Yes");
	else
		printf("No");
 
	return 0;
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude<stdio.h>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:20:9: error: 'scanf' was not declared in this scope
   20 |         scanf("%d %d", &N, &M);
      |         ^~~~~
a.cc:29:9: error: 'bsort' was not declared in this scope
   29 |         bsort(A, N);
      |         ^~~~~
a.cc:33:17: error: 'printf' was not declared in this scope
   33 |                 printf("Yes");
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | nclude<stdio.h>
a.cc:35:17: error: 'printf' was not declared in this scope
   35 |                 printf("No");
      |                 ^~~~~~
a.cc:35:17: 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;
  int count=0;
  int SUM=0;
  float line;
  scanf("%d",&N);
  scanf("%d",&M);
  int array[N];
  for(int i=0;i<N;i++){
    scanf("%d",&array[i]);
  }
   for(int i=0;i<N;i++){
    SUM+=array[i];
  }
     for(int i=0;i<N;i++){
    if(array[i]*(4*M)>=SUM)count++;
     }
  if(count>=M)printf("Yes\n");
   else printf("No\n")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: expected ';' before '}' token
   20 |    else printf("No\n")
      |                       ^
      |                       ;
   21 | }
      | ~
Language: C++

#include<stdio.h>
int main(){
  int N,M;
  int count=0;
  int SUM=0;
  float line;
  scanf("%d",&N);
  scanf("%d",&M);
  float array[N];
  for(int i=0;i<N;i++){
    scanf("%f",&array[i]);
  }
   for(int i=0;i<N;i++){
    SUM+=array[i];
  }
  line=SUM/(4*M);
     for(int i=0;i<N;i++){
    if(array[i]>=line)count++;
     }
  if(count>=M)printf("Yes\n");
   else printf("No\n")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:23: error: expected ';' before '}' token
   21 |    else printf("No\n")
      |                       ^
      |                       ;
   22 | }
      | ~
Language: C++

#include<stdio.h>
int main(){
  int N,M;
  int count=0;
  int SUM=0;
  float line;
  scanf("%d",&N);
  scanf("%d",&M);
  float array[N];
  for(int i=0;i<N;i++){
    scanf("%f",&array[i]);
  }
   for(int i=0;i<N;i++){
    SUM+=array[i];
  }
  line=SUM/(4*M);
     for(int i=0;i<N;i++){
    if(array[i]>=line)count++;
     }
  if(count>=M)printf("Yes");
   else printf("No")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: expected ';' before '}' token
   21 |    else printf("No")
      |                     ^
      |                     ;
   22 | }
      | ~
Language: C++


#include<stdio.h>
int main(){
  int N,M;
  int count=0;
  int SUM=0;
  double line;
  scanf("%d",&N);
  scanf("%d",&M);
  double array[N];
  for(int i=0;i<N;i++){
    scanf("%lf",&array[i]);
  }
   for(int i=0;i<N;i++){
    SUM+=array[i];
  }
  line=SUM/(4*M);
     for(int i=0;i<N;i++){
    if(array[i]>=line)count++;
     }
  if(count>=M)printf("Yes");
   else printf("No")
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:21: error: expected ';' before '}' token
   22 |    else printf("No")
      |                     ^
      |                     ;
   23 | }
      | ~
Language: C++


#pragma warning(disable:4996)


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void) {
    long  N=1, M;
    double  total = 0;

    //入力
    scanf("%ld", &N);
    scanf("%ld", &M);

    long *A, i, cnt = 0;

    A = malloc(sizeof(A) * N);

    for (i = 0; i < N; i++)
    {
        scanf("%ld", &A[i]);
        total += A[i];
    }

    total /= (4 * M);

    for (i = 0; i < N; i++) {
        if (A[i] < total)continue;
        cnt++;
    }
    if (cnt < M)printf("No");
    else printf("Yes");

    free(A);
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: invalid conversion from 'void*' to 'long int*' [-fpermissive]
   20 |     A = malloc(sizeof(A) * N);
      |         ~~~~~~^~~~~~~~~~~~~~~
      |               |
      |               void*
Language: C

#include <stdio.h>
#include <stdlib.h>

int compare_int(const void *a, const void *b){
  return *(int *)b - *(int *)a;
}

int main(int argc, char const *argv[]) {

  int N, M, sum;
  sum = 0;
  scanf("%d", &N);
  scanf("%d", &M);

  int A[100];
  for (int i = 0; i < N; i++) {
    scanf("%d", A + i);
    sum = sum + A[i];
  }

  // printf("総投票数は%d\n", sum);
  qsort(A, N, sizeof(int), compare_int);

  // for (int i = 0; i < N; i++) {
  //   printf("%d\n", A[i]);
  //   if ((M - 1) == i) {
  //     printf("ココ！\n");
  //   }
  // }

  int min = sum / (4 * M);
  // printf("最低投票数は%d\n", min);
  if (A[(M - 1)] <= min) {
    if (sum % (4 * M) == 0) {
      printf("Yes\n");
      return(0)
    }
    printf("No\n");
  }else{
    printf("Yes\n");
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:36:16: error: expected ';' before '}' token
   36 |       return(0)
      |                ^
      |                ;
   37 |     }
      |     ~
Language: C

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

  if(c<m)
    printf("No");
  
}

Compiler output:
main.c: In function 'main':
main.c:34:6: error: 'c' undeclared (first use in this function)
   34 |   if(c<m)
      |      ^
main.c:34:6: 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;
    int M;
    vector<int> A(N);
    int count = 0;
   

    cin >> N >> M;
    for(int i = 0; i < N; i++) {
        cin >> A.at(i);
    }



    for(int i = 0; i < N; i++) {
        if(sum(A) <= A.at(i)*4*M) {
            count++;

        }
    }
    if (count >= M) {
        cout << "Yes" << endl;

    }
    else {
        cout << "No" << endl;
    }
}

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

n,m = map(int,input().split())
a = sorted(list(map(int,input().split())),reverse=True)
print("YNeos"[sum([sum(a)/(4*m)>=a[i] for i in range(m)])==m::2])


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

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

Compiler output:
main.c:29:5: error: redefinition of 'main'
   29 | int main()
      |     ^~~~
main.c:4:5: note: previous definition of 'main' with type 'int()'
    4 | int main()
      |     ^~~~
Language: Java

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


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

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define OUT(s) cout << s << "\n";

using namespace std;
// https://atcoder.jp/contests/abc161

int N,M;
vector<int> A(1000, int(1000));
int ALL = 0;

void Main()
{
    auto t = accumulate(A.bigin(), A.end(), 0U) / (4 * M);
    int c = 0;
    REP(i, N) {
        if (A[i] >= t) c++;
    };
    if (c >= M) {
        OUT("Yes");
    } else {
        OUT("No");
    }
}

int main()
{
	cin.tie(0);
    ios::sync_with_stdio(false);
	// cout << fixed << setprecision(15);
    cin >> N >> M;
    REP(i, N) {
        cin >> A[i];
        ALL = ALL + A[i];
    }
	Main();
    return 0;
}

Compiler output:
a.cc: In function 'void Main()':
a.cc:16:27: error: 'class std::vector<int>' has no member named 'bigin'; did you mean 'begin'?
   16 |     auto t = accumulate(A.bigin(), A.end(), 0U) / (4 * M);
      |                           ^~~~~
      |                           begin
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) {
        cin >> a[i];
    }

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

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

    if(count >= m) {
        cout << "Yes" << endl;
        return 0;
    }

    cout << "No" << endl;
    return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
//ofstream cout("output.out");

#define fast() {ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);}
#define o(a) { cout << #a << ":" << (a) <<" ";}
#define ov(a) { cout << "["; \
	for(int i = 0; i < (a).size(); ++i){ \
		cout << i <<":" << a[i] <<" "; \
		if(i % 10 == 9) cout <<"\n"; \
		} \
	cout << "]"; \
}
#define ovv(a) { cout << "["; \
	for(int i = 0; i < a.size(); ++i){ \
		for(int j = 0; j < a[i].size(); ++j){ \
			cout << "(" << i <<"," <<j <<")" <<":" << a[i][j] <<" "; \
		} \
		cout << "\n"; \
	} \
	cout << "]"; \
}
#define op(a) { cout <<"[" << #a << ".fi:"<<a.first; \
					cout << " "<< #a << ".se:" << a.second <<"]"; }

using ll = long long;
const int mod = 1e9 + 7;

int main()
{
	fast();
	int n, m;
	cin >> n >> m;
	vector<int> a(n);
	int s = 0;
	for(int i = 0; i < n; ++i){
		cin >> a[i];
		s += a[i];
	}
	sort(a.begin(), a.end());
	//if(sum % (4*m)) vote ++;
	reverse(a.begin(), a.end());
	if( a[m - 1] >= sum / (4*m)) cout <<"Yes";
	else cout <<"No";
}			

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: expected ';' before '}' token
   19 |       a++
      |          ^
      |          ;
   20 |     }
      |     ~
Language: C

#include <stdio.h>
 
void Sort(int* number,int total) 
{
	int tmp;
	for (int i = 0; i < total; ++i) {
		for (int j = i + 1; j < total; ++j) {
			if (number[i] < number[j]) {
				tmp = number[i];
				number[i] = number[j];
				number[j] = tmp;
			}
		}
	}
	return;
}
 
 
unsigned long long addall(int *p) 
{
	int a = sizeof(p) / sizeof(int*);
	unsigned long long b = 0;
	for (int i = 0; i != a; i++) 
	{
		b += p[i];
	}
	return b;
}
 
int main()
{
	int n, m;
	int a[100];
 
	scanf("%d %d", &n, &m);
	for (int i = 0; i != n; i++) 
	{
		scanf("%d", &a[i]);
	}
 
	unsigned long long b;
 
	b = addall(a) / (4 * m);
 
	Sort(a, n);
 
 
	bool yn = true;
 
	for (int i = 0; i != m; i++) 
	{
		if (a[i] < b) 
		{
			yn = false; break;
		}
	}
 
 
	if (!yn) {
		printf("No");
	}
	else {
		printf("Yes");
	}
 
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:48:9: error: unknown type name 'bool'
   48 |         bool yn = true;
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:48:19: error: 'true' undeclared (first use in this function)
   48 |         bool yn = true;
      |                   ^~~~
main.c:48:19: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:48:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:54:30: error: 'false' undeclared (first use in this function)
   54 |                         yn = false; break;
      |                              ^~~~~
main.c:54:30: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

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

int main(){
    int n,m;
    int sum = 0;
    cin >> n >> m;
    vector<int> A(n);
    rep(i,n){
        cin >> A.at(i);
        sum += A.at(i);
    }
    sort(A.rbegin(),A.rend());
    double check = (double)sum /(4 * m));

    if(A.at(m - 1) >= check) cout << "Yes" << endl;
    else cout << "No" << endl;
}


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

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

int main() {
  int n,m;
  cin >> n >> m;
  
  vector<int> vec(n);
  
  for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
  }
  
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += vec.at(i);
  }
  
  int ans = 0;
  for(int i = 0; i < n; i++) {
    if(sum % (4 * m) == 0){
      if(vec.at(i) >= sum / (4 * m)){
      ans++;
      }
    }else{
      if(vec.at(i) >= 1 + sum / (4 * m)){
        ans++
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: expected ';' before '}' token
   27 |         ans++
      |              ^
      |              ;
   28 |       }
      |       ~
Language: C++

#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> p(n);
    int sum = 0;
    rep(i, n) {
        cin >> p[i];
        sum += p[i];
    }
    int s = 4 * m, select = 0;

    rep(i, n) {
        if(p[i] > sum / s) {
            ++select;
        }

        if(select == m) {
            cout << "Yes" << endl;
            return 0;
        }
    }

    cout << "No" << endl;
    return 0;
}


Compiler output:
a.cc:4:12: error: 'pair' does not name a type
    4 | using P  = pair<int, int>;
      |            ^~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> n >> m;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define rep(i, n) for(int i = 0; i < n; i++)
a.cc:9:5: error: 'vector' was not declared in this scope
    9 |     vector<int> p(n);
      |     ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #define rep(i, n) for(int i = 0; i < n; i++)
a.cc:9:12: error: expected primary-expression before 'int'
    9 |     vector<int> p(n);
      |            ^~~
a.cc:12:16: error: 'p' was not declared in this scope
   12 |         cin >> p[i];
      |                ^
a.cc:18:12: error: 'p' was not declared in this scope
   18 |         if(p[i] > sum / s) {
      |            ^
a.cc:23:13: error: 'cout' was not declared in this scope
   23 |             cout << "Yes" << endl;
      |             ^~~~
a.cc:23:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:30: error: 'endl' was not declared in this scope
   23 |             cout << "Yes" << endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define rep(i, n) for(int i = 0; i < n; i++)
a.cc:28:5: error: 'cout' was not declared in this scope
   28 |     cout << "No" << endl;
      |     ^~~~
a.cc:28:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:21: error: 'endl' was not declared in this scope
   28 |     cout << "No" << endl;
      |                     ^~~~
a.cc:28:21: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<bits/stdc++.h>

using namespace std;
using ll = long long int;
#define vll vector<ll>

#define FOR(i, b, e) for(int i = (b); i < (e); ++i)
#define REP(i, e) FOR(i, 0, e)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define OUT(v) cout << (v) << endl;
#define YN(b) OUT((b) ? "YES" : "NO")
#define Yn(b) OUT((b) ? "Yes" : "No")
#define yn(b) OUT((b) ? "yes" : "no")

const ll MOD = 1000000007;

int a[2000];

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

    int n, m, sum = 0, c = 0;
    cin >> n >> m;
    REP(i, n) {
        cin >> a[i];
        sum += a[i];
    }
    REP(i, n) {
        if (a[i] 4 * m >= sum) {
            c++;
        }
    }
    Yn(c >= m);

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: expected ')' before numeric constant
   31 |         if (a[i] 4 * m >= sum) {
      |            ~    ^~
      |                 )
Language: C++

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

int main(){
  int n, m;
  cin >> n >> m;
  vector<int>a(n);
  sort(a.rbegin(), a.rend());
  for(int i=0; i<n; i++)cin >> a[i];
  int s = accumulate(a.begin(), a.end(), 0);
  if(a[m-1]*4m>=s)cout << "Yes";
  else cout << "No";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: unable to find numeric literal operator 'operator""m'
   14 |   if(a[m-1]*4m>=s)cout << "Yes";
      |             ^~
Language: C++

#include<bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'cin'
    9 |   cin>>n>>m;
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  double t,a,b,c,ans,ans1;
  int i,j;
  cin >> a >> b ;
  t = a;
  int A[t];
  for(i=0;i<a;i++){
  	cin >> A[i] ;
  }
  for(i=0;i<a;i++){
    for(j=i;j<a;j++){
  	if(A[i] < A[j]){
      c = A[i] ;
      A[i] = A[j] ;
      A[j] = c ;
    }
  }
  }
  
  ans = 0;
  ans1 = 0;
  
    for(i=0;i<a;i++){
  	ans1 += A[i] ; }
  
 
  
    for(i=0;i<b;i++){
  	if(A[i] >= ans1/(4*b)){
      ans++;} 
  }
  
	for(i=0;i<a;i++){
      	if(A[i] == A[i+1]){
     ans-- ;
    }
      if(i+1 > a)
        ans-- ;
  }
  for(i=0;i<a;i++){
      	if(b > a){
     ans-- ;
    }
  }
  
  
  if(ans == b){
    cout << "Yes" ;
  }
  else{
    cout << "No" ;
  }
  
 
 
return 0;
}

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

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

int main() {
  int n,m;
  cin >> n >> m;
  
  vector<int> vec(n);
  
  for (int i = 0; i < n; i++) {
    cin >> vec.at(i);
  }
  
  int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += vec.at(i);
  }
  
  int ans = 0;
  for(int i = 0; i < n; i++) {
    if(vec.at(i) >= sum / (4.0 * m)){
      ans++;
    }
  }

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

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  double a,b,c,ans,ans1;
  int i,j;
  cin >> a >> b ;
  t = a;
  int A[t];
  for(i=0;i<a;i++){
  	cin >> A[i] ;
  }
  for(i=0;i<a;i++){
    for(j=i;j<a;j++){
  	if(A[i] < A[j]){
      c = A[i] ;
      A[i] = A[j] ;
      A[j] = c ;
    }
  }
  }
  
  ans = 0;
  ans1 = 0;
  
    for(i=0;i<a;i++){
  	ans1 += A[i] ; }
  
 
  
    for(i=0;i<b;i++){
  	if(A[i] >= ans1/(4*b)){
      ans++;} 
  }
  
	for(i=0;i<a;i++){
      	if(A[i] == A[i+1]){
     ans-- ;
    }
      if(i+1 > a)
        ans-- ;
  }
  for(i=0;i<a;i++){
      	if(b > a){
     ans-- ;
    }
  }
  
  
  if(ans == b){
    cout << "Yes" ;
  }
  else{
    cout << "No" ;
  }
  
 
 
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 't' was not declared in this scope
    9 |   t = a;
      |   ^
a.cc:12:16: error: 'A' was not declared in this scope
   12 |         cin >> A[i] ;
      |                ^
a.cc:16:12: error: 'A' was not declared in this scope
   16 |         if(A[i] < A[j]){
      |            ^
a.cc:28:17: error: 'A' was not declared in this scope
   28 |         ans1 += A[i] ; }
      |                 ^
a.cc:33:12: error: 'A' was not declared in this scope
   33 |         if(A[i] >= ans1/(4*b)){
      |            ^
a.cc:38:12: error: 'A' was not declared in this scope
   38 |         if(A[i] == A[i+1]){
      |            ^
Language: C++

#include <stdio.h>

int main(void){
N, M = map(int,input().split())
A = list(map(int,input().split())) S = sum(A)
cnt = 0
forainA:
if a >= S / (4*M): cnt += 1
ifcnt>=M: print("Yes")
else: print("No")

return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'N' was not declared in this scope
    4 | N, M = map(int,input().split())
      | ^
a.cc:4:4: error: 'M' was not declared in this scope
    4 | N, M = map(int,input().split())
      |    ^
a.cc:4:12: error: expected primary-expression before 'int'
    4 | N, M = map(int,input().split())
      |            ^~~
a.cc:4:16: error: 'input' was not declared in this scope; did you mean 'int'?
    4 | N, M = map(int,input().split())
      |                ^~~~~
      |                int
a.cc:4:8: error: 'map' was not declared in this scope
    4 | N, M = map(int,input().split())
      |        ^~~
Language: C++

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

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

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int i,j,t;
  double a,b,ans,ans1;
  cin >> a >> b ;
  t = a;
  int A[a];
  for(i=0;i<a;i++){
  	cin >> A[i] ;
  }
  ans1=0;
    for(i=0;i<a;i++){
  	ans1=ans1+A[i] ;
  }
ans = 0;
    for(i=0;i<a;i++){
  	if(A[i] >= ans1/(4*b)){
      ans=ans+1;} 
  }
  
 if(ans >= b){
    cout << "Yes" ;
  }
  else{
    cout << "No" ;
  }
  
 
 
return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int a,b,c,tmp = 0,n;
    cin>>n>>b;
    long long int ar[n];
    for(a = 0;a < n;a++)
    {
        cin>>ar[a];
        if(mp[ar[a]]==0)
        tmp += ar[a],mp[ar[a]] = 1;
    }
    c =tmp/(b*4);
    sort(ar,ar+n);
    tmp = 0;
    map<long long int,int>mp;
     for(a = n-1;a>=0;a--)
    {
        if(ar[a]>=c && mp[ar[a]]==1)
            tmp++,mp[ar[a]] = -1;
    }
    if(tmp>=b)
        cout<<"Yes\n";
    else
        cout<<"No\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'mp' was not declared in this scope; did you mean 'tmp'?
   11 |         if(mp[ar[a]]==0)
      |            ^~
      |            tmp
Language: C++

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

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

#include<bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: expected ';' before '}' token
   20 |       count++
      |              ^
      |              ;
   21 |   }
      |   ~
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 total = 0;
    int counter = 0;
    int[] a = new int[n];
    
    for(int i = 0; i < n; i++){
      a[i] = sc.nextInt();
      toatl += a[i];
    }
    float p = toatl / (4 * m);
    
    for(int i = 0; i < n; i++){
      if(a[i] >= p){
        counter++;
      }
    }
    if(counter >= m){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
        }
        }

Compiler output:
Main.java:14: error: cannot find symbol
      toatl += a[i];
      ^
  symbol:   variable toatl
  location: class Main
Main.java:16: error: cannot find symbol
    float p = toatl / (4 * m);
              ^
  symbol:   variable toatl
  location: class Main
2 errors
Language: C++

clude <bits/stdc++.h>
 
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
using namespace std;
 
int main() {
    double n, m;
    cin >> n >> m;
    vector<double> a(n);
    double totalVote = 0;
    rep(i, n) {
        cin >> a[i];
        totalVote += a[i];
    }
 
 
    int cnt = 0;
    rep(i, n) {
        if (a[i] >= totalVote / (4 * m)) cnt++;
    }
 
 
    cout << (cnt >= m ? "Yes" : "No") << endl;
    return 0;
}

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude <bits/stdc++.h>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> n >> m;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | clude <bits/stdc++.h>
a.cc:10:5: error: 'vector' was not declared in this scope
   10 |     vector<double> a(n);
      |     ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | clude <bits/stdc++.h>
a.cc:10:12: error: expected primary-expression before 'double'
   10 |     vector<double> a(n);
      |            ^~~~~~
a.cc:13:16: error: 'a' was not declared in this scope
   13 |         cin >> a[i];
      |                ^
a.cc:20:13: error: 'a' was not declared in this scope
   20 |         if (a[i] >= totalVote / (4 * m)) cnt++;
      |             ^
a.cc:24:5: error: 'cout' was not declared in this scope
   24 |     cout << (cnt >= m ? "Yes" : "No") << endl;
      |     ^~~~
a.cc:24:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:42: error: 'endl' was not declared in this scope
   24 |     cout << (cnt >= m ? "Yes" : "No") << endl;
      |                                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | clude <bits/stdc++.h>
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];
int64_t sum =0;
for(int i=0;i<N;i++) sum += A[i];
sort(A.begin(),A.end());
reverse(A.begin(),A.end());
  double q = 4 * M;
   p = sum / q;
  bool f = true;
for(int i=0;i<M;i++){
 if(A[i] < p) f= false ; 
}
  if(f) cout <<"Yes" <<endl;
  else cout <<"No" <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: 'p' was not declared in this scope
   15 |    p = sum / q;
      |    ^
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.at(i);
        sum += a.at(i);
    }
    sort(a.begin(),a.end());
    int sum = 0;
    if(a.at(n-m) >= sum / (4*m)){
        cout << "Yes" << endl; 
        return 0;
    }else{
        cout << "No" << endl;
        return 0;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: redeclaration of 'int sum'
   14 |     int sum = 0;
      |         ^~~
a.cc:8:9: note: 'int sum' previously declared here
    8 |     int sum=0;
      |         ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int desc(const void *a, const void *b) {
  return *(int *)b - *(int *)a;
}
int main(){
  double N, M;
  cin >> N >> M;
  double A[N];
  long double all=0;
  double ok;
  for(int i=0;i<N;i++){ 
    scanf("%lf",&A[i]);
    all+=A[i];
  }
  qsort(A , N , sizeof( int ), desc );
  ok=all/(4*M);
  for(int i=0;i<M;i++){
    if(A[i]<ok-1){
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  
}

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

#include <bits/stdc++.h>

using namespace std;
 
int main()
{
    int N, M;
    cin >> N >> M;

    int sum = 0;
    
    vector<int> A(N);

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

    /*小数点の考慮*/
    double x = sum / (4 * M)

    if (A.at(M-1) < x)
    {
        cout << "No" << endl;
    }
    
    else
    {
        cout << "Yes" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: expected ',' or ';' before 'if'
   26 |     if (A.at(M-1) < x)
      |     ^~
a.cc:31:5: error: 'else' without a previous 'if'
   31 |     else
      |     ^~~~
Language: C++

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


Compiler output:
a.cc:3:22: error: expected unqualified-id before ',' token
    3 | int m,n,s,i,j,m2,cnt;,a[1000];
      |                      ^
a.cc:3:30: error: expected constructor, destructor, or type conversion before ';' token
    3 | int m,n,s,i,j,m2,cnt;,a[1000];
      |                              ^
a.cc: In function 'int main()':
a.cc:10:14: error: 'a' was not declared in this scope
   10 |         cin>>a[i],s+=a[i];
      |              ^
a.cc:13:10: error: 'a' was not declared in this scope
   13 |     sort(a,a+n);
      |          ^