Multiply & Conquer: A Problem That Sounds Simple—But Is It?

Правка en2, от HotashCoder, 2025-05-11 04:29:46

You are given an array a which contains n elements. You can perform any number of operations. At each operation, you can select two indices i and j (where i != j), remove the elements a[i] and a[j] from the array, and insert their product, a[i] * a[j], into the array. Continue this process until the size of the array becomes 2.

You have to minimize the max(a,b), here a is the first element of the array and b is the second element of the array after completing the operation.

constrains: 0 < n < 100

Time limit: 5 sec

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский HotashCoder 2025-05-11 04:29:46 12
en1 Английский HotashCoder 2025-05-11 04:28:40 626 Initial revision (published)