A Different Task
题目描述
[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=19&page=show_problem&problem=1736
[PDF](https://uva.onlinejudge.org/external/107/p10795.pdf)
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10795/a4901e73e9702293d8e0490c3711e8aee09a7bcd.png)
输入输出格式
输入格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10795/5a1c862283499a40ae19850087af95423ec36845.png)
输出格式
![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10795/b43687333d5c5d70c20b66d35adbd5c2d9c0d768.png)
输入输出样例
输入样例 #1
3
1 1 1
2 2 2
3
1 2 3
3 2 1
4
1 1 1 1
1 1 1 1
0
输出样例 #1
Case 1: 7
Case 2: 3
Case 3: 0