Minimum Cost to Make Arrays Identical
Turn arr into brr as cheaply as possible, where changing an element by x costs x and cutting arr into contiguous pieces and reordering them costs a flat k.
Turn arr into brr as cheaply as possible, where changing an element by x costs x and cutting arr into contiguous pieces and reordering them costs a flat k.