-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMO.cpp
More file actions
53 lines (41 loc) · 866 Bytes
/
MO.cpp
File metadata and controls
53 lines (41 loc) · 866 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define X first
#define Y second
const int N = 1e6 + 5 , SQ = 1e3;
struct query{
int l, r, idx;
bool operator<(const query & com) const{
if(l / SQ != com.l/SQ)
return l / SQ < com.l / SQ;
return r < com.r;
}
};
int lq = 0, rq = -1;
void add(int idx){
// add idx
}
void remove(int idx){
// remove idx
}
void slide(int l,int r){
while(lq < l) remove(lq++);
while(lq > l) add(--lq);
while(rq < r) add(++rq);
while(rq > r) remove(rq--);
}
void solve(){
}
int main()
{
ios_base::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
#endif
int tc = 1;
// cin>>tc;
for(int i=1;i<=tc;++i){
solve();
}
}