Greg array aa1a2an m operation each operation look li ri di 1lirin to apply operation array mean increase array element number lili1ri value diGreg write k query piece paper each query follow form xi yi 1xiyim that mean apply operation number xixi1yi arrayNow Greg wonder array query execute help Greg