Language: C++

#include <algorithm>
#include<iostream>
#include<stdio.h>
#include <algorithm>
#include<iostream>
#include<stdio.h>
#include<vector>
#include<set>
#include<string>
#include<iomanip>
#include<queue>
#include<functional>
#include<cmath>
#define rep(i,n) for(int i=0; i<(int)n; i++)//n回繰り返す
using namespace std;
using ll = long long;
using P = pair<int, int>;
using graph = vector<vector<int>>;
int main() {
	int X, Y, A, B, C, ans = 0; cin >> X >> Y >> A >> B >> C;
	priority_queue<int, less<int>>p, q, r;
	rep(i, A) {
		int a; cin >> a;
		p.push(a);
	}
	rep(i, B) {
		int b;
		cin >> b;
		q.push(b);
	}
	rep(i, C) {
		int c; cin >> c;
		r.push(c);
	}
	rep(i, X) {
		if (p.top >= r.top) {
			ans += p.top(); p.pop();
		}
		else {
			ans += r.top(); r.pop();
		}
	}
	rep(i, Y) {
		if (q.top >= r.top) {
			ans += q.top(); q.pop();
		}
		else {
			ans += r.top(); r.pop();
		}
	}
	cout << ans << endl;
}







    





Compiler output:
a.cc: In function 'int main()':
a.cc:21:37: error: no type named 'value_type' in 'struct std::less<int>'
   21 |         priority_queue<int, less<int>>p, q, r;
      |                                     ^~
a.cc:21:37: error: template argument 3 is invalid
a.cc:24:19: error: request for member 'push' in 'p', which is of non-class type 'int'
   24 |                 p.push(a);
      |                   ^~~~
a.cc:29:19: error: request for member 'push' in 'q', which is of non-class type 'int'
   29 |                 q.push(b);
      |                   ^~~~
a.cc:33:19: error: request for member 'push' in 'r', which is of non-class type 'int'
   33 |                 r.push(c);
      |                   ^~~~
a.cc:36:23: error: request for member 'top' in 'p', which is of non-class type 'int'
   36 |                 if (p.top >= r.top) {
      |                       ^~~
a.cc:36:32: error: request for member 'top' in 'r', which is of non-class type 'int'
   36 |                 if (p.top >= r.top) {
      |                                ^~~
a.cc:37:34: error: request for member 'top' in 'p', which is of non-class type 'int'
   37 |                         ans += p.top(); p.pop();
      |                                  ^~~
a.cc:37:43: error: request for member 'pop' in 'p', which is of non-class type 'int'
   37 |                         ans += p.top(); p.pop();
      |                                           ^~~
a.cc:40:34: error: request for member 'top' in 'r', which is of non-class type 'int'
   40 |                         ans += r.top(); r.pop();
      |                                  ^~~
a.cc:40:43: error: request for member 'pop' in 'r', which is of non-class type 'int'
   40 |                         ans += r.top(); r.pop();
      |                                           ^~~
a.cc:44:23: error: request for member 'top' in 'q', which is of non-class type 'int'
   44 |                 if (q.top >= r.top) {
      |                       ^~~
a.cc:44:32: error: request for member 'top' in 'r', which is of non-class type 'int'
   44 |                 if (q.top >= r.top) {
      |                                ^~~
a.cc:45:34: error: request for member 'top' in 'q', which is of non-class type 'int'
   45 |                         ans += q.top(); q.pop();
      |                                  ^~~
a.cc:45:43: error: request for member 'pop' in 'q', which is of non-class type 'int'
   45 |                         ans += q.top(); q.pop();
      |                                           ^~~
a.cc:48:34: error: request for member 'top' in 'r', which is of non-class type 'int'
   48 |                         ans += r.top(); r.pop();
      |                                  ^~~
a.cc:48:43: error: request for member 'pop' in 'r', which is of non-class type 'int'
   48 |                         ans += r.top(); r.pop();
      |                                           ^~~