cf 442 div2 F. Ann and Books(莫队算法)
题意:
\(给出n和k,和a_i,sum_i表示前i个数的和,有q个查询[l,r]\)
每次查询区间\([l,r]内有多少对(i,j)满足l <= i <= j <= r 且 sum[j] - sum[i-1] = k\)
思路:...
http://codeforces.com/contest/1066/problem/C
You have got a shelf and want to put some books on it.
You are given qq queries of three types:
L idid — put a book having ind...