题面 luogu cdq分治入门 注意删的是值不是位置! #include <cstdio> #include <algorithm> #include <cmath> #include <cstring> using namespace std; const int N = 1e5 + 5; const int inf = 0x3f3f3f3f; struct Node{ int x, y, z; long long cnt; }node[N]; inli…
/* Dear friend, wanna learn CDQ? As a surprice, this code is totally wrong. You may ask, then why you put it on your blog, are you fucking crazy with the fans, isn't it clear you do not have one. Well, I just found a anime picture in other's blog. I…
hdu 5618 Jam's problem again #include <bits/stdc++.h> #define MAXN 100010 using namespace std; int n,k,T,xx; int ans[MAXN],c[MAXN],f[MAXN]; struct Node{ int x,y,z,id; }a[100010],b[100010]; inline int read(){ char ch; bool f=false; int res=0; while (…