Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
It is optimal to make all the increase operations first and all the duplicate operations last.
Iterate over all possible number of increase operations that can be done and find the corresponding number of duplicate operations.