Let $W$ be an array of weights. Store all the weights of $W$ in bins such that in each bin a heavier weight always go before a lighter weight (if $w_i\in W$ is stored before $w_j\in W$ then necessarily $w_i > w_j$), and the original order of the weights in $W$ is preserved ($w_i \in W$ cannot be stored before $w_j \in W$ if $i>j$). There is no restriction on the maximum value of the weights or capacity of the bins.
I have come up with the following greedy algorithm: for every weight $w_i$ in $W$, store it in the first bin available that is compatible with the restrictions given. For example, for the entry $[47, 27, 33, 5, 13]$, the algorithm's output would be $[47, 27, 5]$ and $[33, 13]$. How can I prove that this algorithm is optimal?