Блог пользователя DC-HITMAN

Автор DC-HITMAN, история, 4 года назад, По-английски

I got stuck in a problem and need a little bit help

So the problem is you are given an array of size n (n is always even) and In each move, you can remove any two elements from the array and each move will contribute gcd(removed_val_1, removed_val_2) * move_number So we have to maximize the score I don't know the constraints on N but arr[i] <= 10^5

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

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

Автор DC-HITMAN, история, 5 лет назад, По-английски

Total number of different special palindrome string that can be created by using K different characters Condition of special palindrome:no prefix of length greater than 1 and less than n of the constructed string is palindrome itself Constraints N,k<1000000

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

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