Count Smaller Elements With Opposite Parity
For each index, count later values of the other parity that are strictly smaller, scanning from the right with two sorted shelves.
For each index, count later values of the other parity that are strictly smaller, scanning from the right with two sorted shelves.