I heard often send explanations rp ++
T1
Monotonous stack
Or a bare title
Really tiger
Code
T2
Data interpretation is that this question practice
Invite only 1
In all circles to find 1 of
Get rid of it
If there is only one circle, and then continue from where it began to look for
It is a wide search
Code
T3
Is a list
Keep what is now the state where change is coming
If 'a', is changed from i-1 to the
If 's', it is the precursor to the i-1 variant of
If 't', is changed from k-1 to the
Code is repeated like a cross jump
Code
T4
BFS/DFS
Code
T5
The MST (minimum spanning tree)
And who do not check who set tiger
Code
T6
Obviously the DP
Provided dp [i] [j] denotes the step i, j times the maximum run
With a [i] in order to record the drop
For example the sample may be converted to 1222
It is the first one out, and then two off on another tree, then another tree fell on two, and then two off on another tree. It is ctrl_c + ctrl_v
那么,dp[i][j]=max(dp[i][j-1],max(dp[i-2][j],dp[i-1][j-1])+a[i])
Code
T7
Extremely Obviously, if a three times in front of other b, then the column number of the original prior to a certain b
So with a map record what rank, and then look like a sort
Code