I_Hate_Physics's blog

By I_Hate_Physics, history, 2 years ago, In English

For any array of positive integers a[a[1]..a[k]], its score(a) is calculated as follows: • For each a[i] where 1 ≤i≤k in order, add the current maximum element in the array to a[i]. • score(a[k]) is the sum of the final elements in a. Since the sums may become large, score(a) should be calculated modulo (10^9+7).

Question link(Google Drive Link

Full text and comments »

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