logo AlgoBeat OnlineJudge
登录 注册

#216761. [GKS 2020 #D] Record Breaker

内存限制:1024 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Isyana is given the number of visitors at her local theme park on consecutive days. The number of visitors on the i-th day is . A day is record breaking if it satisfies both of the following conditions:

  • The number of visitors on the day is strictly larger than the number of visitors on each of the previous days.
  • Either it is the last day, or the number of visitors on the day is strictly larger than the number of visitors on the following day.

Note that the very first day could be a record breaking day!

Please help Isyana find out the number of record breaking days.

输入格式

The first line of the input gives the number of test cases, . test cases follow. Each test case begins with a line containing the integer . The second line contains integers. The i-th integer is .

输出格式

For each test case, output one line containing Case #x: y, where x is the test case number (starting from 1) and y is the number of record breaking days.

样例

样例输入 1

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

样例输出 1

Case #1: 2
Case #2: 1
Case #3: 3
Case #4: 0

数据范围与提示

In Sample Case #1, the bold and underlined numbers in the following represent the record breaking days: 1 2 0 7 2 0 2 0.

In Sample Case #2, only the last day is a record breaking day.

In Sample Case #3, the first, the third, and the sixth days are record breaking days.

In Sample Case #4, there is no record breaking day.

Limits

.

.

Test Set 1

.

Test Set 2

for at most test cases.

For the remaining cases, .