RYIP在线题库
首 页   >   习题练习   >   提交
Problem1718--最佳子段和

1718: 最佳子段和

[Creator : ]
Time Limit : 2.000 sec  Memory Limit : 256 MB

【 Description 】


【 Input 】

12个整数n,q,代表有q组询问。

2n个整数a[i]

3q个整数代表每组询问的k

【 Output 】

输出q行, 每行1个整数代表1组询问的答案。

【 Sample Input 】

5 5
10 23 1 15 16
5 10 11 12 20

【 Sample Output 】

4
0
1
2
3

【 Source/Category 】