Pro.ID22662 TitleProduct Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22662 AC0 Submit4 Ratio0.00% 时间&空间限制描述There is an array of N integer numbers in the interval from -30000 to 30000. The task is to select K elements of this array with maximal possible product. 输入The input consists of N+1 lines. The first line contains N and K ( 1 ≤ K ≤ N ≤ 100 ) separated by one or several spaces. The others contain values of array elements. 输出Description There is an array of N integer numbers in the interval from -30000 to 30000. The task is to select K elements of this array with maximal possible product. Input The input consists of N+1 lines. The first line contains N and K ( 1 ≤ K ≤ N ≤ 100 ) separated by one or several spaces. The others contain values of array elements. Output Output a single line with values of selected elements separated by one space. These values must be in non-increasing order. Sample Input 4 2 Sample Output 7 2 Source 样例输入4 2 样例输出7 2 作者 |