hiho week 28 register

Ended

Participants:703

Verdict:Accepted
Score:100 / 100
Submitted:2015-01-15 18:54:23

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
#include <queue>
std::priority_queue<int>q;
char s[6];
int v;
int main(){
    int t;
    scanf("%d",&t);
    while(t--){
        scanf("%s",s);
        if(s[0] == 'T'){
            printf("%d\n",q.top());
            q.pop();
        }
        else{
            scanf("%d",&v);
            q.push(v);
        }
    }
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX