5576: B
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:2
解决:2
题目描述
One day Fat Brother get a equation f=(x1+x2)*x3+x4 and four integers y1, y2, y3, y4, he wants to replace each unknown number xi by a known integer yj and make f to be as large as possible. As Fat Brother is taking part in the civil service’s examination, he has no time to deal with it. So your task is to help him calculating this value. Note that the correspondence relation should be one to one.
输入
The first line contains only one integer T, which is the number of test cases.
Each test case starts with four integers’ y1, y2, y3, y4 which describe above.
输出
For each test case, output the case number first, then output the value as large as the number f could be.
样例输入 复制
4
1 1 1 1
1 2 3 4
-2 -1 1 2
0 0 0 0
样例输出 复制
Case 1: 3
Case 2: 21
Case 3: 3
Case 4: 0
提示
T<=100
-10086 <= y1, y2, ycc3, y4 <= 10086