you give array consist 500000 integer number 1 500000 Initially element zeroYou process type query array 1 x y increase a_x y 2 x y compute sumlimits_i Rx y a_i Rx y set integer 1 500000 remainder y modulo x can process query