Function to solve Q queries
def solveQueries ( arr , n , q , m ) : NEW_LINE INDENT global even NEW_LINE global odd NEW_LINE keep_count ( arr , n ) NEW_LINE for i in range ( m ) : NEW_LINE INDENT X = q [ i ] NEW_LINE DEDENT DEDENT