Thie first test case is: ↵
~~~~~↵
4 3↵
1 2 1 3↵
~~~~~↵
In the first move, increment x by 1. <br>↵
↵
So now, the array is: 1 2 1 3 and x = 1 <br>↵
Next move, increment 2nd element by x and increment x by 1, so: 1 3 1 3 and x = 2 <br>↵
Next move, increment 3rd element by x and increment x by 1, so: 1 3 3 3 and x = 3 <br>↵
Next move, increment x by 1, so: 1 3 3 3 and x = 4 <br>↵
Next move, increment x by 1, so: 1 3 3 3 and x = 5 <br>↵
Next move, increment 1st element by x and increment x by 1, so: 6 3 3 3 and x = 6 <br>↵
↵
Total moves = 6. But this array configuration is different from the one given in the testcase explanation given under the problem. Are multiple correct configs possible? Or am I missing something?↵
~~~~~↵
4 3↵
1 2 1 3↵
~~~~~↵
In the first move, increment x by 1. <br>↵
↵
So now, the array is: 1 2 1 3 and x = 1 <br>↵
Next move, increment 2nd element by x and increment x by 1, so: 1 3 1 3 and x = 2 <br>↵
Next move, increment 3rd element by x and increment x by 1, so: 1 3 3 3 and x = 3 <br>↵
Next move, increment x by 1, so: 1 3 3 3 and x = 4 <br>↵
Next move, increment x by 1, so: 1 3 3 3 and x = 5 <br>↵
Next move, increment 1st element by x and increment x by 1, so: 6 3 3 3 and x = 6 <br>↵
↵
Total moves = 6. But this array configuration is different from the one given in the testcase explanation given under the problem. Are multiple correct configs possible? Or am I missing something?↵