#CCBCHBAHAI0000016. Độ dài đoạn số dương liên tiếp dài nhất (Longest Positive Contiguous Run)
Độ dài đoạn số dương liên tiếp dài nhất (Longest Positive Contiguous Run)
Longest Positive Contiguous Run
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem
Given , find the maximum length of a contiguous segment consisting only of positive values. If no value is positive, print .
Input
Line 1 contains . Line 2 contains .
Output
Print the required integer answer.
Subtasks
Subtask 1 (20 points): ; .
Subtask 2 (30 points): ; .
Subtask 3 (50 points): ; .
Example
Input
8
-1 2 3 4 0 5 6 -2
Output
3
Explanation
The values follow directly from the definitions and illustrate the valid index range of the array scan.