hiho week 246 register

Ended

Participants:141

Verdict:Accepted
Score:100 / 100
Submitted:2019-03-20 11:03:29

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
//
//  main.cpp
//  
//
//  Created by Jiao Liu on 3/18/19.
//  Copyright © 2019 ChangHong. All rights reserved.
//
#include <iostream>
#include <map>
#include <vector>
#include <math.h>
#include <algorithm>
#include <string.h>
using namespace std;
int len,T,n,m;
struct node {
    int l,r,id,block;
    node(int l, int r, int id): l(l), r(r), id(id){
        block = l/len;
    }
    bool operator < (const node &a) const{
        if (block == a.block) {
            return r < a.r;
        }
        else return block < a.block;
    }
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX