摘要: #include#includeusing namespace std;const int N=100000+3;int x[N], y[N], Y[N], A[N], nums[N];int C[N];int cmp(int i,int j){ if... 阅读全文
posted @ 2018-08-23 20:05 EM-LGH 阅读(168) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;const int N=250000+6;int C[N0)tmp+=C[t],t-=lowbit(t); return tmp;}void dfs(int u,i... 阅读全文
posted @ 2018-08-23 20:03 EM-LGH 阅读(202) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;const int N=2000000+9;int C[N],flower[N],pre[N],head[N];int A[N],l[N],r[N],ans[N];int... 阅读全文
posted @ 2018-08-23 20:00 EM-LGH 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 比较友好的数据结构题 建议读者好好思考思考……. 可以分析出与前缀和的关系, 之后就愉快的套起树状数组辣#include #include#include#include#includeusing namespace std;const int N=2000... 阅读全文
posted @ 2018-08-23 19:51 EM-LGH 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 非常simple的二维数点问题。 1. 读入(这TM不是屁话) 2. 离散坐标(也是P话) 3. 按照从左到右,从下到上排序 4. 离线处理每一个矩阵,可以提前存好是加还是减,总之空间开4倍 5. 不要忘记开O2哟~#include#include#incl... 阅读全文
posted @ 2018-08-23 19:47 EM-LGH 阅读(146) 评论(0) 推荐(0) 编辑
摘要: #include #include#include#includeusing namespace std;const int maxn = 50000 + 5;const int logn = 35;const... 阅读全文
posted @ 2018-08-23 19:34 EM-LGH 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 注意空间大小,以及建树时的细节 阅读全文
posted @ 2018-08-23 19:26 EM-LGH 阅读(164) 评论(0) 推荐(0) 编辑