LIS popular title

The meaning of problems

  To give you a length \ (n-\) sequence \ (A \) .
  To ask whether there is a length \ (L \) rises sequence, i.e., the presence \ (\ {x_1, x_2, ..., X_L \} (x_1 \ x_2 lt \ lt ... \ lt X_L) \) , such that \ (x_1 A_ {} \ A_ lt x_2} {\ lt ... \ A_ lt X_L} {\) .
  Output \ (\ {a_x_1, a_x_2, ..., a_x_L \} \) , when the plurality of solutions, the presence of the output \ (\ {a_x_i \} \ ) lexicographically smallest group.

answer

  Set \ (f [i] \) represented by \ (I \) as the starting point of the longest sub-sequence length is increased much. This obviously can push down the sequence \ (A \) , obtained by the simple method of seeking the LIS.
  Then consider

Guess you like

Origin www.cnblogs.com/scx2015noip-as-php/p/11347673.html