aloobukhara's blog

By aloobukhara, history, 5 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • -18
  • Vote: I do not like it