Practice · 5 of 9
Mixed A5
CHALLENGE
Difficulty: advanced+25 XP
**Bài toán.** Given n **positive** integers and a target S, print the minimum length of a contiguous window whose sum is at least S. If no such window exists, print 0. **Constraints:** 1 ≤ n ≤ 200000; 1 ≤ a[i] ≤ 999; 1 ≤ S ≤ 10^9. **Input:** line 1: n and S; line 2: n values. **Output:** one integer.
Press Submit to check your solution.
Back to lesson: Practice: Mixed Sets A/B/C — Topics Hidden