Pinball Game 3D Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 688 Accepted Submission(s): 276 Problem Description RD is a smart boy and excel in pinball game. However, playing common 2D p…
真他娘的搞不懂cdq分治的顺序问题.但是candy?的博客里提到过,多想想吧-- #include <algorithm> #include <iostream> #include <cstdio> using namespace std; typedef pair<int,int> par; int T, n, num[100005], tot; const int mod=1<<30; par ans[100005], c[100005];…
三维偏序 就是让第一维有序 然后归并+树状数组求两维 cdq+cdq不会 告辞 #include <bits/stdc++.h> // #define int long long #define rep(a , b , c) for(int a = b ; a <= c ; ++ a) #define Rep(a , b , c) for(int a = b ; a >= c ; -- a) #define go(u) for(int i = G.head[u] , v = G.t…