CF1227G Not Same
Description
You are given an integer array $ a_1, a_2, \dots, a_n $ , where $ a_i $ represents the number of blocks at the $ i $ -th position. It is guaranteed that $ 1 \le a_i \le n $ .
In one operation you can choose a subset of indices of the given array and remove one block in each of these indices. You can't remove a block from a position without blocks.
All subsets that you choose should be different (unique).
You need to remove all blocks in the array using at most $ n+1 $ operations. It can be proved that the answer always exists.
Input Format
N/A
Output Format
N/A
Explanation/Hint
In the first example, the number of blocks decrease like that:
$ \lbrace 5,5,5,5,5 \rbrace \to \lbrace 4,4,4,4,4 \rbrace \to \lbrace 4,3,3,3,3 \rbrace \to \lbrace 3,3,2,2,2 \rbrace \to \lbrace 2,2,2,1,1 \rbrace \to \lbrace 1,1,1,1,0 \rbrace \to \lbrace 0,0,0,0,0 \rbrace $ . And we can note that each operation differs from others.