Given an array A of N (N<=2*10^4) elements and Q(Q<=10^6) queries. Each array element A[i]<=60.
asked 18 May '18, 23:06

You are not logged in. Please login at www.codechef.com to post your questions!
×CodeChef Discussion 
Given an array A of N (N<=2*10^4) elements and Q(Q<=10^6) queries. Each array element A[i]<=60.
asked 18 May '18, 23:06

Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Question tags:
question asked: 18 May '18, 23:06
question was seen: 119 times
last updated: 19 May '18, 08:29
Please post the link of the question for which you ask for help. It makes for us easy to verify our approach, before answering the question.
http://codeforces.com/problemset/gymProblem/100570/A
I tried storing precomputed results for subarrays of size<=sqrt(N) and for subarrays with size>sqrt(N), I used the brute force way but got TLE.
http://codeforces.com/blog/entry/15722
The tutorial for the problem. It is on right panel on codeforces under contest materials
I am looking for some other approach possible to solve this problem