C. Increase and Copy SOLUTION CODEFORCES

Increase and Copy SOLUTION Initially, you have the array a consisting of one element 1 (a=[1]).   In one move, you can do one of the following things:   Increase some element of a by 1 (choose some i from 1 to the current length of a and increase ai by one); Append the copy … Read more