Store all the queries
vector < vector < int > > query = { { 2 , 1 , 3 } , { 1 , 3 } , { 2 , 0 , 3 } , { 1 , 4 } , { 2 , 3 , 5 } } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; rotatedSumQuery ( arr , n , query , Q ) ; return 0 ; }