#L16759. P16759 Record Breaker

P16759 Record Breaker

Problem Description

题目描述

Isyana is given the number of visitors V_i at a theme park on each of N consecutive days. A day is record breaking when its visitor count is strictly greater than the count on every earlier day, and either it is the last day or its count is strictly greater than the count on the following day. The first day can be record breaking. Count the record-breaking days.

输入格式

The first line contains T, the number of test cases. Each test case consists of N, followed by a line containing N integers V_i.

输出格式

For each test case, print Case #x: y, where x is its 1-based case number and y is the number of record-breaking days.

样例

样例 1

提示

Limits: 1 <= T <= 100; 0 <= V_i <= 200000.

In Test Set 1, 1 <= N <= 1000. In Test Set 2, N may be as large as 200000 for at most 10 test cases; all remaining cases have N <= 1000.

4
8
1 2 0 7 2 0 2 0
6
4 8 15 16 23 42
9
3 1 4 1 5 9 2 6 5
6
9 9 9 9 9 9
Case #1: 2
Case #2: 1
Case #3: 3
Case #4: 0