摘要: 洛谷位置:P3374 【模板】树状数组 1 龙哥哥OJ位置: 阅读全文
posted @ 2019-07-29 11:00 Au0702 阅读(290) 评论(0) 推荐(0)
摘要: 思路:x,y坐标按升序排列,故可把二维树状转化为一维树状。 #include using namespace std; const int maxn=32005; int n,a[maxn]; int ans[maxn],c[maxn]; struct node { int x;int y; }p[maxn]; int lowbit(int x) { return x&(-x); } ... 阅读全文
posted @ 2019-07-29 10:44 Au0702 阅读(347) 评论(0) 推荐(0)