#C1185. Longest Increasing Streak
Longest Increasing Streak
Longest Increasing Streak
You are given a sequence of daily step counts terminated by -1. Your task is to determine the length of the longest contiguous increasing streak within the sequence. A streak is defined as a contiguous segment where every subsequent number is strictly greater than its previous number.
Formally, if the sequence (after removing the terminating -1) is \(a_1, a_2, \dots, a_n\), you need to compute \[ \max_{1 \leq i \leq n} L_i, \] where \(L_i\) is the length of a subarray that starts at some index and continues as long as the next element is greater than the previous one.
For example, given the input sequence: 1, 3, 2, 4, 3, 5, 6, -1, the longest increasing streak is 3 (the streak 3, 5, 6).
inputFormat
The input is read from standard input (stdin). It consists of a series of integers separated by spaces. The sequence is terminated by the integer -1, which should not be considered as part of the sequence.
outputFormat
Output a single integer to standard output (stdout) representing the length of the longest contiguous increasing subsequence of the provided numbers.
## sample1000 1002 1001 1003 1005 1004 -1
3