#C10982. Count Daily Improvement in Marathon Times
Count Daily Improvement in Marathon Times
Count Daily Improvement in Marathon Times
You are given the times taken by participants over a series of days during a marathon. The goal is to determine how many times a participant improved compared to the previous day. Formally, if the time for a participant on day i is denoted as \(t_{i}\) and on the previous day as \(t_{i-1}\), then an improvement is counted when \(t_{i} < t_{i-1}\).
The input begins with an integer \(n\) representing the number of days. Each of the following \(n\) lines starts with an integer representing the number of participants on that day followed by their finish times.
Your task is to calculate the total number of improvements over all consecutive days.
inputFormat
Input is read from standard input (stdin). The first line contains an integer \(n\) (the number of days). Each of the following \(n\) lines starts with an integer \(k\) (the number of participants for that day) followed by \(k\) space-separated integers, each representing a participant's finish time for that day.
outputFormat
Output the total number of improvements over the days to standard output (stdout). An improvement for a participant occurs if their time on the current day is strictly less than their time on the previous day.
## sample3
3 90 80 70
3 85 70 60
3 80 75 65
4