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

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

Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'count' undeclared (first use in this function)
    7 |   count=0;
      |   ^~~~~
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:14: error: expected expression before '%' token
    5 |   scanf("%d",%n);
      |              ^
main.c:6:14: error: expected expression before '%' token
    6 |   scanf("%d",%m);
      |              ^
main.c:10:14: error: expected ';' before '}' token
   10 |     sum+=a[i]
      |              ^
      |              ;
   11 |   }
      |   ~
Language: C

#include<stdio.h>
int main(void)
{
	int n, m, i,j, sum=0;
	int a[100];
	scanf("%d", &n);
    scnaf("%d", &m);
	for (i = 0; i < n; i++) {
		scanf("%d", &a[i]);
		sum += a[i];
	}
	double lim = sum / (4 * m);
	for (i = 0,j=0; i < n; i++) {
		if ((double)a[i] >= lim)
			j++;
	}
	if (j >= m)
		puts("Yes");
	else
		puts("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |     scnaf("%d", &m);
      |     ^~~~~
      |     scanf
Language: Java

import java.util.*;

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

Compiler output:
Main.java:20: error: ';' expected
    int point = sum / p
                       ^
1 error
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
using namespace std;
typedef long long ll;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:1: error: 'ld' was not declared in this scope; did you mean 'll'?
   21 | ld N,M;
      | ^~
      | ll
a.cc:22:8: error: 'N' was not declared in this scope
   22 | cin >> N >> M ;
      |        ^
a.cc:22:13: error: 'M' was not declared in this scope
   22 | cin >> N >> M ;
      |             ^
a.cc:23:3: error: expected ';' before 'sum'
   23 | ld sum=0;
      |   ^~~~
      |   ;
a.cc:30:3: error: 'sum' was not declared in this scope
   30 |   sum+=v[i];
      |   ^~~
a.cc:33:6: error: 'sum' was not declared in this scope
   33 |   if(sum/(4*M)<v[i]){
      |      ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
using namespace std;
typedef long long ll;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:1: error: 'ld' was not declared in this scope; did you mean 'll'?
   21 | ld N,M;
      | ^~
      | ll
a.cc:22:8: error: 'N' was not declared in this scope
   22 | cin >> N >> M ;
      |        ^
a.cc:22:13: error: 'M' was not declared in this scope
   22 | cin >> N >> M ;
      |             ^
a.cc:23:3: error: expected ';' before 'sum'
   23 | ld sum=0;
      |   ^~~~
      |   ;
a.cc:30:3: error: 'sum' was not declared in this scope
   30 |   sum+=v[i];
      |   ^~~
a.cc:33:6: error: 'sum' was not declared in this scope
   33 |   if(sum/4/M<v[i]){
      |      ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
using namespace std;
typedef long long ll;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: 'ld' was not declared in this scope; did you mean 'll'?
   21 |   ld N,M;
      |   ^~
      |   ll
a.cc:22:10: error: 'N' was not declared in this scope
   22 |   cin >> N >> M ;
      |          ^
a.cc:22:15: error: 'M' was not declared in this scope
   22 |   cin >> N >> M ;
      |               ^
a.cc:23:5: error: expected ';' before 'sum'
   23 |   ld sum=0;
      |     ^~~~
      |     ;
a.cc:30:5: error: 'sum' was not declared in this scope
   30 |     sum+=v[i];
      |     ^~~
a.cc:33:9: error: 'sum' was not declared in this scope
   33 |     if((sum/(4*M))<=v[i]){
      |         ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <vector>
#include <string>
using namespace std;
typedef long long ll;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:33:14: error: expected primary-expression before '<' token
   33 |   if(sum/4/M=<v[i]){
      |              ^
Language: C++

#include <bits/stdc++.h>
#include (i,n) rep(i=0;i<=n;i++)
using namespace std;
int main(){
  int n;
  int m;
  string<int> a[n];
  int n=string.length();
  cin>>>n;
  cin>>m;
  for(i=0;i<=n;i++){
    if(a[n]>1/4m){
      cout<<"yes"<<endl;
    }
    else{
      cout<<"no"<<endl;
    }
  }
  

Compiler output:
a.cc:2:10: error: #include expects "FILENAME" or <FILENAME>
    2 | #include (i,n) rep(i=0;i<=n;i++)
      |          ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not a template
    7 |   string<int> a[n];
      |   ^~~~~~
a.cc:8:7: error: redeclaration of 'int n'
    8 |   int n=string.length();
      |       ^
a.cc:5:7: note: 'int n' previously declared here
    5 |   int n;
      |       ^
a.cc:8:15: error: expected primary-expression before '.' token
    8 |   int n=string.length();
      |               ^
a.cc:9:8: error: expected primary-expression before '>' token
    9 |   cin>>>n;
      |        ^
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   for(i=0;i<=n;i++){
      |       ^
a.cc:12:15: error: unable to find numeric literal operator 'operator""m'
   12 |     if(a[n]>1/4m){
      |               ^~
a.cc:18:4: error: expected '}' at end of input
   18 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: unable to find numeric literal operator 'operator""m'
   20 |   if(a[m-1]*4m<sum) cout <<"No"<<endl;
      |             ^~
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String [] args) {
		Scanner scan = new Scanner(System.in);
		boolean result= false;
		int items= scan.nextInt();
		int popItems= scan.nextInt();
		int[] votes= new int[items];
		int count=0;
		for(int i=0; i<items; i++) {
			votes[i]= scan.nextInt();
			count+= votes[i];
		}
		int comp= (int)Math.ceil((1/(4+(double)popItems))*count);
		int finalCount=0;
		for(int i=0; i<items; i++) {
			if(votes[i]>=comp) {
				finalCount++;
				if(finalCount>=popItems) {
					result= true;
					break;
				}
			}
		}
		if(result) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
	}

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

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

#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif

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

const int N = 123;

int a[N];

void solve() {
  int n, m; scanf("%d%d", &n, &m);
  float p = 1./(4*m);
  int s = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%d", a+i);
    s += a;
  }
  sort(a, a+n, greater<int>());
  for (int i = 0; i < m; ++i) {
    if ((float)a[i]/s < p) {
      puts("No");
      return;
    }
  }
  puts("Yes");
}

int main() {
  init();
  int t = 1; //scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:25:7: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   25 |     s += a;
      |     ~~^~~~
      |       |
      |       int*
Language: C++

#include <iostream>
using namespace std;

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

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

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

int main{
    cin >> n >> m;
    rep(i,n) cin >> a[i];
    sort(a.begin(), a.end());
    int b = a[m-1];
    if(b < 1/4/m){
        cout << "No"<<endl;
    }
    else cout < "Yes" << endl;
}

Compiler output:
a.cc:6:15: error: size of array 'a' is not an integral constant-expression
    6 | vector<int> a[n];
      |               ^
a.cc:8:5: error: cannot declare '::main' to be a global variable
    8 | int main{
      |     ^~~~
a.cc:9:18: error: expected '}' before ';' token
    9 |     cin >> n >> m;
      |                  ^
a.cc:8:9: note: to match this '{'
    8 | int main{
      |         ^
a.cc:9:14: error: invalid user-defined conversion from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' [-fpermissive]
    9 |     cin >> n >> m;
      |     ~~~~~~~~~^~~~
In file included from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/istream:40,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_ios.h:121:16: note: candidate is: 'std::basic_ios<_CharT, _Traits>::operator bool() const [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  121 |       explicit operator bool() const
      |                ^~~~~~~~
/usr/include/c++/14/bits/basic_ios.h:121:16: note:   return type 'bool' of explicit conversion function cannot be converted to 'int' with a qualification conversion
a.cc:2:18: error: expected unqualified-id before 'for'
    2 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                  ^~~
a.cc:10:5: note: in expansion of macro 'rep'
   10 |     rep(i,n) cin >> a[i];
      |     ^~~
a.cc:10:9: error: 'i' does not name a type
   10 |     rep(i,n) cin >> a[i];
      |         ^
a.cc:2:30: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                              ^
a.cc:10:9: error: 'i' does not name a type
   10 |     rep(i,n) cin >> a[i];
      |         ^
a.cc:2:36: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                                    ^
a.cc:11:9: error: expected constructor, destructor, or type conversion before '(' token
   11 |     sort(a.begin(), a.end());
      |         ^
a.cc:12:18: error: cannot convert 'std::vector<int>' to 'int' in initialization
   12 |     int b = a[m-1];
      |             ~~~~~^
      |                  |
      |                  std::vector<int>
a.cc:13:5: error: expected unqualified-id before 'if'
   13 |     if(b < 1/4/m){
      |     ^~
a.cc:16:5: error: expected unqualified-id before 'else'
   16 |     else cout < "Yes" << endl;
      |     ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

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

int main() {
  int N, M, t=0; cin >> N >> M;
  vector<int> A(N);
  for (int i=0; i<N; i++) {
    cin >> A[i];
    t += A[i];
  }
  sort(A.begin(), A.end(), greater<int>);
  if (A[M-1]>=t/4/M) cout << "Yes";
  else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:40: error: expected primary-expression before ')' token
   11 |   sort(A.begin(), A.end(), greater<int>);
      |                                        ^
Language: C++

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

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

    sort(A.begin(), A.end());
    
    int A_sum = accumulate(A.begin(), A.end(), 0);
    double line = A_sum / (4 * M);
    for (int i = 0; i < M; i++) {
        if (A.at(i) < line) {
            cout << "No" << endl;
            return 0;
        }

    cout << "Yes" << endl;
    }



    cout << C << ' ' << A << ' ' << B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: 'C' was not declared in this scope
   27 |     cout << C << ' ' << A << ' ' << B << endl;
      |             ^
a.cc:27:37: error: 'B' was not declared in this scope
   27 |     cout << C << ' ' << A << ' ' << B << endl;
      |                                     ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: invalid types 'int[int]' for array subscript
   15 |     if(a[i]>sum/4/num){
      |         ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: invalid types 'int[int]' for array subscript
   11 |     a[i]=k;
      |      ^
a.cc:15:9: error: invalid types 'int[int]' for array subscript
   15 |     if(a[i]>sum/4/num){
      |         ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: invalid types 'int[int]' for array subscript
   11 |     a[i]=k;
      |      ^
a.cc:13:6: error: expected ';' before 'for'
   13 |   k=0
      |      ^
      |      ;
   14 |   for(int i=0;i<a;i++){
      |   ~~~ 
a.cc:14:15: error: 'i' was not declared in this scope
   14 |   for(int i=0;i<a;i++){
      |               ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected initializer before '.' token
    5 |   int n,m.nm=0,hj=0;
      |          ^
a.cc:6:11: error: 'm' was not declared in this scope
    6 |   cin>>n>>m;
      |           ^
a.cc:10:5: error: 'hj' was not declared in this scope
   10 |     hj+=a[i];
      |     ^~
a.cc:13:13: error: 'hj' was not declared in this scope
   13 |     if(a[i]/hj>=1/4*m){
      |             ^~
a.cc:14:7: error: 'nm' was not declared in this scope; did you mean 'n'?
   14 |       nm++;
      |       ^~
      |       n
a.cc:17:6: error: 'nm' was not declared in this scope; did you mean 'n'?
   17 |   if(nm>=m){
      |      ^~
      |      n
Language: C++

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

int main(){
  int M, N, P, Q;
  cin >> N >> M;
  P = 0;
  Q = 0;
  vector<int> vec(N);
  for(int i = 0; i < N; i++){
    cin >> vec.at(i);
    P = P + vec.at(i);
  }
  for(int i = 0; i < N; i++){
    if(P / 4 * M <= vec.at(i)){
      Q = Q + 1;
    }
  }
  if(Q >= M){
    cout << "Yes" << endl;
  }
  else{

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

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

int main() {
  int n, m;
  vector<int> a;
  cin >> n >> m;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int j = 0; j < a.size(); j++) {
    int total = 0;
    total += a[j];
    if (a[j] > total * 1/(4 * m)) ans++;
  }
  if (ans >= m) {
    lcout << "Yes" << end;
  } else {
  cout << "No" << endl;
  }
  return 0;
};

Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'lcout' was not declared in this scope
   21 |     lcout << "Yes" << end;
      |     ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (double i=0; i<(n); i++) // for文のマクロを定義
using namespace std;

double main() {
    double N, M;
    cin >> N >> M;
    vector<double> A(N);
    double sum = 0;
    rep(i, N) {
        cin >> A.at(i);
        sum += A.at(i);
    }
    double count = 0;
    double x = (sum / (4 * M));
    rep(i, N) {
        if (A.at(i) >= x) {
            count ++;
        }
    }
    if (count >= M) cout << "Yes";
    else cout << "No";
    return 0;
}

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | double main() {
      | ^~~~~~
Language: C++

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

using namespace std;

int main()
{
	int N, M, total = 0, border, choiceCount = 0;
	float border;
	cin >> N >> M;
	vector<int> A(N);
	for (int count = 0; count < N; count++)
	{
		cin >> A.at(count);
		total += A.at(count);
	}
	sort(A.begin(), A.end(), [](int a, int b) {
		return a > b;
	});
	border = (float) total / (float) (4 * M);
	for (int count = 0; count < N; count++)
	{
		if (A.at(count) >= border)
		{
			choiceCount++;
		}
		else
		{
			break;
		}
	}
	if (choiceCount >= M)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: conflicting declaration 'float border'
   10 |         float border;
      |               ^~~~~~
a.cc:9:30: note: previous declaration as 'int border'
    9 |         int N, M, total = 0, border, choiceCount = 0;
      |                              ^~~~~~
Language: C++

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

int main(){

  int N,M;
  int sum = 0, count = 0;
  vector<int> A;
  cin >> N >> M;
  A.resizse(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)) count ++;
  }
  if(count >= M) cout << "Yes" << endl;
  else cout << "No" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'class std::vector<int>' has no member named 'resizse'; did you mean 'resize'?
   11 |   A.resizse(N);
      |     ^~~~~~~
      |     resize
Language: C++

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

int main(){

  int N,M;
  int sum = 0, count = 0;
  ventor<int> A;
  cin >> N >> M;
  A.resizse(N);
  for(int i = 0; i < N; i++){
    cin >> A[i];
    sum += A[i];
  }
  for(int i = 0; i < N; i++){
    if(A[i] >= sim/(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:9:3: error: 'ventor' was not declared in this scope
    9 |   ventor<int> A;
      |   ^~~~~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   ventor<int> A;
      |          ^~~
a.cc:11:3: error: 'A' was not declared in this scope
   11 |   A.resizse(N);
      |   ^
a.cc:17:16: error: 'sim' was not declared in this scope; did you mean 'sum'?
   17 |     if(A[i] >= sim/(4*M)) count ++;
      |                ^~~
      |                sum
Language: C++

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

int main(){
	int N, M;
  	int sum = 0;
  	int flag;
  	bool f = true;
 	std::cin>>N>>M;
  	std::vector<int> A(N);
  	for(int i=0;i<N;i++){
      std::cin>>A.at(i);
      sum += A.at(i);
    }
  
  	std::sort(A.begin(), A.end(), std::greater<int>());
  
  	if(sum%(4*M)==0){
    	flag = sum/(4*M);
    }else{
      	flag = 1 + sum/(4*M);
    }
  
  for(int i = M; i>0;i--){
    if(A.at(M-1)<flat){
      f=false;
      break;
    }
  }
  
  if(f){std::cout<<"Yes";}else{std::cout<<"No";}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: 'flat' was not declared in this scope; did you mean 'flag'?
   26 |     if(A.at(M-1)<flat){
      |                  ^~~~
      |                  flag
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
      	int M = sc.nextInt();
      	int A[] = new int[N];
      	int sum=0;
      	int count=0;
      
      	for(int i=0;i<N;i++){
        	A[i]=sc.nextInt();
        	sum=sum+A[i];
        }
      
      	for(int i;i<N;i++){
        	if(A[i]>=(double)sum/4/M){
            	count=count+1;
            }
        }
       	
		if(count>=M){
          System.out.println("Yes");
        }
      	else{
          System.out.println("No");
        }
		
	}
}

Compiler output:
Main.java:17: error: variable i might not have been initialized
      	for(int i;i<N;i++){
      	          ^
1 error
Language: Java

//164B(Atcoder)
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
      	int M = sc.nextInt();
      	int A[] = new int[N];
      	int sum=0;
      	int count=0;
      
      	for(int i=0;i<N;i++){
        	A[i]=sc.nextInt();
        	sum=sum+A[i];
        }
      
      	for(int i;i<N;i++){
        	if(A[i]>=(double)sum/4/M){
            	count=count+1;
            }
        }
       	
		if(count>=M){
          System.out.println("Yes");
        }
      	else{
          System.out.println("No");
        }
		
	}
}


Compiler output:
Main.java:18: error: variable i might not have been initialized
      	for(int i;i<N;i++){
      	          ^
1 error
Language: Java

//164B(Atcoder)
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
      	int M = sc.nextInt();
      	int A[] = new int[N];
      	int sum=0;
      	int count=0;
      
      	for(int i=0;i<N;i++){
        	int A[i]=sc.nextInt();
        	sum=sum+A[i];
        }
      
      	for(int i;i<N;i++){
        	if(A[i]>=(double)sum/4/M){
            	count=count+1;
            }
        }
       	
		if(count>=M){
          System.out.println("Yes");
        }
      	else{
          System.out.println("No");
        }
		
	}
}


Compiler output:
Main.java:14: error: ']' expected
        	int A[i]=sc.nextInt();
        	      ^
Main.java:14: error: ';' expected
        	int A[i]=sc.nextInt();
        	       ^
2 errors
Language: C++

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

#define SIZE_OF_ARRAY(array) sizeof(array)/sizeof(array[0])

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: expected ';' before '}' token
   22 |         cout << "Yes";1
      |                        ^
      |                        ;
   23 |     } else {
      |     ~
Language: C++

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

int main(){
    int N,M,sum=0,count=0;
    cin >> N >> M;

    vector<int> vec(N);

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

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

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:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> N >> M;
      |     ^~~
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<int> vec(N);
      |     ^~~~~~
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int> vec(N);
      |            ^~~
a.cc:11:16: error: 'vec' was not declared in this scope
   11 |         cin >> vec.at(i);
      |                ^~~
a.cc:16:22: error: 'vec' was not declared in this scope
   16 |       if(sum <= 4*M*(vec.at(i))){
      |                      ^~~
a.cc:21:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   21 |         cout << "Yes" << endl;
      |         ^~~~
      |         count
a.cc:21:26: error: 'endl' was not declared in this scope
   21 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:24:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   24 |         cout << "No" << endl;
      |         ^~~~
      |         count
a.cc:24:25: error: 'endl' was not declared in this scope
   24 |         cout << "No" << endl;
      |                         ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 's' was not declared in this scope
   15 |   if(v[m-1]<(s/m))
      |              ^
Language: C++

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

int main(){
  int n,m;
  cin>>n>>m;
  vector<int>a(n);
  int c=0;
  lomg long sum=0;
  
  for(int i=0;i<n;i++){
    cin >> a.at(i);
    sum += a.at(i);
  }
  
  for(int i=0;i<n;i++){
    if(a.at(i)>=sum/(4.0*m)){
      c++;
    }
  }
  if(c>=m)
    cout <<"Yes"<<endl;
  else
    cout <<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'lomg' was not declared in this scope; did you mean 'long'?
    9 |   lomg long sum=0;
      |   ^~~~
      |   long
a.cc:13:5: error: 'sum' was not declared in this scope
   13 |     sum += a.at(i);
      |     ^~~
a.cc:17:17: error: 'sum' was not declared in this scope
   17 |     if(a.at(i)>=sum/(4.0*m)){
      |                 ^~~
Language: C++

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

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
    1 | #inlude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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 | #inlude<bits/stdc++.h>
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int>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 | #inlude<bits/stdc++.h>
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int>a(n);
      |          ^~~
a.cc:11:12: error: 'a' was not declared in this scope
   11 |     cin >> a.at(i);
      |            ^
a.cc:15:8: error: 'a' was not declared in this scope
   15 |     if(a.at(i)>=1/(4*m)){
      |        ^
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout <<"Yes"<<endl;
      |     ^~~~
a.cc:20:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:19: error: 'endl' was not declared in this scope
   20 |     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 | #inlude<bits/stdc++.h>
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout <<"No"<<endl;
      |     ^~~~
a.cc:22:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:18: error: 'endl' was not declared in this scope
   22 |     cout <<"No"<<endl;
      |                  ^~~~
a.cc:22:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<queue>
#include<stack>
#include<map>

using namespace std;

template<typename A, typename B> bool chmin(A &a, const B &b){ return b < a && (a = b, true); }
template<typename A, typename B> bool chmax(A &a, const B &b){ return a < b && (a = b, true); }

int main(){
  double n,m,sum = 0;
  cin >> n >> m;
  double a[n];
  for (int i = 0; i < n; i++){
    cin >> a[i];
    sum += a[i];
  }
  sort(a,a+n,greater<int>());
  for (int i = 0; i < m; i++){
    if (sum / (4 * m) > a[i]){
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  return 0;
}

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

import java.util.*;
import java.io.*;
 
public class Main {
    public static void main (final String[] args) {
        final Scanner s = new Scanner(System.in);
          int n = Integer.parseInt(s.next());
      	  int m = Integer.parseInt(s.next());
      	
      	int[] vote = new int[n];
      	int sum = 0;
      	for(int i = 0; i < n; i++) {
          vote[i] = Integer.parseInt(s.next());
          sum += vote[i];
        }
      	
      	Arrays.sort(vote, Comparator.reverseOrder());
      
      	if (vote[m-1] >= sum/(4*m)) System.out.println("Yes");
      	else System.out.println("No");
    }
}

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

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

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

	cin >> n >> m;
	for (int in = 0; in < n; in++)
	{
		cin >> a[in];
		votes += a[in];
	}

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

	cout << (count > m ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:22: error: 'round' was not declared in this scope
   18 |         float good = round((votes / (4 * m)));
      |                      ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
int desc(const void *a, const void *b)
{
	if (*(int *)a < *(int*)b)
		return 1;
	if (*(int *)b < *(int*)a)
		return -1;
	return 0;
}
int main()
{
	int n, m;
	cin >> n >> m;
	int a[n];
	int sum  = 0;
	rep(i, n)
	{
		cin >> a[i];
		sum += a[i];
	}
	// qsort(a, sizeof a / sizeof *a, sizeof *a, desc);
	int cnt = 0;
	float b = sum / ((4*m));
	rep(i,n)
	{
		if ((float)a[i] => b)
			cnt++;
	}
	if (cnt >= m)
		cout << "Yes\n";
	else
		cout << "No\n";
	return (0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:34: error: expected primary-expression before '>' token
   29 |                 if ((float)a[i] => b)
      |                                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
int main(){
    int N,M;
    cin >> N >> M;
    vector<int> A(N);
    int cnt = 0;
    for(int i = 0; i < N; i++) {
        cin >> A[i];
        cnt += A[i];
    }
    sort(A.begin(),A.end());
    int usi = (cnt+(M*4)-1)/(M*4);
    if(A[N-M] > usi) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else
      | ^~~~
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++) {
    int A;
    cin >> A;
    A.at(i) = A;
  }
  for (int i = 0; i < N; i++) {
    if (A.at(i) >= A.at(i+1)) {
      int B = A.at(i);
      A.at(i) = A.at(i+1);
      A.at(i+1) = B;
    }
  }
  if (A.at(M) < 1 / (4*M))
    cout << "No";
  else
    cout << "Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: request for member 'at' in 'A', which is of non-class type 'int'
   11 |     A.at(i) = A;
      |       ^~
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  vecter<int> A(N);
  for (int i = 0; i < N; i++) {
    int A;
    cin >> A;
    A.at(i) = A;
  }
  for (int i = 0; i < N; i++) {
    if (A.at(i) >= A.at(i+1)) {
      int B = A.at(i);
      A.at(i) = A.at(i+1);
      A.at(i+1) = B;
    }
  }
  if (A.at(M) < 1 / (4*M))
    cout << "No";
  else
    cout << "Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vecter' was not declared in this scope
    7 |   vecter<int> A(N);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vecter<int> A(N);
      |          ^~~
a.cc:11:7: error: request for member 'at' in 'A', which is of non-class type 'int'
   11 |     A.at(i) = A;
      |       ^~
a.cc:14:9: error: 'A' was not declared in this scope
   14 |     if (A.at(i) >= A.at(i+1)) {
      |         ^
a.cc:20:7: error: 'A' was not declared in this scope
   20 |   if (A.at(M) < 1 / (4*M))
      |       ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <cmath>
using ll = long long;
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected ',' or ';' before 'for'
   18 |   for(ll i=0;i<n; i++){
      |   ^~~
a.cc:18:14: error: 'i' was not declared in this scope
   18 |   for(ll i=0;i<n; i++){
      |              ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <cmath>
using ll = long long;
using namespace std;

int main() {
 ll n,m; cin >> n >>m;
 vector<ll>a(n);
  for(ll c=0;c<n ; c++)
    cin >> a[c];
  sort(a.begin(),a.end());
  ll count =0;
  ll sum =0;
  for(ll i=1; i<N+1;i++)
    sum +=a[i];
  for(ll i=0;i<n; i++){
    if(a[i] > 1/(4*m))
      count ++;
  }
  if(count >=m)
    cout << "Yes"<<endl;
  else << "No" <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'N' was not declared in this scope
   15 |   for(ll i=1; i<N+1;i++)
      |                 ^
a.cc:23:8: error: expected primary-expression before '<<' token
   23 |   else << "No" <<endl;
      |        ^~
Language: C++

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

int main() {
  int N,M;
  cin>>N>>M;
  int a[N];
  sort(a,a+N,greater<int>());
  if(A[M]>=1/4M){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'A' was not declared in this scope
    9 |   if(A[M]>=1/4M){
      |      ^
a.cc:9:14: error: unable to find numeric literal operator 'operator""M'
    9 |   if(A[M]>=1/4M){
      |              ^~
Language: C++

		scanf("%d%d%d",&a,&b,&c);
		for(int x=1000;x<10000;x++)
		{
			if(x%a==0&&(x+1)%b==0&&(x+2)%c==0)
			{
				printf("%d",x);
				printf("\n");
				break;
			}
			
		}
		printf("Impossible\n");

		

Compiler output:
a.cc:1:22: error: expected constructor, destructor, or type conversion before '(' token
    1 |                 scanf("%d%d%d",&a,&b,&c);
      |                      ^
a.cc:2:17: error: expected unqualified-id before 'for'
    2 |                 for(int x=1000;x<10000;x++)
      |                 ^~~
a.cc:2:32: error: 'x' does not name a type
    2 |                 for(int x=1000;x<10000;x++)
      |                                ^
a.cc:2:40: error: 'x' does not name a type
    2 |                 for(int x=1000;x<10000;x++)
      |                                        ^
a.cc:12:23: error: expected constructor, destructor, or type conversion before '(' token
   12 |                 printf("Impossible\n");
      |                       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll arr[n];
      |   ^~
a.cc:7:5: error: expected ';' before 'c'
    7 |   ll c = 0;
      |     ^~
      |     ;
a.cc:9:5: error: expected ';' before 's'
    9 |   ll s =0;
      |     ^~
      |     ;
a.cc:11:15: error: 'arr' was not declared in this scope
   11 |         cin >>arr[i];
      |               ^~~
a.cc:12:5: error: 's' was not declared in this scope
   12 |     s += arr[i];
      |     ^
a.cc:14:17: error: 's' was not declared in this scope
   14 |   x *= (double)(s);
      |                 ^
a.cc:16:6: error: 'arr' was not declared in this scope
   16 |   if(arr[i] >= x){
      |      ^~~
a.cc:17:9: error: 'c' was not declared in this scope
   17 |         c += 1;
      |         ^
a.cc:19:8: error: 'c' was not declared in this scope
   19 |     if(c >= m){cout<<"Yes\n";}
      |        ^
Language: C++

#include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include <cassert>
#include <cmath>
#include<cstdint>

#define INF 1e9
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
#define ALL(a)  (a).begin(),(a).end()

using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<ll, ll>;



//bit全探索
vector<int>bitSearch(int bit,int n){
    vector<int>S;
    rep(i,n)if(bit&(1<<i))S.push_back(i);
    return S;
}
#define int double

int main(){
    int n, m;
    cin >> n >> m;
    vector<int>A(n);
    int sum = 0;
    rep(i, n){
        cin >> A[i];
        sum += A[i];
    }
    ll c = sum / (4 * m);

    int cnt = 0;
    rep(i, n){
        if(A[i] >= c)cnt++;
    }
    cout << (cnt >= m : "Yes" : "No");
}



Compiler output:
a.cc:41:13: error: '::main' must return 'int'
   41 | #define int double
      |             ^~~~~~
a.cc:43:1: note: in expansion of macro 'int'
   43 | int main(){
      | ^~~
a.cc: In function 'int main()':
a.cc:58:22: error: expected ')' before ':' token
   58 |     cout << (cnt >= m : "Yes" : "No");
      |             ~        ^~
      |                      )
Language: C++

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

int main()
{
  int64_t N,M;
  int64_t sum=0;
  vector<int64_t> a(1001);
  bool chk=true;
  cin >>N>>M;
  for(int i=0; i<N; i++)
  {
    cin >> a.at(i); 
  }
  for(int i=0; i<N; i++)
  {
    sum+=a.at(i);
  }
  sort(a.begin(),a.end());
  reverse(a.begin(),a.end());
  for(int i=0; i=<M; i++)
  {
      if(a.at(i)<=(sum/(4*M)))
      {
		chk=false;
      }
  }
  if(chk)
  cout << "Yes" << endl;
  else
  {
  cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: expected primary-expression before '<' token
   21 |   for(int i=0; i=<M; i++)
      |                  ^
Language: C++

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

int main()
{
  int64_t N,M;
  int64_t sum=0;
  vector<int64_t> a(1001);
  bool chk=true;
  cin >>N>>M;
  for(int i=0; i<N; i++)
  {
    cin >> a.at(i); 
  }
  for(int i=0; i<N; i++)
  {
    sum+=a.at(i);
  }
  sort(a.begin(),a.end());
  reverse(a.begin(),a.end());
  for(int i=0; i<M; i++)
  {
      if(a.at(i)<(sum/(4*M)))
      {
		chk=false;
      }
  }
  if(chk)
  cout << "Yes" << endl;
  else
  {
  cout << "No" << endl;
  }

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

#include <iostream>
#include <cstdio>
#include <string.h>
#include <vector>
#include<stdlib.h>
using namespace std;


int main(){
    int n, m;

    cin >> n >> m;

    vector<int> A;

    int count = 0;

    int sum = 0;

    //int mm = 0;
    int x;

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

    sort(A.begin(), A.end());

    for(int i = 0; i < n; i++){
        if(A[i] >= (sum / (4*m))){
            count++;
            if(count == m){
                break;
            }
        }
    }

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

    return 0;
}

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

#include <iostream>
#include <cstdio>
#include <string.h>
#include <vector>
using namespace std;


int main(){
    int n, m;

    cin >> n >> m;

    vector<int> A;

    int count = 0;

    int sum = 0;

    //int mm = 0;
    int x;

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

    sort(A.begin(), A.end());

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

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   28 |     sort(A.begin(), A.end());
      |     ^~~~
      |     short