
莫队
WN_795
题解有表述不清的,或者有疑问的地方还请大家指出!
展开
-
异或序列(莫队)
题目描述已知一个长度为n的整数数列a1,a2,…,an,给定查询参数l、r,问在al,al+1,…,ar区间内,有多少子序列满足异或和等于k。也就是说,对于所有的x,y(l≤x≤y≤r),满足ax⊕ax+1⊕⋯⊕ay=k的x,y有多少组。 输入输入第一行为3个整数n,m,k。第二行为空格分开的n个整数,即a1,a2,…,an。接下来m行,每行两个整数lj,rj,代表一次查询。 ...原创 2018-08-09 10:11:42 · 298 阅读 · 0 评论 -
Harvest of Apples
Problem DescriptionThere are n apples on a tree, numbered from 1 to n .Count the number of ways to pick at most m apples. InputThe first line of the input contains an integer T (1≤T≤105) deno...原创 2018-08-04 10:42:11 · 429 阅读 · 0 评论