摘要: 传送门 解题思路 CDQ分治,和简单题的套路一样,一维排序,一维CDQ,一维树状数组,注意要把三者都相同的元素并到一起。数组不要开小了。。 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<a 阅读全文
posted @ 2018-09-24 20:49 Monster_Qi 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 题面 Description 你有一个N*N的棋盘,每个格子内有一个整数,初始时的时候全部为0,现在需要维护两种操作: 命令 参数限制 内容 1 x y A 1<=x,y<=N,A是正整数 将格子x,y里的数字加上A 2 x1 y1 x2 y2 1<=x1<= x2<=N 1<=y1<= y2<=N 阅读全文
posted @ 2018-09-24 19:37 Monster_Qi 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 传送门 拿个二维偏序练练cdq板子,其实就和归并排序差不多,复杂度不太会,似乎nlogn?。 #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> using namespace std; const int 阅读全文
posted @ 2018-09-24 11:21 Monster_Qi 阅读(397) 评论(0) 推荐(0) 编辑