![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
莫队
ZZZ19880423
including
展开
-
Problem B. Harvest of Apples
http://acm.hdu.edu.cn/showproblem.php?pid=6333题意:求c(n,0)到c(n,m)的和t组数据每次累加一定会超时得到公式s(n,m)=s(n-1,m)-c(n-1,m);用莫队算法处理t组查询#include <cstdio>#include <algorithm>#include <cstri...原创 2018-08-02 18:05:33 · 340 阅读 · 0 评论 -
poj 3264 分块
#include <iostream>#include<stdio.h>#include<string>#include<string.h>#include<math.h>#include<algorithm>#include<map>#include<set>#include<...原创 2019-05-20 21:13:12 · 169 阅读 · 0 评论 -
A - 小Z的袜子(hose)
#include <iostream>#include<stdio.h>#include<string>#include<string.h>#include<math.h>#include<algorithm>#include<map>#include<set>#include<...原创 2019-05-20 21:13:54 · 184 阅读 · 0 评论 -
B - Sona NBUT - 1457
#include <iostream>#include<stdio.h>#include<string>#include<string.h>#include<math.h>#include<algorithm>#include<map>#include<set>#include<...原创 2019-05-21 10:36:24 · 239 阅读 · 0 评论 -
G - XOR and Favorite Number
https://vjudge.net/contest/237703#problem/Ga[1]^a[2]^....^a[l-1]^a[1]^a[2]^....^a[r]=a[l]^a[l+1]^....^a[r];所以可以先处理出一个异或的前缀和.a[l-1]^a[r]=k,满足这个的l和r有多少个。一个细节就是k是可以为0的,以及ai也可以等于k,所以在add和del的操作顺序十...原创 2019-05-29 10:40:28 · 179 阅读 · 0 评论