个人记录12个月前P4688 题解中相同的数有 k 个,求出 ∑_i=1^3(r_i-l_i+1-k) 。 n,m≤ 10^5,a_i≤ 10^9 思路 询问离线联想到莫队。可以把每次ballpoint_pen·3 次浏览