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

# include <bits/stdc++.h>
# define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
# define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
# define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
# define rreps(i, n) for(int i=((int)(n)); i>0; --i)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define optimize_cin() cin.tie(0); ios::sync_with_stdio(false)
using namespace std;
using lint = long long;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main()
{
    int_64t N, M;
    cin >> N >> M;

    int_64t A[N];
    rep(i,N){
        cin >> A[i];
    }

    int_64t count = 0;

    int_64t X = 1 / (4*M);

    rep(i,N){
        if(A[i] >= X){
            count++;
        }
    }

    if(count >= M) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'int_64t' was not declared in this scope; did you mean 'int64_t'?
   17 |     int_64t N, M;
      |     ^~~~~~~
      |     int64_t
a.cc:18:12: error: 'N' was not declared in this scope
   18 |     cin >> N >> M;
      |            ^
a.cc:18:17: error: 'M' was not declared in this scope
   18 |     cin >> N >> M;
      |                 ^
a.cc:20:12: error: expected ';' before 'A'
   20 |     int_64t A[N];
      |            ^~
      |            ;
a.cc:22:16: error: 'A' was not declared in this scope
   22 |         cin >> A[i];
      |                ^
a.cc:25:12: error: expected ';' before 'count'
   25 |     int_64t count = 0;
      |            ^~~~~~
      |            ;
a.cc:27:12: error: expected ';' before 'X'
   27 |     int_64t X = 1 / (4*M);
      |            ^~
      |            ;
a.cc:30:12: error: 'A' was not declared in this scope
   30 |         if(A[i] >= X){
      |            ^
a.cc:30:20: error: 'X' was not declared in this scope
   30 |         if(A[i] >= X){
      |                    ^
a.cc:31:18: error: no post-increment operator for type
   31 |             count++;
      |                  ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  
  int M, N;
  cin >> M >> N;
  
  vector<int64_t> vec(N);
  int64_t sum = 0;
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
    sum = sum + vec.at(i);
  }
  
  int64_t count = 0;
  for (int i = 0; i < N; i++) {
    if (vec.at(i) > 1 / (4 * M)) {
      count++;
    }
  }
  
  string res = "No";
  if (M >= count) { res = "Yes" }
  
  cout << res << endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:32: error: expected ';' before '}' token
   24 |   if (M >= count) { res = "Yes" }
      |                                ^~
      |                                ;
Language: C++

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

#define check(val) std::cout << "\033[31m" << #val << ": " << val << "\033[m" << std::endl
#define check_v(vec) \
  std::cout << "\033[31m" << #vec << ": [ ";\
  for(auto it=vec.begin(); it!=vec.end(); it++){cout << *it << " ";}\
  cout << "]"<< "\033[m" << endl;

int main() {
  double n, m;
  doule total;
  cin >> n >> m;
  vector <doule> v(n);
  rep(i, n){
    cin >> v[i];
    total += v[i];
  }
  int ans = 0;
  rep(i, n) {
    if (v[i] >= (total/(m * 4.0))) {
      ans ++;
    }
  }
  if (ans >=  m) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'doule' was not declared in this scope; did you mean 'double'?
   14 |   doule total;
      |   ^~~~~
      |   double
a.cc:16:16: error: template argument 2 is invalid
   16 |   vector <doule> v(n);
      |                ^
a.cc:18:13: error: invalid types 'int[int]' for array subscript
   18 |     cin >> v[i];
      |             ^
a.cc:19:5: error: 'total' was not declared in this scope
   19 |     total += v[i];
      |     ^~~~~
a.cc:19:15: error: invalid types 'int[int]' for array subscript
   19 |     total += v[i];
      |               ^
a.cc:23:10: error: invalid types 'int[int]' for array subscript
   23 |     if (v[i] >= (total/(m * 4.0))) {
      |          ^
a.cc:23:18: error: 'total' was not declared in this scope
   23 |     if (v[i] >= (total/(m * 4.0))) {
      |                  ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
//useful library
int long long gcd(int long long a, int long long b){
    return b?gcd(b,a%b):a;
} //最大公約数
int long long lcm(int long long a, int long long b){
    return a/gcd(a,b)*b;
} //最小公倍数
int long long GetDigit(int long long num){
    int long long digit=0;
    while(num!=0){
        num /= 10;
        digit++;
    }
    return digit;
} //桁数
int long long GetDigitN(int long long num, int long long N){
    int long long digit=0;
    while(num!=0){
        num /= N;
        digit++;
    }
    return digit;
} //十進数でnumの際のN進数における桁数

int main(){
    bool B = false;
    int N, M;
    vector<int> A(N);
    for(int i = 0; i < N; i++){
        cin >> V.at(i);
    }
    sort(A.begin(), A.end(), std::greater<int>());
    if(A.at(M - 1) >= floor(1 / (4 * M))){
        B = true;
    }
    if(B == true){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:16: error: 'V' was not declared in this scope
   32 |         cin >> V.at(i);
      |                ^
Language: C++

#include <iostream>
#include <cmath>

int main() {
	int N, M;
	std::cin >> N >> M;
	int tot=0;
	int arr[N];
	for (int i=0;i<N;i++){std::cin>>arr[i];tot+=arr[i];}
	std::sort(arr,arr+N,[](int &a, int &b)->bool{return a>b;});
	bool flag = true;
	for(int i=0; i<M; i++) {
		double threshold = floor((double)tot/(4.0*M));
		if (arr[i] < threshold) {flag=false;break;}
	}
	std::cout << (flag?"Yes":"No");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'sort' is not a member of 'std'; did you mean 'sqrt'?
   10 |         std::sort(arr,arr+N,[](int &a, int &b)->bool{return a>b;});
      |              ^~~~
      |              sqrt
Language: C++

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

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];
    double sum = accumulate(A.begin(), A.end(), 0.0);
    sort(A.begin(), A.end());
    reverse(A.begin(), A.end());
    sum = sum / (4 * M);
    if(A[M - 1] < sum) {
        cout << "No" << endl;
    } else {
        cout << "Yes" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: 'accumulate' was not declared in this scope
   12 |     double sum = accumulate(A.begin(), A.end(), 0.0);
      |                  ^~~~~~~~~~
Language: C++

#define rep(i, n) REP(i, 0, n)
#define REP(i, x, n) for (int i = x; i < n; i++)
#define REPE(i, x, n) for (int i = x; i <= n; i++)
#define OP(x) cout << x << endl;
template<typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
template<class T> void chmax(T& a, T b) { if(a > b) a = b; }
template<class T> void chmin(T& a, T b) { if(a < b) b = a; }
typedef long long ll;

int main() {
    int n, m; cin >> n >> m;
    vector<int> v(n);
    int sum = 0;
    rep(i, n){
        cin >> v[i];
        sum += v[i];
    }
    sort(all(v));
    int a = sum / (4 * m);
    bool flag = true;
    int c = 1;
    rep(i, m){
        if(v[n - c] >= a){
            c++;
            continue;
        }else{
            flag = false;
        }
    }
    if(flag) cout << "Yes" << endl;
    else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'cin' was not declared in this scope
   12 |     int n, m; cin >> n >> m;
      |               ^~~
a.cc:13:5: error: 'vector' was not declared in this scope
   13 |     vector<int> v(n);
      |     ^~~~~~
a.cc:13:12: error: expected primary-expression before 'int'
   13 |     vector<int> v(n);
      |            ^~~
a.cc:16:16: error: 'v' was not declared in this scope
   16 |         cin >> v[i];
      |                ^
a.cc:19:14: error: 'v' was not declared in this scope
   19 |     sort(all(v));
      |              ^
a.cc:19:10: error: 'all' was not declared in this scope; did you mean 'll'?
   19 |     sort(all(v));
      |          ^~~
      |          ll
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |     sort(all(v));
      |     ^~~~
      |     short
a.cc:31:14: error: 'cout' was not declared in this scope
   31 |     if(flag) cout << "Yes" << endl;
      |              ^~~~
a.cc:31:31: error: 'endl' was not declared in this scope
   31 |     if(flag) cout << "Yes" << endl;
      |                               ^~~~
a.cc:32:10: error: 'cout' was not declared in this scope
   32 |     else cout << "No" << endl;
      |          ^~~~
a.cc:32:26: error: 'endl' was not declared in this scope
   32 |     else cout << "No" << endl;
      |                          ^~~~
Language: C++

/**
 * Author RDP
 * 
**/
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cctype>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <queue>
#include <stack>
#include <algorithm>
#include <functional>
#include <bitset>
#define endl '\n'
#define bp(x) __builtin_popcount(x)
#define zf(x) __builtin_clz(x)
#define zl(x) __builtin_ctz(x)
#define par(x) __bultin_parity(x)
#define FAST_IO ios::sync_with_stdio(0); std::cin.tie(0);
typedef long long ll;
using namespace std;

void test_case()
{
    FAST_IO
    int n, m;
    cin >> n >> m;
    vector <int> num(n);
    ll votes = 0;
    for(int &x : num)
    {    cin >> x;
        votes += x;
    }
    int cnt = 0;
    for(int x : num)
    {
        if(x > int((votes/(4*m)) )
            cnt ++;
    }
    if(cnt >= m)
        cout <<"Yes"<<endl;
    else 
        cout <<"No" <<endl;
    return ;
}
int main()
{
    FAST_IO
    test_case();
    return 0;
}

Compiler output:
a.cc: In function 'void test_case()':
a.cc:47:35: error: expected ';' before 'cnt'
   47 |         if(x > int((votes/(4*m)) )
      |                                   ^
      |                                   ;
   48 |             cnt ++;
      |             ~~~                    
a.cc:49:5: error: expected primary-expression before '}' token
   49 |     }
      |     ^
a.cc:48:20: error: expected ')' before '}' token
   48 |             cnt ++;
      |                    ^
      |                    )
   49 |     }
      |     ~               
a.cc:47:11: note: to match this '('
   47 |         if(x > int((votes/(4*m)) )
      |           ^
a.cc:49:5: error: expected primary-expression before '}' token
   49 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
//useful library
int long long gcd(int long long a, int long long b){
    return b?gcd(b,a%b):a;
} //最大公約数
int long long lcm(int long long a, int long long b){
    return a/gcd(a,b)*b;
} //最小公倍数
int long long GetDigit(int long long num){
    int long long digit=0;
    while(num!=0){
        num /= 10;
        digit++;
    }
    return digit;
} //桁数
int long long GetDigitN(int long long num, int long long N){
    int long long digit=0;
    while(num!=0){
        num /= N;
        digit++;
    }
    return digit;
} //十進数でnumの際のN進数における桁数

int main(){
    bool B = false;
    int N, M;
    vector<int> A(N);
    for(int i = 0; i < N; i++){
        cin >> V.at(i);
    }
    sort(A.begin(), A.end(), std::greater<int>());
    if(A.at(M - 1) >= floor(1 / (4 * M)){
        B = true;
    }
    if(B == true){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:16: error: 'V' was not declared in this scope
   32 |         cin >> V.at(i);
      |                ^
a.cc:35:41: error: expected ';' before '{' token
   35 |     if(A.at(M - 1) >= floor(1 / (4 * M)){
      |                                         ^
      |                                         ;
a.cc:38:5: error: expected primary-expression before 'if'
   38 |     if(B == true){
      |     ^~
a.cc:37:6: error: expected ')' before 'if'
   37 |     }
      |      ^
      |      )
   38 |     if(B == true){
      |     ~~
a.cc:35:7: note: to match this '('
   35 |     if(A.at(M - 1) >= floor(1 / (4 * M)){
      |       ^
Language: Java

import java.util.*;
public class HelloWorld{

     public static void main(String []args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] a = new int[n];
        int sum = 0;
        for(int i=0;i<n;i++){ a[i]=sc.nextInt(); sum+=a[i]; }
        int val = sum/(m*4) ;
        Arrays.sort(a);
        int ans = 0;
        for(int i=n-1;i>=n-m;i--){
            if(a[i]<val){ ans=-1; break; }
        }
        if(ans==-1) System.out.println("No");
        else System.out.println("yes");
     }
}

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

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

  int count = 0;
  for (int i = 0; i < n; i++){
    if (a[i] >= sum \ (4*m)) count++;
  }
  if (count >= m) cout << "Yes" << endl;
  else cout << "No" << endl;
}


Compiler output:
a.cc:13:21: error: stray '\' in program
   13 |     if (a[i] >= sum \ (4*m)) count++;
      |                     ^
a.cc: In function 'int main()':
a.cc:13:23: error: 'sum' cannot be used as a function
   13 |     if (a[i] >= sum \ (4*m)) count++;
      |                 ~~~~~~^~~~~
Language: C++

#include <array>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

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

int main() {
    int N, M;
    cin >> N >> M;
    vector<int> A(N);
    long long sum = 0;
    rep(i, N) {
        cin >> A[i];
        sum += A[i];
    }
    
    sort(A.rbegin(), A.rend());
//    cout << A[M-1] << " " << sum / 4/M << endl;
    if( A[M-1] < sum / 4 / M) {
        cout << "No" << endl;
    } else {
        cout << "Yes" << endl;
    }

    return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
#define PI 3.1415926535
const long long int MOD = 998244353;
#define pb push_back
#define mp make_pair
#define fill(a)  memset(a, 0, sizeof (a))
#define SORT(v)  sort(v.begin(), v.end())
#define SORTR(v) sort(v.rbegin(), v.rend())
#define MAX(v) *max_element(v.begin(), v.end())
#define MIN(v) *min_element(v.begin(), v.end())
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);
#define watch(x) cout << (#x) << " is " << (x) << endl;
const long long int MAXX = 2e6 + 5;
const long long int MINN = 2e5 + 5;
const long long int inf = 1e6;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
typedef vector<ii> vii;
typedef vector<vii> vvii;
typedef vector< iii > viii;

ll lcm(ll a, ll b) {
   return a / __gcd(a, b) * b;
}
int XOR(int x, int y){
  return (x | y) & (~x | ~y);
}
bool cmp(const pair<int,int> &a,const pair<int,int> &b) {
    return (a.second < b.second);
}
// bool isl = binary_search(x.begin(), x.end(), 5);
// __builtin_popcount(x)  - Returns the number of set bits in x
const long long int N = 10050;
const int MAXN = 105;
int binsearch(int lo, int hi){
	while(lo<hi){
		int mid=(lo+hi)/2;
		if((mid))   // check(mid)
			hi=mid;
		else
			lo=mid+1;
	}
	return lo;
}
ll power(ll x,ll y){
    ll res=1;
    while(y>0){
      if(y&1) res=((res*x)%MOD);

      y/=2;
      x=((x*x)%MOD);
    }
    return res%MOD;
}

int main(){
    FAST
    int n,m;
    cin>>n>>m;
    int a[n];
    int flag=1,sum=0;
    vii v;
    for(int i=0;i<n;i++){
        cin>>a[i];
        sum+=a[i];
        v.pb({a[i],i});
    }
    sort(v.rbegin(),v.rend());
    if(sum%(4*m)== 0 ){
    for(int i=0;i<m;i++){
        if(v[i].first< sum/(4*m)){
            flag=0; break;
        }
    }
    }
    else{
        for(int i=0;i<m;i++){
            if(v[i].first<= sum/(4*m)){
                flag=0; break;
            }
        }
        }
    }
    if(flag) cout<<"Yes";
    else cout<<"No";
    return 0;
}


Compiler output:
a.cc:89:5: error: expected unqualified-id before 'if'
   89 |     if(flag) cout<<"Yes";
      |     ^~
a.cc:90:5: error: expected unqualified-id before 'else'
   90 |     else cout<<"No";
      |     ^~~~
a.cc:91:5: error: expected unqualified-id before 'return'
   91 |     return 0;
      |     ^~~~~~
a.cc:92:1: error: expected declaration before '}' token
   92 | }
      | ^
Language: Java

import java.util.Scanner;

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


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

import java.io.*;
import java.util.*;
 

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Unstoppable solver = new Unstoppable();
	//	int t=in.nextInt();
	//	while(t-->0)
        solver.solve(in, out);
        out.close();
    }
 
    static class Unstoppable {
        
     
        public void solve(InputReader in, PrintWriter out) {
         int n=in.nextInt();
         int m=in.nextInt();
         int a[]=new int[n];
         long sum=0;
         for(int i=0;i<n;i++){ a[i]=in.nextInt(); sum+=a[i]; }
         Arrays.sort(a);
         for(int i=n-1;i>=0;i++)
         {
             if(a[i]>=sum/(4*m)) count++;
         }
         if(count>=m) out.printlln("Yes");
         else out.println("No");
        }
    } 

 
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
 
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
 
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public long nextLong(){
            return Long.parseLong(next());
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
 
    }
}
 

Compiler output:
Main.java:30: error: cannot find symbol
             if(a[i]>=sum/(4*m)) count++;
                                 ^
  symbol:   variable count
  location: class Unstoppable
Main.java:32: error: cannot find symbol
         if(count>=m) out.printlln("Yes");
            ^
  symbol:   variable count
  location: class Unstoppable
Main.java:32: error: cannot find symbol
         if(count>=m) out.printlln("Yes");
                         ^
  symbol:   method printlln(String)
  location: variable out of type PrintWriter
3 errors
Language: C++

include <algorithm>
#include <array>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

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

int main() {
    int N, M;
    cin >> N >> M;
    vector<int> A(N);
    long long sum = 0;
    rep(i, N) {
        cin >> A[i];
        sum += A[i];
    }
    
    sort(A.rbegin(), A.rend());
//    cout << A[M-1] << " " << sum / 4/M << endl;
    if( A[M-1] < sum / 4 / M) {
        cout << "No" << endl;
    } else {
        cout << "Yes" << endl;
    }

    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <algorithm>
      | ^~~~~~~
In file included from /usr/include/c++/14/array:39,
                 from a.cc:2:
/usr/include/c++/14/initializer_list:51:15: error: 'size_t' does not name a type
   51 |       typedef size_t            size_type;
      |               ^~~~~~
/usr/include/c++/14/initializer_list:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | // std::initializer_list support -*- C++ -*-
/usr/include/c++/14/initializer_list:57:7: error: 'size_type' does not name a type
   57 |       size_type                 _M_len;
      |       ^~~~~~~~~
/usr/include/c++/14/initializer_list:60:54: error: 'size_type' has not been declared
   60 |       constexpr initializer_list(const_iterator __a, size_type __l)
      |                                                      ^~~~~~~~~
/usr/include/c++/14/initializer_list:68:17: error: 'size_type' does not name a type
   68 |       constexpr size_type
      |                 ^~~~~~~~~
/usr/include/c++/14/initializer_list:45:11: fatal error: definition of 'class std::initializer_list<_E>' does not match '#include <initializer_list>'
   45 |     class initializer_list
      |           ^~~~~~~~~~~~~~~~
compilation terminated.
Language: Java

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

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
N, M = list(map(int, input().split()))
^
1 error
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M;
  vector<int> vec(N);
  int sum = 0;//合計点
  for (int i = 0;i < N;i++) {
    cin >> vec.at(i);
    sum += vec,at(i);
  }
  
  int A = sum / 4;
  
  sort(vec.begin(),vec.end());
  for (int i = 0;i < M;i++) {
    if (vec.at(i) < A) {
      cout << "No" << endl;
      break;
    }
    if (i + 1 == M) {
      cout << "Yes" << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: no match for 'operator+=' (operand types are 'int' and 'std::vector<int>')
   11 |     sum += vec,at(i);
      |     ~~~~^~~~~~
a.cc:11:16: error: 'at' was not declared in this scope
   11 |     sum += vec,at(i);
      |                ^~
Language: C++

#include"bits/stdc++.h"
using namespace std;
typedef unsigned long long ll;


using Graph = vector<vector<int>>;//グラフ型
void dfs(const Graph& G, int v/*根*/, vector<bool>& seen) {
	seen[v] = true;  //vを訪問済にする
	for (auto next_v : G[v]) { //訪問済にしたvとつながっている場所を順番に探す
		if (seen[next_v]) continue; //もし探索済みならスルー
		dfs(G, next_v, seen); //再帰的に探索
	}
}

void bfs(const Graph& G, queue<int>& que/*発見したが訪問はしていない*/, vector<int>& dist/*開始地点からの距離*/) {
	
	while (!que.empty()) {
		int v = que.front();//queのうち先頭のものからスタート
		que.pop();//先頭を削除

		for (int nv : G[v]) {//vとつながっている点を列挙
			if (dist[nv] != -1) continue;//発見済(=距離が格納されている)であればスルー
			dist[nv] = dist[v] + 1;//vとつながっている点に距離の情報を追加
			que.push(nv);//vとつながっている点を発見済にする
		}
	}
}

template<typename T>
T gcd(T a, T b) {
	if (a % b == 0) {
		return(b);
	}
	else {
		return(gcd(b, a % b));
	}
}

template<typename T>
T lcm(T a, T b) {
	return a * b / gcd(a, b);
}


template<typename T>
bool same(T x_b, T x_e, T y_b, T y_e) {
	for (auto i = x_b, j = y_b; i != x_e && j != y_e; ++i, ++j) {
		if (*i != *j) {
			return false;
		}
	}
	return true;
}

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

/*
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:63:47: error: expected ')' before ';' token
   63 |         sort(a.begin(), a.end(),greater<int>();
      |             ~                                 ^
      |                                               )
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int ans=0;
      |   ^~~
a.cc:12:31: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |     if(arr[i]>=(total/(4*m))) ans++;
      |                               ^~~
      |                               abs
a.cc:14:6: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |   if(ans>=m) cout << "Yes";
      |      ^~~
      |      abs
Language: Java

import java.io.*;
import java.math.*;
import java.util.*;
import java.util.stream.*;

class Main {
    static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static final PrintWriter pw = new PrintWriter(System.out);
    public static void main(String[] args) throws IOException {
        String[] inputs = br.readLine().split(" ");
        int n = Integer.parseInt(inputs[0]);
        int m = Integer.parseInt(inputs[1]);

        int sum = 0;

        inputs = br.readLine().split(" ");
        int[] nums = new int[num];
        for(int i = 0; i < num; i++) {
            nums[i] = Integer.parseInt(inputs[i]);
            sum += nums[i];
        }

        String ans = "Yes";
        Arrays.sort(nums);
        if(nums[n-m] < sum / 4 / m) {
            ans = "No";
        }

        pw.println(ans);
        pw.flush();
    }
}

Compiler output:
Main.java:17: error: cannot find symbol
        int[] nums = new int[num];
                             ^
  symbol:   variable num
  location: class Main
Main.java:18: error: cannot find symbol
        for(int i = 0; i < num; i++) {
                           ^
  symbol:   variable num
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;

class Solution {
public:
	void solve() {
		int n, m;
		cin >> n >> m;
		vector<int> a(n, 0);
		for (int i = 0; i < n; i++) cin >> a[i];
		int s = accumulate(a.begin(), a.end(), 0);
		int t = (s + (4 * m - 1)) / (4 * m);
		for (int i = 0; i < n; i++) {
			if (a[i] >= t) m--;
		}
		if (m <= 0) cout << "Yes\n" else cout << "No\n";
		return;
	};
};

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	Solution solution;
	solution.solve();
	return 0;
}

Compiler output:
a.cc: In member function 'void Solution::solve()':
a.cc:17:45: error: expected ';' before 'else'
   17 |                 if (m <= 0) cout << "Yes\n" else cout << "No\n";
      |                                             ^~~~
Language: C++

n,m=map(int,input().split())
a=[int(i) for i in input().split()]
t=sum(a)/(4*m)
for i in range(n):
    if m==0:
        break
    else:
        if a[i]>=t:
            m-=1
if m==0:
    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>
#define endl '\n'
using namespace std;
int main(){
    int n,m;cin>>n>>m;
    int A[n];
    int sum;
    string ans="Yes";
    for(int i=0;i<n;i++){
        cin>>A[i];
        res+=A[i];
    }
    sort(A.begin(),A.end());
    reverse(A.begin(),A.end());
    for(int i=0;i<m;i++){
        if(A[i]<res*m*4){
            ans="No";
            break;
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'res' was not declared in this scope
   11 |         res+=A[i];
      |         ^~~
a.cc:13:12: error: request for member 'begin' in 'A', which is of non-class type 'int [n]'
   13 |     sort(A.begin(),A.end());
      |            ^~~~~
a.cc:13:22: error: request for member 'end' in 'A', which is of non-class type 'int [n]'
   13 |     sort(A.begin(),A.end());
      |                      ^~~
a.cc:14:15: error: request for member 'begin' in 'A', which is of non-class type 'int [n]'
   14 |     reverse(A.begin(),A.end());
      |               ^~~~~
a.cc:14:25: error: request for member 'end' in 'A', which is of non-class type 'int [n]'
   14 |     reverse(A.begin(),A.end());
      |                         ^~~
a.cc:16:17: error: 'res' was not declared in this scope
   16 |         if(A[i]<res*m*4){
      |                 ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
int main()
{
	int n, m, thres, c, sum;
	cin >> n >> m;
	vector<int> s(n);
	c = sum = 0;
	rep(i, n) {
		cin >> s[i];
		sum += s[i];
	}
	thres = ceil(sum / double(4 * m));
	rep(i, n) {
		if (thres <= s[i])	c++;
	}
	if (c < m)	cout << "No" << endl;
	else {
		cout << "Yes" << endl;
	}
	return 0;
}

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

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

typedef pair<int, int> P;
typedef long long ll;

int main()
{
	int n, m;
	int sumV = 0;

	cin >> n >> m;

	vector<int> a(n);

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

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

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


	return 0;
}

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

#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
int main() {
  int a,c,d=0,e=0;
  cin>>a>>c;
  vector<int>b(a);
  rep(i,a){
    cin>>b.at(i);
    d+=b.at(i);
  }
  d=d/4/c;
  rep(i,a){
    if(b.at(i)>=d)e+++
  }
  if(e<=c)cout<<"Yes";
  else cout<<"No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected primary-expression before '}' token
   16 |   }
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define pii pair<int,int>
#define fi first
#define se second
#define mp(x,y) make_pair(x,y)
#define pb(x) pupsh_back(x)
int32_t main() {
    int n,m;
    cin>>n>>m;
    int v[n];
    int sum=0;
    for(int i=0;i<n;i++){cin>>v[i];sum+=v[i];}
    
    int k=sum/(4*m);
    
    if(k*(4*m)==sum)
    {
        k--;
    }
    sort(v,v+n);
    int cnt=0;
    for(int i=n-1;i>=0;i--)
    {
        if(vote[i]>k)
        {
            cnt++;
        }
        else
        break;
    }
    if(cnt>=M) cout<<"Yes";
    else cout<<"No";
    
//    cout<<"Sum of x+y = " << z;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:27:12: error: 'vote' was not declared in this scope
   27 |         if(vote[i]>k)
      |            ^~~~
a.cc:34:13: error: 'M' was not declared in this scope
   34 |     if(cnt>=M) cout<<"Yes";
      |             ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'int'
    9 |   int ans=0;
      |   ^~~
a.cc:12:31: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |     if(arr[i]>=(total/(4*m))) ans++;
      |                               ^~~
      |                               abs
a.cc:14:6: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |   if(ans>m) cout << "Yes";
      |      ^~~
      |      abs
Language: C++

#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
int main() {
  int a,c,d=0,e=0;
  cin>>a>>c:
  vector<int>b;
  rep(i,a){
    cin>>b.at(i);
    d+=b.at(i);
  }
  d=d/4/c;
  rep(i,a){
    if(b.at(i)>=d)e+++
  }
  if(e<=c)cout<<"Yes";
  else cout<<"No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: found ':' in nested-name-specifier, expected '::'
    7 |   cin>>a>>c:
      |            ^
      |            ::
a.cc:7:11: error: 'c' is not a class, namespace, or enumeration
    7 |   cin>>a>>c:
      |           ^
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int>b;
      |          ^~~
a.cc:10:10: error: 'b' was not declared in this scope
   10 |     cin>>b.at(i);
      |          ^
a.cc:15:8: error: 'b' was not declared in this scope
   15 |     if(b.at(i)>=d)e+++
      |        ^
a.cc:16:3: error: expected primary-expression before '}' token
   16 |   }
      |   ^
Language: C++

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

 
int main(){
    double N,M;
    cin >> N >> M;
    double sum = 0;
    int A[N] = {};
    rep(i,N){
        cin >> A[i];
        sum += A[i];
    }
    int res = 0;
    rep(i,N){
        if(A[i] >= sum / (4 * M)) res++;
    }
    cout << (res >= M ? "Yes" : "No") << endl;

    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repp(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define repm(i,n) for(int (i)=(n-1);(i)>=0;(i)--)
#define INF (1ll<<60)
#define all(x) (x).begin(),(x).end()
typedef long long lint;
const lint MOD =1000000007;
const lint MAX = 10000000;
using Graph =vector<vector<lint>>;
typedef pair<lint,lint> P;
 
 
lint fac[MAX], finv[MAX], inv[MAX];
 
void COMinit() 
{
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (lint i = 2; i < MAX; i++)
    {
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
long long COM(lint n, lint k)
{
    if (n < k)
        return 0;
    if (n < 0 || k < 0)
        return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
lint primary(lint num)
{
    if (num < 2) return 0;
    else if (num == 2) return 1;
    else if (num % 2 == 0) return 0;
 
    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return 0;
        }
    }
 
    return 1;
}
   long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
    lint lcm(lint a,lint b){
        return a/__gcd(a,b)*b;
    }
     lint gcd(lint a,lint b){
        return __gcd(a,b);
    }    

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

Compiler output:
a.cc: In function 'int main()':
a.cc:82:25: error: expected primary-expression before '>' token
   82 |             if(a[i]*4*m=>sum)ans++;
      |                         ^
Language: C++

#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
#define
int main() {
  int a,c,d=0,e=0;
  cin>>a>>c:
  vector<int>b;
  rep(i,a){
    cin>>b.at(i);
    d+=b.at(i);
  }
  d=d/4/c;
  rep(i,a){
    if(b.at(i)>=d)e+++
  }
  if(e<=c)cout<<"Yes";
  else cout<<"No";
}

Compiler output:
a.cc:5:8: error: no macro name given in #define directive
    5 | #define
      |        ^
a.cc: In function 'int main()':
a.cc:8:12: error: found ':' in nested-name-specifier, expected '::'
    8 |   cin>>a>>c:
      |            ^
      |            ::
a.cc:8:11: error: 'c' is not a class, namespace, or enumeration
    8 |   cin>>a>>c:
      |           ^
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   vector<int>b;
      |          ^~~
a.cc:11:10: error: 'b' was not declared in this scope
   11 |     cin>>b.at(i);
      |          ^
a.cc:16:8: error: 'b' was not declared in this scope
   16 |     if(b.at(i)>=d)e+++
      |        ^
a.cc:17:3: error: expected primary-expression before '}' token
   17 |   }
      |   ^
Language: Java


N, M = list(map(int, input().split()))

A = list(map(int, input().split()))

counts = 0
total = sum(A)
for v in A:
    if v >= total / (4 * M):
        counts += 1
if counts >= M:
    print("Yes")
else:
    print("No")





Compiler output:
Main.java:2: error: class, interface, enum, or record expected
N, M = list(map(int, input().split()))
^
1 error
Language: C++

import sys
sys.setrecursionlimit(1000000)


if __name__ == "__main__":
    N, M = tuple(map(int, input().split(" ")))
    As = list(map(int, input().split(" ")))
    S = sum(As)
    As = [a for a in As if a >= S/(4*M)]
    if len(As) >= M:
        print("Yes")
    else:
        print("No")


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

N, M = gets.split.map{|i|i.to_i}
A = gets.split.map{|i|i.to_i}
A.sort_by!{|i|-i}
if A[M - 1] < A.inject(:+) / (4 * M)
    puts "No"
else
    puts "Yes"
end


Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N, M = gets.split.map{|i|i.to_i}
      | ^
a.cc:2:1: error: 'A' does not name a type
    2 | A = gets.split.map{|i|i.to_i}
      | ^
a.cc:3:1: error: 'A' does not name a type
    3 | A.sort_by!{|i|-i}
      | ^
a.cc:4:1: error: expected unqualified-id before 'if'
    4 | if A[M - 1] < A.inject(:+) / (4 * M)
      | ^~
Language: C++

#include "stdafx.h"
//
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr char sp = ' ';

int N, M, A[100], S;

int main() {
	cin >> N >> M;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
		S += A[i];
	}
	sort(A, A + N, greater<>());
	if (A[M - 1] * 4 * M >= S) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}
ll factorial(ll n) {
  if (n == 1) {
    return 1;
  }
  ll ans = factorial(n-1);
  return ans*n;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a%b);
}
ll lcm(ll a, ll b) {
  return (a/gcd(a, b))*b;
}
bool is_prime(ll n) {
  for (ll i = 2; i*i <= n; i++) {
    if (n%i == 0) return false;
  }
  return n != 1;
}
ll mod_pow(ll x, ll n, ll mod) {
  if (n == 0) return 1;
  ll res = mod_pow(x*x%mod, n/2, mod);
  if (n & 1) res = res * x % mod;
  return res;
}

int main() {
  ll n, m;
  cin >> n >> m;
  ll tmp = 0;
  vector <ll> v(n);
  ll sum = 0;
  rep(i, n) {
    cin >> v.at(i);
    sum += v.at(i);
  }
  rep(i, n) {
    if (v.at(i) >= sum/(4*m)) res++;
  }
  if (res >= m) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:31: error: 'res' was not declared in this scope; did you mean 'rep'?
   66 |     if (v.at(i) >= sum/(4*m)) res++;
      |                               ^~~
      |                               rep
a.cc:68:7: error: 'res' was not declared in this scope; did you mean 'rep'?
   68 |   if (res >= m) {
      |       ^~~
      |       rep
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back

typedef long long ll;

const ll MOD = 1e9+7;
const ll INF = 1e9+5;

int a, b, c, d, e, n, m, k;
string s, t, r;
char c1, c2, c3;

int A[200005];
int B[200005];
int C[200005];

int main() {
	int n, m;
  	cin >>n>>m;
  int uk = 0;
  	for (int i=0 ; i<n ; i++) {
      cin >>A[i];
      uk+=A[i];
    }
  sort(A, A+n);
  reverse(A, A+n);
  if (A[m-1]*4*M < uk) cout <<"No"<<endl;
  else cout <<"Yes"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:16: error: 'M' was not declared in this scope
   33 |   if (A[m-1]*4*M < uk) cout <<"No"<<endl;
      |                ^
Language: C

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

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

#include <bits/stdc++.h>

using namespace std;

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

  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  long long s = 0;#include <bits/stdc++.h>

using namespace std;

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

  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  long long s = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] * 4ll * m >= s) {
      ++cnt;
    }
  }
  cout << (cnt >= m ? "Yes" : "No");

  return 0;
}
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] * 4ll * m >= s) {
      ++cnt;
    }
  }
  cout << (cnt >= m ? "Yes" : "No");
  
  return 0;
}

Compiler output:
a.cc:12:19: error: stray '#' in program
   12 |   long long s = 0;#include <bits/stdc++.h>
      |                   ^
a.cc: In function 'int main()':
a.cc:12:20: error: 'include' was not declared in this scope
   12 |   long long s = 0;#include <bits/stdc++.h>
      |                    ^~~~~~~
a.cc:12:29: error: 'bits' was not declared in this scope
   12 |   long long s = 0;#include <bits/stdc++.h>
      |                             ^~~~
a.cc:12:34: error: 'stdc' was not declared in this scope; did you mean 'std'?
   12 |   long long s = 0;#include <bits/stdc++.h>
      |                                  ^~~~
      |                                  std
a.cc:14:1: error: expected primary-expression before 'using'
   14 | using namespace std;
      | ^~~~~
a.cc:16:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   16 | int main() {
      |         ^~
a.cc:16:9: note: remove parentheses to default-initialize a variable
   16 | int main() {
      |         ^~
      |         --
a.cc:16:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:16:12: error: a function-definition is not allowed here before '{' token
   16 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define pb push_back
#define INF 0x3f3f3f3
#define LINF 0x3f3f3f3f3f3f3f
#define MAXN int(1e5)+5
#define ll long long
#define f first
#define s second
#define FAST cin.tie(0), cout.tie(0), ios::sync_with_stdio(0)
#define debug(x) cout << "DEBUG " << x << endl
#define debug2(x, y) cout << "DEBUG " << x << " " << y << endl
#define debug3(x, y, z) cout << "DEBUG " << x << " " << y << " " << z<< endl
#define max3(x, y, z) max(x, max(y, z))
#define ull long long
using namespace std;
using namespace __gnu_pbds;
typedef pair<int, int> pii;
typedef pair<string, int> psi;
typedef pair<unsigned ll, pair<int, int> > piii;
typedef pair<pair<int, int>, int> piii2;
typedef tree<int,null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> indexed_set;

int main() {
	int n, m;
	cin >> n >> m;
	vector<int> v(n);
	int s = 0;
	for(int i = 0; i < n; i++) {
		cin >> v[i];
		s += v[i];
	}
	sort(v.begin(), v.end(), greater<int>);
	for(int i = 0; i < n && m; i++ m--) {
		if(v[i] < s/(4*m)) break;
	}
	cout << (s == 0 ? "Yes" : "No") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:46: error: expected primary-expression before ')' token
   33 |         sort(v.begin(), v.end(), greater<int>);
      |                                              ^
a.cc:34:39: error: expected ')' before 'm'
   34 |         for(int i = 0; i < n && m; i++ m--) {
      |            ~                          ^~
      |                                       )
a.cc:34:43: error: expected ';' before ')' token
   34 |         for(int i = 0; i < n && m; i++ m--) {
      |                                           ^
      |                                           ;
Language: C++

#include<stdio.h>
#include<math.h>
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long  n,k,s,p;
   cin>>n>>k

s=n%k;
p=abs(s-k);
if(p>s)
{
printf("%lld\n",s);
}
else
{
printf("%lld\n",p);
}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected ';' before 's'
    8 |    cin>>n>>k
      |             ^
      |             ;
    9 | 
   10 | s=n%k;
      | ~
Language: C++

#include<stdio.h>
#include<math.h>
#include<bits/stdc++.h>
using namespacestd;
int main()
{
long long  n,k,s,p;
   cin>>n>>k

s=n%k;
p=abs(s-k);
if(p>s)
{
printf("%lld\n",s);
}
else
{
printf("%lld\n",p);
}


}

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