hiho week 105 register

Ended

Participants:189

Verdict:Time Limit Exceeded
Score:20 / 100
Submitted:2016-07-03 11:57:24

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
25
26
27
28
29
30
31
#include<iostream>
#include<set>
using namespace std;
struct node{
    int id,val;
    node(int a,int b){
        id=a;
        val=b;
    }
    bool operator < (const node &x)const{
        return this->id < x.id;
    }
};
std:: set <node> s;
int main(){
    int n;
    cin>>n;
    char c;
    int a,b,d;
    s.clear();
    set<node>::iterator it; 
    while(n--){
        cin>>c;
        if(c=='I'){
            cin>>a>>b;
            s.insert( node(a,b) );
        }
        else if(c=='Q'){
            cin>>a>>b;
            it=s.lower_bound(node(a,0));
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX