Language: C++

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

#define F first
#define S second
typedef double db;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;


int main(){
  ll n,m,sum=0;
  cin>>n>>m;
  vector<ll> a(n);
  rep(i,n)cin>>a[i];
  sort(a.begin(),a.end(),greater<ll>());
  rep(i,m){
  a[0]/=2;
    if(a[0]<=a[1])swap(a[0],a[1]);
    else sort(a.begin(),a.end(),greater<ll>());
  }
  rep(i,n)sum+=a[i];
  cout<<sum<<endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:11:9: error: 'pair' does not name a type
   11 | typedef pair<int,int> pii;
      |         ^~~~
a.cc:12:9: error: 'pair' does not name a type
   12 | typedef pair<ll,ll> pll;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:17:3: error: 'cin' was not declared in this scope
   17 |   cin>>n>>m;
      |   ^~~
a.cc:18:3: error: 'vector' was not declared in this scope
   18 |   vector<ll> a(n);
      |   ^~~~~~
a.cc:18:12: error: expected primary-expression before '>' token
   18 |   vector<ll> a(n);
      |            ^
a.cc:18:15: error: 'a' cannot be used as a function
   18 |   vector<ll> a(n);
      |              ~^~~
a.cc:19:17: error: invalid types 'int[int]' for array subscript
   19 |   rep(i,n)cin>>a[i];
      |                 ^
a.cc:20:10: error: request for member 'begin' in 'a', which is of non-class type 'int'
   20 |   sort(a.begin(),a.end(),greater<ll>());
      |          ^~~~~
a.cc:20:20: error: request for member 'end' in 'a', which is of non-class type 'int'
   20 |   sort(a.begin(),a.end(),greater<ll>());
      |                    ^~~
a.cc:20:26: error: 'greater' was not declared in this scope
   20 |   sort(a.begin(),a.end(),greater<ll>());
      |                          ^~~~~~~
a.cc:20:36: error: expected primary-expression before '>' token
   20 |   sort(a.begin(),a.end(),greater<ll>());
      |                                    ^
a.cc:20:38: error: expected primary-expression before ')' token
   20 |   sort(a.begin(),a.end(),greater<ll>());
      |                                      ^
a.cc:20:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |   sort(a.begin(),a.end(),greater<ll>());
      |   ^~~~
      |   short
a.cc:22:4: error: invalid types 'int[int]' for array subscript
   22 |   a[0]/=2;
      |    ^
a.cc:23:9: error: invalid types 'int[int]' for array subscript
   23 |     if(a[0]<=a[1])swap(a[0],a[1]);
      |         ^
a.cc:23:15: error: invalid types 'int[int]' for array subscript
   23 |     if(a[0]<=a[1])swap(a[0],a[1]);
      |               ^
a.cc:23:25: error: invalid types 'int[int]' for array subscript
   23 |     if(a[0]<=a[1])swap(a[0],a[1]);
      |                         ^
a.cc:23:30: error: invalid types 'int[int]' for array subscript
   23 |     if(a[0]<=a[1])swap(a[0],a[1]);
      |                              ^
a.cc:23:19: error: 'swap' was not declared in this scope
   23 |     if(a[0]<=a[1])swap(a[0],a[1]);
      |                   ^~~~
a.cc:24:17: error: request for member 'begin' in 'a', which is of non-class type 'int'
   24 |     else sort(a.begin(),a.end(),greater<ll>());
      |                 ^~~~~
a.cc:24:27: error: request for member 'end' in 'a', which is of non-class type 'int'
   24 |     else sort(a.begin(),a.end(),greater<ll>());
      |                           ^~~
a.cc:24:43: error: expected primary-expression before '>' token
   24 |     else sort(a.begin(),a.end(),greater<ll>());
      |                                           ^
a.cc:24:45: error: expected primary-expression before ')' token
   24 |     else sort(a.begin(),a.end(),greater<ll>());
      |                                             ^
a.cc:26:17: error: invalid types 'int[int]' for array subscript
   26 |   rep(i,n)sum+=a[i];
      |                 ^
a.cc:27:3: error: 'cout' was not declared in this scope
   27 |   cout<<sum<<endl;
      |   ^~~~
a.cc:27:14: error: 'endl' was not declared in this scope
   27 |   cout<<sum<<endl;
      |              ^~~~