给定 l,r,n,m≤2×106l,r,n,m\le 2\times 10^6l,r,n,m≤2×106 ,求
∑p=lr12p(p−mn−m)\sum_{p=l}^r\frac{1}{2^p}\binom{p-m}{n-m}∑p=lr2p1(n−mp−m)
共 q≤106q\le 10^6q≤106 次询问。
据说可以用莫队做,也可以生成函数搞。