SRM 833

Original link: https://www.shuizilong.com/house/archives/srm-833/

blank.jpg

Div1 500

DP and status can be discussed at the left and right endpoints.

https://kmjp.hatenablog.jp/entry/2022/07/10/0930

Div1 900 WW

Given a string, what is the minimum cost to arrange a string in the form “WW” repeated twice.

The cost is defined as the weight of each character multiplied by its displacement.

  • https://kmjp.hatenablog.jp/entry/2022/07/10/1000

    . . . The cost flow (optimal matching of bipartite graphs) approach is obvious. . . (Tourist uses KM, kmjp uses fee flow). . .

    . . . But you can also be greedy directly, see the code of the panda leader.

This article is reprinted from: https://www.shuizilong.com/house/archives/srm-833/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment