logo AlgoBeat OnlineJudge
登录 注册

#216753. [GKS 2020 #B] Bike Tour

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

题目描述

Li has planned a bike tour through the mountains of Switzerland. His tour consists of checkpoints, numbered from 1 to in the order he will visit them. The -th checkpoint has a height of .

A checkpoint is a peak if:

  • It is not the 1st checkpoint or the -th checkpoint, and
  • The height of the checkpoint is strictly greater than the checkpoint immediately before it and the checkpoint immediately after it.

Please help Li find out the number of peaks.

输入格式

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 -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 peaks in Li's bike tour.

样例

样例输入 1

4
3
10 20 14
4
7 7 7 7
5
10 90 20 90 10
3
10 3 10

样例输出 1

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

数据范围与提示

  • In sample case #1, the 2nd checkpoint is a peak.
  • In sample case #2, there are no peaks.
  • In sample case #3, the 2nd and 4th checkpoint are peaks.
  • In sample case #4, there are no peaks.

Limits

.

.

Test Set 1

.

Test Set 2

.