hey guys here is a cool problem. u are given an array a[] of integers of size N where each integer is in range [1,100000]. We have to find the number of tuples i<j<k such that L<=a[i]+a[j]+a[k]<=H. Here L and H are integers. Need a solution better than O(N^3).
Duplicated
http://www.codeforces.com/blog/entry/5742