Start 2024-01-20 00:00:00

20240121队列

End 2024-01-28 00:00:00
Contest is over.
Now 2024-05-18 19:04:38

D. 密钥

Description

有一种密钥是这样的:给出一个长度为n的序列A,输出A中所有长度为m的连续子序列的最大值即为密钥。例如n=7,有数组{8,7,1,5,9,3,6},当m=3,则密钥为87 999,其获取密钥过程如图3.5所示。

Input

第一行为两个整数,即n和m(1<n<90 000)。 第二行为n个整数。

Output

输出密钥值。

Examples

Input

7 3
8 7 1 5 9 3 6

Output

87999

Submit

Login

Signup
Time Limit 1 second
Memory Limit 128 MB
Submit