Function to solve the queries received
def solve_queries ( arr , n ) : NEW_LINE INDENT global sum NEW_LINE arrr1 = list ( map ( int , input ( ) . split ( ) ) ) NEW_LINE typee = arrr1 [ 0 ] NEW_LINE DEDENT