logo AlgoBeat OnlineJudge
登录 注册

#216757. [GKS 2020 #C] Countdown

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

题目描述

Avery has an array of positive integers. The i-th integer of the array is .

A contiguous subarray is an -countdown if it is of length and contains the integers , in that order. For example, is a -countdown.

Can you help Avery count the number of -countdowns in her array?

输入格式

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

输出格式

For each test case, output one line containing Case #x: y, where is the test case number (starting from ) and is the number of -countdowns in her array.

样例

样例输入 1

3
12 3
1 2 3 7 9 3 2 1 8 3 2 1
4 2
101 100 99 98
9 6
100 7 6 5 4 3 2 1 100

样例输出 1

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

数据范围与提示

In sample case #1, there are two 3-countdowns as highlighted below.

  • 1 2 3 7 9 3 2 1 8 3 2 1
  • 1 2 3 7 9 3 2 1 8 3 2 1

In sample case #2, there are no 2-countdowns.

In sample case #3, there is one 6-countdown as highlighted below.

  • 100 7 6 5 4 3 2 1 100

Limits

.

.

, for all .

Test Set 1

.

Test Set 2

for at most test cases.

For the remaining cases, .