Range Query Data Structure
Codeforces 295A