logo AlgoBeat OnlineJudge
登录 注册

#210184. K-Anonymous Sequence

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

题目描述

输入格式

输出格式

For each test, output one line containing a single integer-the minimal cost

样例

样例输入 1

2
7 3
2 2 3 4 4 5 5
6 2
0 3 3 4 8 9

样例输出 1

3
5