Comments
0
....you can try another way~~

the origin format:
F[i]=max{F[j]}+1  (j<i)

first sort, then use BIT to maintain max{F[j]} (j<i)