4
C-sucks
2y

When the Problem setter doesn't want to type a lot...

Comments
  • 0
    when I read the question, I was like:

    WHAT THE CUT!!
  • 1
    Understanding the assignment is often the hard part
  • 0
    So the task is about finding the ideal pivot element at each step?
  • 1
    Sounds fun. Calculate lengths of sticks once all cuts are made. Recursively merge adjacent segments that give the shortest segment length when merged. Reverse merge order for result.
  • 1
    @Fast-Nop still trying to identify what's the task...lol
  • 1
    if you have cuts at length 3, 7 and 8, stick length 10:

    if cuts done 7,3,8, costs 10+7+3,
    if cut done 3,7,8 cost is 10+7+3
    Cuts done 3,8,7 cost is 10+7+5
    Cuts done 8,7,3 cost is 10+8+7
    Cuts done 8,3,7 cost is 10+8+4
    Other permutations aren't interesting
Add Comment