摘要:
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long LL; const int N = 500010; int n, 阅读全文
摘要:
暴力秒了 #include<bits/stdc++.h> #define int long long//开long long是个好习惯 using namespace std; bool baozi(int x) { while(x) { int t = x % 10; if(t == 2 || t 阅读全文
摘要:
tr[i]节点存储的是a[i-lowbit(i)+1]+……+a[i],一共lowbit(i)个数字之和。 query的理解: int query(int k) { int res = 0; for (int i = k; i; i -= lowbit(i)) res += tr[i]; retur 阅读全文
摘要:
以第四象限的形如(x,-x)的点(它的距离最好算)为基准,来推附近的点的距离。 不用怕坐标轴上的点的从属划分问题,例如在A区域和B区域交线上的点,那么它就应该是既满足A区域算法,又满足B区域算法的。 #include <bits/stdc++.h> using namespace std; long 阅读全文