By _ICHIGO__KUROSAKI_, history, 5 weeks ago, In English,

I have solved 285C - Building Permutation using a greedy approach i.e sort all the values and then count the number of moves to make first element 1, the next to 2 and so on... But how can we come to the conclusion that this is always optimal and produces the minimum number of moves?

  • Vote: I like it
  • 0
  • Vote: I do not like it