There is a sequence with n integers, your task is finding there are how many consecutive subsequences have two characters:
1.The length of the subsequence is k.
2.Every number in this subsequence is different.
问题 D: count
时间限制:2000 ms 内存限制:128 MB提交:109 解决:43
[ 提交][ 状态][ 讨论版]
题目描述
输入
The input contains multiple test cases.
The first line of each case contains two integers n and k (1≤k≤n≤200000). Then second line contains n positive integers a[i](1≤a[i]≤1000000000).
输出
For each case ,print the number of consecutive subsequences in the only line.
样例输入
10 3 1 2 3 4 3 2 1 1 2 2
样例输出
4
提示
한국어中文فارسیEnglishไทย
Anything about the Problems, Please Contact Admin:admin
All Copyright Reserved 2010-2024Xidian Programming Contest Online JudgeTEAM
GPL2.02003-2014HUSTOJ ProjectTEAM
Anything about the Problems, Please Contact Admin:admin
All Copyright Reserved 2010-2024Xidian Programming Contest Online JudgeTEAM
GPL2.02003-2014HUSTOJ ProjectTEAM