Subsequence
Time Limit: 1000MS | Memory Limit: 65536K | |
Total Submissions: 9998 | Accepted: 4052 |
尺取法,像尺子一样;一段一段的找;
题意:找最小区间和大于等于给定的数;
Description
A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length of the subsequence of consecutive elements of the sequence, the sum of which is greater than or equal to S.
Input