Блог пользователя HotashCoder

Автор HotashCoder, история, 17 месяцев назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится

Автор HotashCoder, история, 18 месяцев назад, По-английски

a+b=x, a|b=y, a&b=z, a^b=k

If x,y,z,k is given, is it possible to find a-b?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится