Help in a GCD problem

Правка en1, от DC-HITMAN, 2020-11-08 08:08:03

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

Теги #gcd

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский DC-HITMAN 2020-11-08 08:08:03 382 Initial revision (published)