MSBOP 2015 Round3 register

Ended

Participants:978

Verdict:AC | RE
Submitted:2015-05-09 16:28:27

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 <algorithm>
#include <vector>
#include <stack>
#include <set>
#include <queue>
#include <map>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;
struct Query{
    int l,r,w;  
};
struct Node{
    int ls,rs,sum;  
};
Node T[3600000];
Query b[210000];
vector<int> val;
map<int,int> pos;
int cnt,root[210000],a[210000];
void ins(int &i,int l,int r,int x){
    if (x<l || r<x){
        return;
    }
    T[++cnt]=T[i];
    i=cnt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX