文理学院程序设计在线练习


hand out candy

Time Limit: 1 Second(s)    Memory Limit: 128 MB

Total Submission(s): 0   Accepted Submission(s): 0
Problem Description

The kindergarten teacher hands out candy to the children. All children stand in a line, the i th children have a[i] candy at first.
The teacher will hand out K pieces of candy at a time and he will choose K consecutive kids to get one candy per kid. The teacher wants every child to have even number of candy at the end. And he want to know which k will make number of times of hand out candy be minimum , and output the minimum number of times M.

Input

The first line is an integer, T, representing the T cases.
Each case's first line is N, representing the number of children.
The second row of each case contains N numbers A1, A2, A3,... AK, representing the Number of sweets of ith kid at first.
Limit:
1 <= T <= 10
1 <= N <= 5000
1 <= Ai <= 10^9

Output

Output one line for each case: 'Case #x: y z'
Representing case x's answer is K = y, M = z。

Sample Input
1
7
11 101 10 1 100 111 1111
Sample Output
Case #1: 3 3
Source

2017绍兴市技能竞赛