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

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
int N,M,wa=0;
int count=0;
int A[1000];
cin >> N >> M;
    for(int i=0;i<N;i++){
    cin >> A[i];
    wa = wa+A[i];
    }
    for(int i=0;i<N;i++){
        if(wa=<4*M*A[i])
        count++;
    }
    if(count>M)
    std::cout << "Yes" << std::endl;
    else
    cout<< "No"<< endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: expected primary-expression before '<' token
   14 |         if(wa=<4*M*A[i])
      |               ^
Language: C++

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

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

  // N要素の配列
  vector<int> A(N);

  // 入力処理
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }

  int d 
  for (int i =0; i <N; i++){
    d += A.at(i) }
  int sum = 0;

  // 合計点を計算
  for (int i = 0; i < N; i++) {
  if (A.at(i)*4*M > d) {
    // ①ここにプログラムを追記
    sum ++;
  }
  }
    if (sum >= M) {
      cout << "Yes" << endl;
    }
    else {
      cout << "No" << endl;
    }
}
  




Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: expected initializer before 'for'
   17 |   for (int i =0; i <N; i++){
      |   ^~~
a.cc:17:18: error: 'i' was not declared in this scope
   17 |   for (int i =0; i <N; i++){
      |                  ^
a.cc:23:21: error: 'd' was not declared in this scope
   23 |   if (A.at(i)*4*M > d) {
      |                     ^
Language: C++

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

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

  // N要素の配列
  vector<int> A(N);

  // 入力処理
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }

  // 合計点
  int sum = 0;

  // 合計点を計算
  for (int i = 0; i < N; i++) {
  if (A.at(i)*4*M > 1) {
    // ①ここにプログラムを追記
    sum ++
  }
  }
    if (sum >= M) {
      cout << "Yes" << endl;
    }
    else {
      cout << "No" << endl;
    }

  




Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: expected ';' before '}' token
   23 |     sum ++
      |           ^
      |           ;
   24 |   }
      |   ~        
a.cc:31:6: error: expected '}' at end of input
   31 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

#include <stdio.h>
#include<conio.h>

int main()
{
    int M,N,A[100],i,c=0,s=0;
    scanf("%d%d",&N,&M);
    for(i=0;i<N;i++)
    {
        scanf("%d",&A[i]);
        s+=A[i];
    }
    i=0;
    while(i<N)
    {
        if(A[i]>=(s/(4*M)))
        {c++;}
        i++;
    }
    if(c>=M)
    printf("\nYes");
    else
    printf("\nNo");
    return 0;
}


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

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

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


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

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

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


Compiler output:
a.cc:2:9: fatal error: vector.h: No such file or directory
    2 | #include<vector.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
a.cc:17:5: error: 'reverse' was not declared in this scope
   17 |     reverse(a.begin(),a.end());
      |     ^~~~~~~
a.cc:18:15: error: expected primary-expression before ';' token
   18 |     for(i=0;i<;i++)
      |               ^
Language: C++

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

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


Compiler output:
a.cc:2:9: fatal error: vector.h: No such file or directory
    2 | #include<vector.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: conflicting declaration 'double t'
   12 | double t=(c/(4*m));
      |        ^
a.cc:5:11: note: previous declaration as 'int t'
    5 | int m,i,n,t,c=0,k=0,a[100];
      |           ^
Language: C++

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

 

 
int main() {
  
    int n, m;
    int tot = 0;
    scanf("%d%d", &n, &m);
    for(int i = 0; i < n; i++) {
        scanf("%d" ,&arr[i]);
        tot += arr[i];
    }
    sort(arr, arr + n);
    for(int i = n - 1, j = 1; i >= 0; i--, j++) {
        if(arr[i] < (long double)tot / (4 * m)) break;
        if(j == m) return puts("Yes"), 0;
    }
    puts("No");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: 'arr' was not declared in this scope
   14 |         scanf("%d" ,&arr[i]);
      |                      ^~~
a.cc:17:10: error: 'arr' was not declared in this scope
   17 |     sort(arr, arr + n);
      |          ^~~
Language: C++

n, m = list(map(int,input().split()))
a = list(map(int,input().split()))
a.sort(reverse=True)

limit = sum(a)/(4*m)
canselect = True
for ae in a:
    if ae < limit:
        canselect = False

if canselect:
    print("Yes")
else:
    print("No")    

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

#include <iostream>
#include <vector>
using namespace std;
int main()
{
    int n, m;
    cin >> n >> m;
    int c = 0;
    vector <int> v;
    int total = 0;
    for(int i = 0; i < n; i++)
    {
        int temp;
        cin >> temp;
        v.push_back(temp);
    }
    for(int i = 0; i < n; i++)
    {
        total += v[i];
    }
    sort(v.begin(), v.end());
    if(v[m-1] > total/(4*m))
        cout << "Yes" << endl;
    else 
        cout << "No" << endl;
    return 0;
}

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

N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort(reverse=True)
S = sum(A)
if A[M-1] >= S / (4*M):
	print("Yes")
else:
	print("No")


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

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

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

	int n, m;
	cin >> n >>m;
	
	vector<int> a(n);
	
	ll sum = 0;
	for(int i = 0; i < n; i++){
		cin >> a[i];
		sum += a[i];
	}
 	
 	int count=0;
	for(int i : a){
		if(i * 4ll * m >= sum)count++;
	}
	
	puts((count >= m) ? "YES" : "NO");

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'll' was not declared in this scope
   13 |         ll sum = 0;
      |         ^~
a.cc:16:17: error: 'sum' was not declared in this scope
   16 |                 sum += a[i];
      |                 ^~~
a.cc:21:35: error: 'sum' was not declared in this scope
   21 |                 if(i * 4ll * m >= sum)count++;
      |                                   ^~~
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 = accumulate(a.begin(),a.end(),0);
 	count=0;
	for(int i=0;i<n;i++){
		if(a[i]*4LL*m>=sum)count++;
	}
	puts((count>=m) ? "YES" : "NO");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: overloaded function with no contextual type information
   12 |         count=0;
      |               ^
a.cc:14:41: error: no post-increment operator for type
   14 |                 if(a[i]*4LL*m>=sum)count++;
      |                                         ^~
a.cc:16:20: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>='
   16 |         puts((count>=m) ? "YES" : "NO");
      |               ~~~~~^~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:38: error: 'll' was not declared in this scope
   13 |     sort(a.begin(), a.end(), greater<ll>());
      |                                      ^~
a.cc:13:40: error: template argument 1 is invalid
   13 |     sort(a.begin(), a.end(), greater<ll>());
      |                                        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'll' was not declared in this scope
    4 |         ll n,sum=0;
      |         ^~
a.cc:7:12: error: 'n' was not declared in this scope
    7 |     cin >> n >> m;
      |            ^
a.cc:8:14: error: template argument 2 is invalid
    8 |     vector<ll> a(n);
      |              ^
a.cc:9:11: error: expected ';' before 'i'
    9 |     for(ll i = 0; i < n ; i++){
      |           ^~
      |           ;
a.cc:9:19: error: 'i' was not declared in this scope
    9 |     for(ll i = 0; i < n ; i++){
      |                   ^
a.cc:11:9: error: 'sum' was not declared in this scope
   11 |         sum += a[i];
      |         ^~~
a.cc:13:12: error: request for member 'begin' in 'a', which is of non-class type 'int'
   13 |     sort(a.begin(), a.end(), greater<ll>());
      |            ^~~~~
a.cc:13:23: error: request for member 'end' in 'a', which is of non-class type 'int'
   13 |     sort(a.begin(), a.end(), greater<ll>());
      |                       ^~~
a.cc:16:12: error: invalid types 'int[int]' for array subscript
   16 |     while(a[c]>=sum/(4*m)){
      |            ^
a.cc:16:17: error: 'sum' was not declared in this scope
   16 |     while(a[c]>=sum/(4*m)){
      |                 ^~~
Language: C++

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

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n, m; cin>>n>>m;
  if(m>= n/(4*m)) cout<<"Yes";
  else cout<<"No";

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

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
#include <functional>   // std::greater

using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  auto sum = accumulate(A.begin(), A.end(), 0);
  if (A[M-1] >= sum / 4.0 * M) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end(), greater<int>());
  auto sum = accumulate(A.begin(), A.end(), 0);
  if (A[M-1] >= sum / (4.0 * M)) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}

Compiler output:
a.cc:35:5: error: redefinition of 'int main()'
   35 | int main() {
      |     ^~~~
a.cc:9:5: note: 'int main()' previously defined here
    9 | int main() {
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  auto sum = accumulate(A.begin(), A.end(), 0);
  if (A[M-1] >= sum / (4.0 * M)) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  auto sum = accumulate(A.begin(), A.end(), 0);
  
  sort(A.begin(), A.end(), greater<int>());
  if (A[M-1] >= sum / (4.0 * M)) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}


Compiler output:
a.cc:34:5: error: redefinition of 'int main()'
   34 | int main() {
      |     ^~~~
a.cc:8:5: note: 'int main()' previously defined here
    8 | int main() {
      |     ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before '}' token
    9 |     cin >> p.at(i)}
      |                   ^
      |                   ;
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  auto sum = accumulate(A.begin(), A.end(), 0);
  if (A[M-1] >= sum / 4.0 * M) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  auto sum = accumulate(A.begin(), A.end(), 0);
  if (A[M-1] >= sum / (4.0 * M)) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}


Compiler output:
a.cc:34:5: error: redefinition of 'int main()'
   34 | int main() {
      |     ^~~~
a.cc:8:5: note: 'int main()' previously defined here
    8 | int main() {
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  auto sum = accumulate(A.begin(), A.end());
  if (A[M-1] >= sum / 4.0 * M) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}

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

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  auto sum = accumulate(A.begin(), A.end());
  if (A[M-1] >= sum / 4 * M) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}

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

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  
  int sum = accumulate(A.begin(), A.end(), 0);
  int limit = sum / (4 * m) + 1;
  int c = count_if(A.begin(), A.end(), [&](int a) { return a >= limit; });
  if (M >= c) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:26: error: 'm' was not declared in this scope
   19 |   int limit = sum / (4 * m) + 1;
      |                          ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  
  int sum = accumulate(A.begin(), A.end(), 0);
  int limit = sum / (4 * m);
  int c = count_if(A.begin(), A.end(), [&](int a) { return a > limit; });
  if (M >= c) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}

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

#include <iostream>
#include <algorithm>
#include <vector>
 
using namespace std;
 
int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  
  int sum = accumulate(A.begin(), A.end(), 0);
  int limit = sum / (4 * m);
  int c = count_if(A.begin(), A.end(), [&](int a) { return a > limit; });
  if (M >= c) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'accumulate' was not declared in this scope
   17 |   int sum = accumulate(A.begin(), A.end(), 0);
      |             ^~~~~~~~~~
a.cc:18:26: error: 'm' was not declared in this scope
   18 |   int limit = sum / (4 * m);
      |                          ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main() {
  int N, M;
  
  cin >> N >> M;
  
  vector<int> A(N);
  for (auto i = 0; i < N; ++i) {
    cin >> A[i];
  }
  
  int sum = accumulate(A.begin(), A.end(), 0);
  int limit = sum / (4 * m);
  int c = count_if(A.begin(), A.end(), [&](int a) { return a > limit; });
  if (M >= c) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'vector' was not declared in this scope
   11 |   vector<int> A(N);
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | 
a.cc:11:10: error: expected primary-expression before 'int'
   11 |   vector<int> A(N);
      |          ^~~
a.cc:13:12: error: 'A' was not declared in this scope
   13 |     cin >> A[i];
      |            ^
a.cc:16:24: error: 'A' was not declared in this scope
   16 |   int sum = accumulate(A.begin(), A.end(), 0);
      |                        ^
a.cc:16:13: error: 'accumulate' was not declared in this scope
   16 |   int sum = accumulate(A.begin(), A.end(), 0);
      |             ^~~~~~~~~~
a.cc:17:26: error: 'm' was not declared in this scope
   17 |   int limit = sum / (4 * m);
      |                          ^
Language: C++

n, m = map(int,input().split())
a = list(map(int,input().split()))
tot = 0
for x in a:
    tot += x
cnt = 0
for x in a:
    if 4*x*m >= tot:
        cnt += 1
if cnt < m:
    print("No")
else:
    print("Yes")


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

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int n,m,a[1005],sum=0;
  cin>>n>>m;
  for(int i=0;i<n;i++){
    cin>>a[i];
    sum+=a[i];}
  int limit=sum/(4*m);
  int count=0;
  for(int i=0;i<n;i++)[
    if(a[i]>=limit)
    count++;
    }
    if(count>=m)	cout<<"Yes"<<endl;
    else	cout<<"No"<<endl;
    return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected identifier before 'if'
   13 |     if(a[i]>=limit)
      |     ^~
a.cc:14:12: error: expected ']' before ';' token
   14 |     count++;
      |            ^
      |            ]
a.cc: In lambda function:
a.cc:14:12: error: expected '{' before ';' token
a.cc: At global scope:
a.cc:16:5: error: expected unqualified-id before 'if'
   16 |     if(count>=m)        cout<<"Yes"<<endl;
      |     ^~
a.cc:17:5: error: expected unqualified-id before 'else'
   17 |     else        cout<<"No"<<endl;
      |     ^~~~
a.cc:18:5: error: expected unqualified-id before 'return'
   18 |     return 0;}
      |     ^~~~~~
a.cc:18:14: error: expected declaration before '}' token
   18 |     return 0;}
      |              ^
Language: C

#include<stdio.h>
int main()
{
	int n,m,i,j=0,g=0;

	scanf("%d%d",&n,&m);
	
	int a[100];

	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		g+=a[i];
	}
	a[n+1]='\0'
	for(i=0;i<n;i++)
		if(a[i]<(g/(4*m)))
			j++;
	if(j>=n-m)
		printf("No\n");
	else
		printf("Yes\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:20: error: expected ';' before 'for'
   14 |         a[n+1]='\0'
      |                    ^
      |                    ;
   15 |         for(i=0;i<n;i++)
      |         ~~~
Language: C

#include<stdio.h>
int main()
{
	int n,m,i,j=0,g=0;

	scanf("%d%d",&n,&m);
	
	int a[100];

	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		g+=a[i];
	}
	a[i+1]='\0'
	for(i=0;i<n;i++)
		if(a[i]<(g/(4*m)))
			j++;
	if(j>=n-m)
		printf("No\n");
	else
		printf("Yes\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:20: error: expected ';' before 'for'
   14 |         a[i+1]='\0'
      |                    ^
      |                    ;
   15 |         for(i=0;i<n;i++)
      |         ~~~
Language: C++

#include<iostream>
#include<vector.h>
using namespace std;
int main()
{
  std::vector<int> p;
  int n,m,t;
  int s = 0;
  cin>>n>>m;
  for(int i=0;i<n;i++)
  {
    cin>>t;
    s+=t;
    p.push_back(t);
  }
  int k = 4*m;
  int k1 = s/k;
  int res = 0;
  for(int i=0;i<n;i++)
  {
    if(p[i]>k1)
      res++;
    if(res >= m)
      cout <<"YES";
      //return true;
  }
  if(res <m)
    cout <<"NO";
  //return false;
  return 0;
}

Compiler output:
a.cc:2:9: fatal error: vector.h: No such file or directory
    2 | #include<vector.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
int main()
{
  std::vector<int> p;
  int n,m,t;
  int s = 0;
  cin>>n>>m;
  for(int i=0;i<n;i++)
  {
    cin>>t;
    s+=t;
    p.push_back(t);
  }
  int k = 4*m;
  int k1 = s/k;
  int res = 0;
  for(int i=0;i<n;i++)
  {
    if(p[i]>k1)
      res++;
    if(res >= m)
      cout <<"YES";
      //return true;
  }
  if(res <m)
    cout <<"NO";
  //return false;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'vector' is not a member of 'std'
    5 |   std::vector<int> p;
      |        ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:5:15: error: expected primary-expression before 'int'
    5 |   std::vector<int> p;
      |               ^~~
a.cc:13:5: error: 'p' was not declared in this scope
   13 |     p.push_back(t);
      |     ^
a.cc:20:8: error: 'p' was not declared in this scope
   20 |     if(p[i]>k1)
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
typedef vector<int>  vi;
typedef set<char> setchar;
typedef set<int> sett;
typedef deque <int> dq;
typedef long long ll;
#define vec(a)  a.begin(),a.end()
#define pb     push_back
#define pf     push_front
#define mem(a,b) memset(a,b,sizeof(a));
#define inI(a)  scanf("%d",&a);
#define inT(a,b)  scanf("%d %d",&a,&b);
#define inL(a)  scanf("%lld",&a);
#define SWAP(a,b) a= a^b, b=a^b, a=a^b
 
//int fx[]={+0,-1,-1,-1,+0,+1,+1,+1};
//int fy[]={-1,-1,+0,+1,+1,+1,+0,-1};
int fx[]= {0,-1,0,+1};
int fy[]= {-1,0,+1,0};
 
 
 
int main()
{
 
    //freopen("input.txt","r",stdin);
    double n,m,sum=0,cnt=0;
    cin>>n>>m;
   double arr[n];
    for(int i=0;i<n;i++)
    {
      cin>>arr[i];
      sum+=arr[i];
    }
      for(int i=0;i<n;i++)
    {
       if(arr[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:31:15: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   31 |    double arr[n];
      |               ^
a.cc:31:15: error: could not convert 'n' from 'double' to 'long unsigned int'
   31 |    double arr[n];
      |               ^
      |               |
      |               double
a.cc:31:15: error: size of array 'arr' has non-integral type 'double'
Language: C++

using namespace std;
#include <bits/stdc++.h>
#define rep(i, s) for (int i = 0; i < s; ++i)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define all(v) (v.begin(), v.end())
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define VEC(a, n) vector<int>a(n)
#define PQ(a) priority_queue<int>a
#define PQmin(a) priority_queue< int, :vector<int>, greater<int> >a
#define PAIR pair<int, int>
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
#define EPS (1e-7)
#define INF (1e10)
#define PI (acos(-1))
const ll mod = 1000000007;
bool f(string s){
  bool ans=true;
  rep(i,s.size()/2){
    if(s[i]!=s[s.size()/2+i]){
      ans=false;
      break;
    }
  }
  return ans;
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N,M;
  cin>>N>>M;
  int A[N];
  int sum;
  rep(i,N){
    cin>>A[i];
    sum+=A[i];
  }
  sort(A,A+N);
  if(sum/(4*M)%==0){
    if(A[N-M]>=sum/(4*M))
      cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
  else
    if(A[N-M]>=sum/(4*M)+1)
      cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:17: error: expected primary-expression before '=' token
   42 |   if(sum/(4*M)%==0){
      |                 ^
Language: C++

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


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

#include <iostream>
using namespace std;
int main(){
  int n,m;
  cin >> n;
  cin >> m;
  int a[100];
  int all=0;
  for (int i = 0; i<n;i++){
    cin >> a[i];
    all+=a[i];
  }
  sort(a.begin(),a.end());
  int err = 0;
  all /= 4 * m;
  for (int i = 0; i<n;i++)
    if (a[i] < all) err++;
  if (n-err > m ) cout << "Yes";
  else cout << "No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: request for member 'begin' in 'a', which is of non-class type 'int [100]'
   13 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:13:20: error: request for member 'end' in 'a', which is of non-class type 'int [100]'
   13 |   sort(a.begin(),a.end());
      |                    ^~~
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
Language: Java

import java.lang.Math;
import java.util.*;


public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();
        String str2 = scanner.nextLine();
        String[] params = str.split(" ", 0);
        String[] params2 = str2.split(" ", 0);

        int[] intArray = new int[params.length];
        int[] intArray2 = new int[params2.length];

        for (int i = 0; i < params.length; i++) {
            intArray[i] = Integer.parseInt(params[i]);
        }

        int total_vote = 0;
        for (int j = 0; j < params2.length; j++) {
            intArray2[j] = Integer.parseInt(params2[j]);
            total_vote += Integer.parseInt(params2[j]);
        }

        double test = 1 / (4 * intArray[1]);
        int minimum_vote = (int)(total_vote * (double)1 / (4 * intArray[1]));
        int chose_product = 0;

        for (int k = 0; k < params2.length; k++) {
            if(intArray2[k] >= minimum_vote) {
                chose_product++;
            }
        }


        if (chose_product => intArray[1]) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:39: error: illegal start of expression
        if (chose_product => intArray[1]) {
                           ^
1 error
Language: Java


import java.lang.Math;
import java.util.*;


public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);

        String str = scanner.nextLine();
        String str2 = scanner.nextLine();
        String[] params = str.split(" ", 0);
        String[] params2 = str2.split(" ", 0);

        int[] intArray = new int[params.length];
        int[] intArray2 = new int[params2.length];

        for (int i = 0; i < params.length; i++) {
            intArray[i] = Integer.parseInt(params[i]);
        }

        int total_vote = 0;
        for (int j = 0; j < params2.length; j++) {
            intArray2[j] = Integer.parseInt(params2[j]);
            total_vote += Integer.parseInt(params2[j]);
        }

        //System.out.println(total_vote);
        double test = 1 / (4 * intArray[1]);
        int minimum_vote = (int)(total_vote * (double)1 / (4 * intArray[1]));
        int chose_product = 0;

        for (int k = 0; k < params2.length; k++) {
            if(intArray2[k] >= minimum_vote) {
                chose_product++;
            }
        }
        //System.out.println(chose_product);


        if (chose_product >= intArray[1]) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

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

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


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

	int n,m,sum=0;
	cin>>n>>m;

	vector<int> v(n);

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

	int count=0;

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

	if(count>=m)
		cout<<"Yes";
	else
		cout<<"No";

	return 0;
	}

		

Compiler output:
a.cc: In function 'int main()':
a.cc:23:49: error: expected ';' before 'count'
   23 |                 if(v[i]>=ceil((double)sum/(4*m))
      |                                                 ^
      |                                                 ;
   24 |                         count++;
      |                         ~~~~~                    
a.cc:26:9: error: expected primary-expression before '}' token
   26 |         }
      |         ^
a.cc:24:33: error: expected ')' before '}' token
   24 |                         count++;
      |                                 ^
      |                                 )
   25 | 
   26 |         }
      |         ~                        
a.cc:23:19: note: to match this '('
   23 |                 if(v[i]>=ceil((double)sum/(4*m))
      |                   ^
a.cc:26:9: error: expected primary-expression before '}' token
   26 |         }
      |         ^
Language: C++

#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
	int N,M;
	float a[100];

	float i,j, e,tmp;
	int t = 0;

	cin >> N;
	cin >> M;
	for (auto i = 0; i <= N -1; i++) {
		cin >> a[i];
		t = t + a[i];
		}
	
	/* 数値を降順にソート */
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			
			if (a[i] < a[j]) {
				tmp = a[i];
				a[i] = a[j];
				a[j] = tmp;
				

			}	
		}
		
	}
	
	for (i = 0; i < M; i++) {
		e = t / (4 * M);
		if (a[i] < e + 1) {
			cout << "No";
			return 0;
		}
		
	}

	cout << "Yes";


}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:30: error: invalid types 'float [100][float]' for array subscript
   24 |                         if (a[i] < a[j]) {
      |                              ^
a.cc:24:37: error: invalid types 'float [100][float]' for array subscript
   24 |                         if (a[i] < a[j]) {
      |                                     ^
a.cc:25:40: error: invalid types 'float [100][float]' for array subscript
   25 |                                 tmp = a[i];
      |                                        ^
a.cc:26:34: error: invalid types 'float [100][float]' for array subscript
   26 |                                 a[i] = a[j];
      |                                  ^
a.cc:26:41: error: invalid types 'float [100][float]' for array subscript
   26 |                                 a[i] = a[j];
      |                                         ^
a.cc:27:34: error: invalid types 'float [100][float]' for array subscript
   27 |                                 a[j] = tmp;
      |                                  ^
a.cc:37:22: error: invalid types 'float [100][float]' for array subscript
   37 |                 if (a[i] < e + 1) {
      |                      ^
Language: C++

#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
	int N,M;
	float a[100];

	int i,j, e,tmp;
	float t = 0;

	cin >> N;
	cin >> M;
	for (auto i = 0; i <= N -1; i++) {
		cin >> a[i];
		t = t + a[i];
		}
	
	/* 数値を降順にソート */
	for (i = 0; i < N; i++) {
		for (j = i + 1; j < N; j++) {
			
			if (a[i] < a[j]) {
				tmp = a[i];
				a[i] = a[j];
				a[j] = tmp;
				

			}	
		}
		
	}
	
	for (i = 0; i < M; i++) {
		e = t / (4 * M);
		if (a[i] < e + 1) {
			cout << "No";
			return 0;
		}
		
	}

	cout << "Yes";


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

#include<iostream>
using namespace std;
int main()
{
     int M,N, item,sum;
  int A[1000];
  cin>>M>>N>>item;
  for(int i=1;i<=N;i++)
  {
    cin>>A[i];
  
  int sum=sum+A[i];
  }
  if(item<((1/4*M)*sum))
  {
    cout<<"no"<<;
  }
  else {
    cout<<"yes";
  }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected primary-expression before ';' token
   16 |     cout<<"no"<<;
      |                 ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int M,N,item;
  int A[1000];
  cin>>M>>N>>item;
  for(int i=0;i<=N;i++)
  {
    cin>>A[i];
    int sum=sum+A[i];
  }
  if(item<((1/4*M)*sum))
  {
    cout<<"no";
  }
    else{
      cout<<"yes";
    }
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: 'sum' was not declared in this scope
   13 |   if(item<((1/4*M)*sum))
      |                    ^~~
Language: C++

#include<iostrem>
using namespace std;
int main(){
  int M,N,item;
  int A[1000];
  cin>>M>>N>>item;
  for(int i=0;i<=1000;i++)
  {
    cin>>A[i];
    int sum=sum+i;
  }
  if(item<((1/4*m)*sum))
  {
    cout<<"no";
  }
  else{
    cout<<"yes";
  }
  return 0;
}
    
   
    

Compiler output:
a.cc:1:9: fatal error: iostrem: No such file or directory
    1 | #include<iostrem>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;

public class Main{
    public static void main(String[] args) throws IOException{
        InputStreamReader inputStreamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(inputStreamReader);

        String inputLines[] = new String[2];
        inputLines[0] = bufferedReader.readLine();
        inputLines[1] = bufferedReader.readLine();

        int inputs[] = Arrays.stream(inputLines[0].split(" "))
                       .mapToInt(Integer::parseInt)
                       .toArray();
        int votes[]  = Arrays.stream(inputLines[1].split(" "))
                       .mapToInt(Integer::parseInt)
                       .toArray();

        int votesSum = Arrays.stream(votes).sum();
        int selectable = 0;
        for(String vote : votes){
            if(vote > votesSum * (1 / 4 * inputs[1])){
                selectable += 1;
            }
        }

        String result = "No";
        if(inputs[1] <= selectable){
            result = "Yes";
        }

        System.out.println(result);               
    }
}


Compiler output:
Main.java:24: error: incompatible types: int cannot be converted to String
        for(String vote : votes){
                          ^
Main.java:25: error: bad operand types for binary operator '>'
            if(vote > votesSum * (1 / 4 * inputs[1])){
                    ^
  first type:  String
  second type: int
2 errors
Language: C++

#include<iostream>
using namepsce std;
int main()
{ int n,m;
 cin>>n>>m;
  int a[n],sum=0;
  for(int i=0;i<n;i++)
  {   sum+=a[i];
  }
 float  k=sum/(2.0*m);
 int count=0;
  for(int i=0;i<n;i++)
  {   if(a[i]>=k)
   {   count++;
   }
  }
 if(count>=m)
 {cout<<"Yes ";}
 else
   cout<<"No";
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepsce'
    2 | using namepsce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:5:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |  cin>>n>>m;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:18:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |  {cout<<"Yes ";}
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |    cout<<"No";
      |    ^~~~
      |    std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<stdio.h>
#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;
  scanf("%d %d\n",&N,&M);
  int i;
  int sum=0;
  vector <int> A(N,0);
  for(i=0;i<N;i++){
		scanf("%d ",&A[i]);
    	sum+=A[i];
  }
  
  sort(A.begin(), A.end()); 
    reverse(A.begin(), A.end());
  if(A[M-1]>(double)(sum/(double)(4*M)){
    printf("Yes");
  }else{
    printf("No");
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:40: error: expected ';' before '{' token
   17 |   if(A[M-1]>(double)(sum/(double)(4*M)){
      |                                        ^
      |                                        ;
a.cc:19:4: error: expected primary-expression before 'else'
   19 |   }else{
      |    ^~~~
a.cc:19:4: error: expected ')' before 'else'
   19 |   }else{
      |    ^~~~
      |    )
a.cc:17:5: note: to match this '('
   17 |   if(A[M-1]>(double)(sum/(double)(4*M)){
      |     ^
Language: C++

#include<stdio.h>
#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;
  scanf("%d %d\n",&N,&M);
  int i;
  int sum=0;
  vector <int> A(N);
  for(i=0;i<N;i++){
		scanf("%d ",&A[i]);
    	sum+=A[i];
  }
  
  sort(A.begin(), A.end()); 
    reverse(A.begin(), A.end());
  if(A[M-1]>sum/(double)(4*M)){){
    printf("Yes");
  }else{
    printf("No");
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: expected primary-expression before ')' token
   17 |   if(A[M-1]>sum/(double)(4*M)){){
      |                                ^
a.cc:19:4: error: expected '}' before 'else'
   19 |   }else{
      |    ^~~~
a.cc:17:31: note: to match this '{'
   17 |   if(A[M-1]>sum/(double)(4*M)){){
      |                               ^
Language: C++

#include<stdio.h>
#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;
  scanf("%d %d\n",&N,&M);
  int A[N],i;
    int sum=0;
  for(i=0;i<N;i++){
		scanf("%d ",&A[i]);
    	sum+=A[i];
  }
  
  sort(A.begin(), A.end()); 
    reverse(A.begin(), A.end());
  if(A[M-1]>sum/(double)(4*M)){){
    printf("Yes");
  }else{
    printf("No");
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: request for member 'begin' in 'A', which is of non-class type 'int [N]'
   14 |   sort(A.begin(), A.end());
      |          ^~~~~
a.cc:14:21: error: request for member 'end' in 'A', which is of non-class type 'int [N]'
   14 |   sort(A.begin(), A.end());
      |                     ^~~
a.cc:15:15: error: request for member 'begin' in 'A', which is of non-class type 'int [N]'
   15 |     reverse(A.begin(), A.end());
      |               ^~~~~
a.cc:15:26: error: request for member 'end' in 'A', which is of non-class type 'int [N]'
   15 |     reverse(A.begin(), A.end());
      |                          ^~~
a.cc:16:32: error: expected primary-expression before ')' token
   16 |   if(A[M-1]>sum/(double)(4*M)){){
      |                                ^
a.cc:18:4: error: expected '}' before 'else'
   18 |   }else{
      |    ^~~~
a.cc:16:31: note: to match this '{'
   16 |   if(A[M-1]>sum/(double)(4*M)){){
      |                               ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: request for member 'begin' in 'A', which is of non-class type 'int [N]'
   12 |   sort(A.begin(), A.end());
      |          ^~~~~
a.cc:12:21: error: request for member 'end' in 'A', which is of non-class type 'int [N]'
   12 |   sort(A.begin(), A.end());
      |                     ^~~
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |   sort(A.begin(), A.end());
      |   ^~~~
      |   short
a.cc:13:15: error: request for member 'begin' in 'A', which is of non-class type 'int [N]'
   13 |     reverse(A.begin(), A.end());
      |               ^~~~~
a.cc:13:26: error: request for member 'end' in 'A', which is of non-class type 'int [N]'
   13 |     reverse(A.begin(), A.end());
      |                          ^~~
a.cc:13:5: error: 'reverse' was not declared in this scope
   13 |     reverse(A.begin(), A.end());
      |     ^~~~~~~
a.cc:14:32: error: expected primary-expression before ')' token
   14 |   if(A[M-1]>sum/(double)(4*M)){){
      |                                ^
a.cc:16:4: error: expected '}' before 'else'
   16 |   }else{
      |    ^~~~
a.cc:14:31: note: to match this '{'
   14 |   if(A[M-1]>sum/(double)(4*M)){){
      |                               ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:4: error: expected ',' or ';' before 'for'
   12 |    for(i=0;i<N;i++){
      |    ^~~
a.cc:12:19: error: expected ';' before ')' token
   12 |    for(i=0;i<N;i++){
      |                   ^
      |                   ;
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:4: error: expected ',' or ';' before 'for'
   14 |    for(i=0;i<j;i++){
      |    ^~~
a.cc:14:19: error: expected ';' before ')' token
   14 |    for(i=0;i<j;i++){
      |                   ^
      |                   ;