#C1073. Longest Non-Decreasing Streak
Longest Non-Decreasing Streak
Longest Non-Decreasing Streak
You are given an integer \( n \) and a sequence of \( n \) integers \( d_1, d_2, \dots, d_n \) representing the distances traveled on consecutive days. Your task is to determine the length of the longest consecutive subsequence (streak) in which the distances are non-decreasing. In other words, find the maximum length \( L \) such that there exists an index \( i \) for which
\( d_i \le d_{i+1} \le \dots \le d_{i+L-1} \)
This streak represents a period when the distance did not drop from one day to the next.
inputFormat
The first line contains a single integer \( n \) (the number of days). The second line contains \( n \) space-separated integers \( d_1, d_2, \dots, d_n \), where each \( d_i \) represents the distance traveled on the \( i\)-th day.
outputFormat
Output a single integer representing the length of the longest non-decreasing streak.
## sample5
2 2 3 2 5
3
</p>