A-1 Maximum Product
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Given integers . For each ,the maximum product for is defined to be . Your job is to calculate the maximum products for all the integers.
输入格式
Each input file contains one test case. The first line gives a positive integer ( ). Then integers follow in the next line, each in the interval .
All the numbers in a line are separated by a space.
输出格式
For each test case, print in a line the maximum products of all the given integers. All the numbers in a line must be separated by 1 space, and there must be no extra space at the beginning or the end of the line.
题目示例数据
4
1 4 -9 6
6 24 81 36