For this Question: You have been given a sequence A of N digits. Each digit in this sequence ranges from 1 to 10^9. You need to perform 2 types of operations on this list:

Add(x): Add element x to the end of the list.
Max(list): Find the maximum element in the current sequence.
For each query of type 2, you need to print the result of that operation.The first line consists of a single integer N denoting the size of the initial sequence. The next line consists of N space-separated integers denoting the elements of the initial sequence. The next line contains a single integer q denoting the number of queries. The next q lines contain the details of the operation. The first integer type indicates the type of query. If typei ==1, it is followed by another integer x and you need to perform an operation of type 1 else operations of type 2

Constraints
1 < = N < = 10^5
1 < = Ai < = 10^9
1 < = q < = 10^4For each operation of the second type, print a single integer on a new line.Sample Input
5
1 2 3 4 5
6
1 1
1 2
1 3
2
1 8
2

Sample Output
5
8, I have written this Solution Code: 
// author-Shivam gupta

#include <bits/stdc++.h>


using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair
#define FOR(i,a) for(int i=0;i<a;i++)

#define FOR1(i,j,a) for(int i=j;i<a;i++)

#define EB emplace_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795

#define MOD 1000000007
const int N = 3e5+5;

#define read(type) readInt<type>()
#define max1 20000001
#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'
const double pi=acos(-1.0);

typedef pair<int, int> PII;

typedef vector<int> VI;

typedef vector<string> VS;

typedef vector<PII> VII;

typedef vector<VI> VVI;

typedef map<int,int> MPII;

typedef set<int> SETI;

typedef multiset<int> MSETI;

typedef long int li;

typedef unsigned long int uli;

typedef long long int ll;

typedef unsigned long long int  ull;
const ll inf = 0x3f3f3f3f3f3f3f3f;
const ll mod = 998244353;

bool isPowerOfTwo (int x)
{
  /* First x in the below expression is
    for the case when x is 0 */
  return x && (!(x&(x-1)));
}
void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
ll power(ll x, ll y, ll p)
{
    ll res = 1;      // Initialize result

    x = x % p;  // Update x if it is more than or
                // equal to p

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

// Returns n^(-1) mod p
ll modInverse(ll n, ll p)
{
    return power(n, p-2, p);
}

int main()
{


priority_queue<ll> q;
int n;
cin>>n;
ll x;
FOR(i,n){
cin>>x;
q.push(x);}
int qa;
cin>>qa;
int i;
while(qa--){
    cin>>i;
    if(i==1){
        cin>>x;
        q.push(x);

    }
    else{out(q.top());}
}

}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?