How to solve this string problem?

Правка en1, от Hz_, 2020-12-31 18:55:55

Problem link

Problem statement
INPUT and OUTPUT format
SAMPLE

I don't understand why my code is getting wrong?

My approach to making the string non-decreasing as much as possible.

Can anyone please help me to fix my code for this problem or tell me a good approach to solve this problem?

*Now the submit option for this problem is disabled. It will be better if someone comes up with proof of his/her solution.:)

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Hz_ 2020-12-31 18:55:55 1807 Initial revision (published)