Virtual_Contestant's blog

By Virtual_Contestant, history, 5 years ago, In English

Hello everyone, Can anyone just confirm how the graph of cost and the final height (same for all) would look like in this question? What I think is it would be unimodal function (having exactly one minima) but i don't know if it is correct. https://cses.fi/problemset/task/1074 UPD: any reason for downvoting? please tell me so i can edit. i just wanted to know just how graph of total cost for modifying all sticks to some particular same height would look like w.r.t to that height

| Write comment?
»
5 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

assume some changed value for all values in array let it be x, if you draw graph for fixed element in array for changing x it will be concave, now if you add all of this graph you will get concave graph. (Sorry if I am mistaken)