Range queries: is the subarray parity-alternating
Call an array special when every pair of neighbouring elements has different parity (one odd, one even). Given an integer array and many queries [from, to], answer for each query whether that subarray is special. Precompute so each query takes constant time.
No answer yet. Write the first one; the best answer gets endorsed.
