Language: C++

    #define ll long long
    #define pub push_back
    #define pob pop_back
    #define puf push_front
    #define pof pop_front
    #define mp make_pair
    #define fo(i , n) for(ll i = 0 ; i < n ; i++)
    //#include<bits/stdc++.h>
    #include<iomanip>
    #include<cmath>
    #include<cstdio>
    #include<utility>
    #include<iostream>
    #include<vector>
    #include<string>
    #include<algorithm>
    #include<map>
    #include<queue>
    #include<set>
    #include<stack>
    ll pi = acos(-1) ;
    ll z =  998244353 ;
    ll inf = 100000000000000000 ;
    ll p1 = 37 ;
    ll p2 = 53 ;
    ll mod1 =  202976689 ;
    ll mod2 =  203034253 ;
    ll gcd(ll a , ll b){ if(b > a) return gcd(b , a) ; if(b == 0) return a ; return gcd(b , a%b) ;}
    ll power(ll a ,ll b , ll p){if(b == 0) return 1 ; ll c = power(a , b/2 , p) ; if(b%2 == 0) return ((c*c)%p) ; else return ((((c*c)%p)*a)%p) ;}
    ll inverse(ll a ,ll n){return power(a , n-2 , n) ;}
    ll max(ll a , ll b){if(a > b) return a ; return b ;}
    ll min(ll a , ll b){if(a < b) return a ; return b ;}
    ll left(ll i){return ((2*i)) ;}
    ll right(ll i){return ((2*i) + 1) ;}
    void swap(ll&a , ll&b){ll c = a ; a = b ; b = c ; return ;}
    //ios_base::sync_with_stdio(0);
    //cin.tie(0); cout.tie(0);
    using namespace std ;
    #include <ext/pb_ds/assoc_container.hpp> 
    #include <ext/pb_ds/tree_policy.hpp> 
    using namespace __gnu_pbds; 
    #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
    // ordered_set s ; s.order_of_key(val)  no. of elements strictly less than val
    // s.find_by_order(i)  itertor to ith element (0 indexed)
    ll cnt = 1 ;

    void solve()
    {
        ll n , m ;
        cin >> n >> m ;
        ll sum = 0 ;
        vector<ll> arr ;
        fo(i , n)
        {
            ll u ;
            cin >> u ;
            arr.pub(u) ;
            sum += arr[i] ;
        }
        sort(arr , arr + n) ;
        reverse(arr.begin() , arr.end()) ;
        ll lim = sum + (4*m) - 1 ;
        lim /= (4*m) ;
        if(arr[m-1] < lim)
            cout << "No" << endl ;
        else
            cout << "Yes" << endl ;
        return ;

    }

    int main()
    {
        ios_base::sync_with_stdio(0);
        cin.tie(0); cout.tie(0);
        /*#ifndef ONLINE_JUDGE
        freopen("inputf.txt" , "r" , stdin) ;
        freopen("outputf.txt" , "w" , stdout) ;
        freopen("error.txt" , "w" , stderr) ;
        #endif*/
        
        ll t ;
        //cin >> t ;
        t = 1 ;
        while(t--)
        {
            solve() ;
        }
        //cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";*/

        return 0;
    }

Compiler output:
a.cc: In function 'void solve()':
a.cc:60:24: error: no match for 'operator+' (operand types are 'std::vector<long long int>' and 'long long int')
   60 |         sort(arr , arr + n) ;
      |                    ~~~ ^ ~
      |                    |     |
      |                    |     long long int
      |                    std::vector<long long int>
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/iomanip:42,
                 from a.cc:9:
/usr/include/c++/14/bits/stl_iterator.h:627:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)'
  627 |     operator+(typename reverse_iterator<_Iterator>::difference_type __n,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:627:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'long long int'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
 1798 |     operator+(typename move_iterator<_Iterator>::difference_type __n,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1798:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   mismatched types 'const std::move_iterator<_IteratorL>' and 'long long int'
   60 |         sort(arr , arr + n) ;
      |                          ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:3598:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3598 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3598:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   'std::vector<long long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3616:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3616 |     operator+(const _CharT* __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3616:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   mismatched types 'const _CharT*' and 'std::vector<long long int>'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3635:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3635 |     operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3635:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'long long int'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3652:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
 3652 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3652:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   'std::vector<long long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3670:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
 3670 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3670:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   'std::vector<long long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3682:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3682 |     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3682:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   'std::vector<long long int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3689:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
 3689 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3689:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   'std::vector<long long int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3696:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
 3696 |     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3696:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   'std::vector<long long int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3719:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
 3719 |     operator+(const _CharT* __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3719:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   mismatched types 'const _CharT*' and 'std::vector<long long int>'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3726:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
 3726 |     operator+(_CharT __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3726:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'long long int'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3733:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)'
 3733 |     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3733:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   'std::vector<long long int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   60 |         sort(arr , arr + n) ;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3740:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)'
 3740 |     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3740:5: note:   template argument deduction/substitution failed:
a.cc:60:26: note:   'std::vector<long long int>' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   60 |         sort(arr , arr + n) ;
      |                          ^