Tobby_And_Friends's blog

By Tobby_And_Friends, history, 8 years ago, In English

Problem Name: KQUERY — K-query

Problem Link: http://www.spoj.com/problems/KQUERY/

My solution: http://ideone.com/4COpOu

verdict: TLE

How do I further optimize my solution?

Any help is really appreciated.