Marathon Match 120

Правка en1, от hmehta, 2020-09-17 18:09:01

Marathon Match 120

Topcoder MM 120 -  **ReversalSort** is now live!

Problem Setterdimkadimon
Problem TestersJacoCronje and kphmd

Problem Overview: 
You are given a sequence S containing **N** numbers in the range [0, **K**). Your task is to sort this sequence into monotonically increasing order, in a way that incurs the smallest penalty. You are allowed to select any contiguous sub-sequence of numbers and reverse their order. Formally, if the sub-sequence is (S[i], S[i+1], ..., S[k-1], S[k]), where 0 <= i < k < **N**, then its reversal is (S[k], S[k-1], ..., S[i+1], S[i]). The penalty incurred by this reversal is floor[(k-i+1)^**X**], where **X** is a given penalty parameter. Your task is to minimize the total penalty incurred by all the reversals.

Register Now!

Best of luck! 
- the Topcoder Team

Теги #topcoder, #marathon

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский hmehta 2020-09-17 18:09:30 28
en1 Английский hmehta 2020-09-17 18:09:01 1174 Initial revision (published)