Question
Smallest Energy Recharge Window
A drone flies over charging pads, each giving positive energy. The drone needs at least
Input
The first line contains KaTeX can only parse string typed expression. For each test case, the first line contains KaTeX can only parse string typed expression and KaTeX can only parse string typed expression. The second line contains KaTeX can only parse string typed expression positive integers.
Output
For each test case, print the minimum valid length, or KaTeX can only parse string typed expression.
Example
Example 1:
Input
Example 2:
Input
Input
1
6 7
2 3 1 2 4 3Output2Example 2:
Input
1
3 100
10 20 30Output0