Driver Code
n = 5 NEW_LINE arr = [ 0 for i in range ( n + 1 ) ] NEW_LINE q = 0 ; l = 1 ; r = 3 ; k = 2 NEW_LINE updateQuery ( arr , n , q , l , r , k ) NEW_LINE q , l , r , k = 1 , 3 , 5 , 3 NEW_LINE updateQuery ( arr , n , q , l , r , k ) ; NEW_LINE q , l , r , k = 0 , 2 , 5 , 1 NEW_LINE updateQuery ( arr , n , q , l , r , k ) NEW_LINE