Language: C++

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

#define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

using namespace std;

#define deb(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) { cout << '\n';}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cout << '[' << *it << " = " << a << "]  ";
    err(++it, args...);
}

#define fcout cout<<fixed<<setprecision(15)
#define repp(i,j,k) for(int i=j; i<k; ++i)
#define rep(i,j) repp(i,0,j)
#define rrep(i,j,k) for(int i=j; i>=k; --i)
#define all(x) (x).begin(), (x).end()
#define sort(x) sort(x.begin(), x.end())
#define lb(x,val) lower_bound(x.begin(), x.end(), val)
#define ub(x,val) upper_bound(x.begin(), x.end(), val)
#define pb(x) emplace_back(x);

typedef long long int lli;
typedef pair<int,int> pii;
typedef pair<lli,lli> pll;
typedef vector<int> vi;
typedef vector<lli> vl;
typedef tuple<lli, lli> tii;
typedef tuple<lli, lli, lli> tiii;

//const lli M=998244353ll;
const lli M=1000000007ll;
const double D=1.0;


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

}

int main(){
	fast_io
	int tc=1;
	//cin>>tc;
	while(tc--){solve();}
	return 0;
}

Compiler output:
a.cc:18:6: error: variable or field 'err' declared void
   18 | void err(istream_iterator<string> it) { cout << '\n';}
      |      ^~~
a.cc:18:10: error: 'istream_iterator' was not declared in this scope
   18 | void err(istream_iterator<string> it) { cout << '\n';}
      |          ^~~~~~~~~~~~~~~~
a.cc:11:1: note: 'std::istream_iterator' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
   10 | #include<iomanip>
  +++ |+#include <iterator>
   11 | #include<sstream>
a.cc:18:33: error: expected primary-expression before '>' token
   18 | void err(istream_iterator<string> it) { cout << '\n';}
      |                                 ^
a.cc:18:35: error: 'it' was not declared in this scope; did you mean 'int'?
   18 | void err(istream_iterator<string> it) { cout << '\n';}
      |                                   ^~
      |                                   int
a.cc:20:6: error: variable or field 'err' declared void
   20 | void err(istream_iterator<string> it, T a, Args... args) {
      |      ^~~
a.cc:20:10: error: 'istream_iterator' was not declared in this scope
   20 | void err(istream_iterator<string> it, T a, Args... args) {
      |          ^~~~~~~~~~~~~~~~
a.cc:20:10: note: 'std::istream_iterator' is defined in header '<iterator>'; this is probably fixable by adding '#include <iterator>'
a.cc:20:33: error: expected primary-expression before '>' token
   20 | void err(istream_iterator<string> it, T a, Args... args) {
      |                                 ^
a.cc:20:35: error: 'it' was not declared in this scope; did you mean 'int'?
   20 | void err(istream_iterator<string> it, T a, Args... args) {
      |                                   ^~
      |                                   int
a.cc:20:41: error: expected primary-expression before 'a'
   20 | void err(istream_iterator<string> it, T a, Args... args) {
      |                                         ^
a.cc:20:48: error: expected primary-expression before '...' token
   20 | void err(istream_iterator<string> it, T a, Args... args) {
      |                                                ^~~
a.cc: In function 'void solve()':
a.cc:26:21: error: expected ',' or ';' before 'for'
   26 | #define repp(i,j,k) for(int i=j; i<k; ++i)
      |                     ^~~
a.cc:27:18: note: in expansion of macro 'repp'
   27 | #define rep(i,j) repp(i,0,j)
      |                  ^~~~
a.cc:52:9: note: in expansion of macro 'rep'
   52 |         rep(i,n){
      |         ^~~
a.cc:52:13: error: 'i' was not declared in this scope
   52 |         rep(i,n){
      |             ^
a.cc:26:34: note: in definition of macro 'repp'
   26 | #define repp(i,j,k) for(int i=j; i<k; ++i)
      |                                  ^
a.cc:52:9: note: in expansion of macro 'rep'
   52 |         rep(i,n){
      |         ^~~