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

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

we have an array of size n. we have to maximize a variable "sum" which is initialized to 0 . for this we can do the following operation as many time as we can (including 0). operation : consider any subsequence of size m<=n . update sum value by the total sum of subsequence and update value of each element of the subsequence by multiplying it by -1. M is given to us. We have to take subsequence ofsize exactly m Thanks in advance !! array elemets can be in between -1000000000 to 1000000000

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

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