hiho week 104 register

Ended

Participants:220

Verdict:Accepted
Score:100 / 100
Submitted:2016-06-30 17:08:12

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
#define _CRT_SECURE_NO_WARNINGS
//#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<iostream>
#include<cstdio>
#include<vector>
#include<map>
#include<string>
#include<queue>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<stack>
#include<limits.h>
#include<set>
using namespace std;
const int maxn = 100001;
// splay
struct Node{
    Node *ch[2];
    int r;      // 
    int v;      // 
    int s,addv,mx;      // 
    // mxaddv
    bool operator < (const Node& rhs) const{
        return  r < rhs.r;
    }
    int cmp( int x ) const { // isLessThan
        if( x == v ) return -1;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX