ABA12E  Shooting the balloons!
Dhinakaran is very fond of games. Shooting the balloons is his favourite. In this game, there are ‘n’ balloons which are arranged in a line. Every balloon has a unique number which is the number of points earned if that balloon is shot. A constraint here is that you should shoot contiguous balloons. So, Dhinakaran wanted to find the maximum number of points he could earn. He sought help from a friend who told him that it was the famous maximum contiguous sum problem. So Dhinakaran learnt about it and was happy. But Dhinakaran is not someone who gets satisfied so easily. He wanted to find the kth smallest possible contiguous sum! Now, his friend was not able to solve this. So he came to me. I suggested that he approach you. You are a great coder, aren’t you? Help him out.
There will be atleast 1 balloon and atmost 50000 balloons, and each balloon can have atleast 0 point and atmost 10^{9} points.
Input
The first line of each data set contains the number of balloons and value of k.
1 <= k <= (n * (n + 1)) / 2
The second line contains N space separated integers.
Output
The output for each test case should be a single line containing the kth smallest possible contiguous sum of points that could be achieved.
Example
Input:5 3
1 2 3 4 5
Output:
3
Explanation of sample case:
The first 5 smallest contiguous subsequences are 1, 2, 3, 1 + 2, 4
hide comments
code_ster:
20190214 10:33:09
How many data sets does this provide?


(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
20150114 14:37:45
warning: input is badly formated 

(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
20150114 13:34:35
Yes ballon can have 0 points, It cost me 2 WA.


abhiranjan:
20120527 07:30:04
Correction:


Teddy Budiono Hermawan:
20120523 08:23:05
N is the number of balloons.


Rahul Bobhate:
20120326 21:53:59
What is the range of n ? 
Added by:  Kashyap Krishnakumar 
Date:  20120115 
Time limit:  0.550s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Own problem 