Language: C++

    signed main() {
    	INIT;
     
    	VAR(int, n, m);
    	VEC(int, a, n);
     
    	std::priority_queue<int> pq;
    	REP(i, n) pq.push(a[i]);
     
    	REP(_, m) {
    		int t = pq.top(); pq.pop();
    		pq.push(t / 2);
    	}
    	int ans = 0;
    	while (!pq.empty()) {
    		ans += pq.top(); pq.pop();
    	}
    	OUT(ans)BR;
     
    	return 0;
    }




signed main() {
	INIT;

	VAR(int, n, m);
	VEC(int, a, n);

	std::priority_queue<int> pq;
	REP(i, n) pq.push(a[i]);

	REP(_, m) {
		int t = pq.top(); pq.pop();
		pq.push(t / 2);
	}
	int ans = 0;
	while (!pq.empty()) {
		ans += pq.top(); pq.pop();
	}
	OUT(ans)BR;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'INIT' was not declared in this scope
    2 |         INIT;
      |         ^~~~
a.cc:4:13: error: expected primary-expression before 'int'
    4 |         VAR(int, n, m);
      |             ^~~
a.cc:4:18: error: 'n' was not declared in this scope
    4 |         VAR(int, n, m);
      |                  ^
a.cc:4:21: error: 'm' was not declared in this scope
    4 |         VAR(int, n, m);
      |                     ^
a.cc:4:9: error: 'VAR' was not declared in this scope
    4 |         VAR(int, n, m);
      |         ^~~
a.cc:5:13: error: expected primary-expression before 'int'
    5 |         VEC(int, a, n);
      |             ^~~
a.cc:5:18: error: 'a' was not declared in this scope
    5 |         VEC(int, a, n);
      |                  ^
a.cc:5:9: error: 'VEC' was not declared in this scope
    5 |         VEC(int, a, n);
      |         ^~~
a.cc:7:14: error: 'priority_queue' is not a member of 'std'
    7 |         std::priority_queue<int> pq;
      |              ^~~~~~~~~~~~~~
a.cc:1:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
  +++ |+#include <queue>
    1 |     signed main() {
a.cc:7:29: error: expected primary-expression before 'int'
    7 |         std::priority_queue<int> pq;
      |                             ^~~
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         REP(i, n) pq.push(a[i]);
      |             ^
a.cc:8:9: error: 'REP' was not declared in this scope
    8 |         REP(i, n) pq.push(a[i]);
      |         ^~~
a.cc:10:13: error: '_' was not declared in this scope
   10 |         REP(_, m) {
      |             ^
a.cc:15:17: error: 'pq' was not declared in this scope
   15 |         while (!pq.empty()) {
      |                 ^~
a.cc:18:9: error: 'OUT' was not declared in this scope
   18 |         OUT(ans)BR;
      |         ^~~
a.cc: At global scope:
a.cc:26:8: error: redefinition of 'int main()'
   26 | signed main() {
      |        ^~~~
a.cc:1:12: note: 'int main()' previously defined here
    1 |     signed main() {
      |            ^~~~
a.cc: In function 'int main()':
a.cc:27:9: error: 'INIT' was not declared in this scope
   27 |         INIT;
      |         ^~~~
a.cc:29:13: error: expected primary-expression before 'int'
   29 |         VAR(int, n, m);
      |             ^~~
a.cc:29:18: error: 'n' was not declared in this scope
   29 |         VAR(int, n, m);
      |                  ^
a.cc:29:21: error: 'm' was not declared in this scope
   29 |         VAR(int, n, m);
      |                     ^
a.cc:29:9: error: 'VAR' was not declared in this scope
   29 |         VAR(int, n, m);
      |         ^~~
a.cc:30:13: error: expected primary-expression before 'int'
   30 |         VEC(int, a, n);
      |             ^~~
a.cc:30:18: error: 'a' was not declared in this scope
   30 |         VEC(int, a, n);
      |                  ^
a.cc:30:9: error: 'VEC' was not declared in this scope
   30 |         VEC(int, a, n);
      |         ^~~
a.cc:32:14: error: 'priority_queue' is not a member of 'std'
   32 |         std::priority_queue<int> pq;
      |              ^~~~~~~~~~~~~~
a.cc:32:14: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
a.cc:32:29: error: expected primary-expression before 'int'
   32 |         std::priority_queue<int> pq;
      |                             ^~~
a.cc:33:13: error: 'i' was not declared in this scope
   33 |         REP(i, n) pq.push(a[i]);
      |             ^
a.cc:33:9: error: 'REP' was not declared in this scope
   33 |         REP(i, n) pq.push(a[i]);
      |         ^~~
a.cc:35:13: error: '_' was not declared in this scope
   35 |         REP(_, m) {
      |             ^
a.cc:40:17: error: 'pq' was not declared in this scope
   40 |         while (!pq.empty()) {
      |                 ^~
a.cc:43:9: error: 'OUT' was not declared in this scope
   43 |         OUT(ans)BR;
      |         ^~~