Function to print the number of characters having odd frequencies for each query
void queryResult ( int prefix [ ] , pair < int , int > Q ) { int l = Q . first ; int r = Q . second ; if ( l == 0 ) { int xorval = prefix [ r ] ; cout << __builtin_popcount ( xorval ) << endl ; } else { int xorval = prefix [ r ] ^ prefix [ l - 1 ] ; cout << __builtin_popcount ( xorval ) << endl ; } }