On O1 or T1 thought it was out of the equation, I did not expect dp
T2 painful lesson:
Multidimensional comparison must compare each dimension,
To take first shot dots
Once on the test paper, thought the case of equal treatment min, and then the data is made to shoot shoot probability of this error is very low 1e9
T1 "backpack DP"
Definition of F [i] [j] denotes the i-th bit into consideration, with a program number j,
$$f[i][j]=\sum ^{k<=lim}_{k=0} f[i-1][j-k]+c(n,k)^{(m-i)/n+1}$$
Then a few pre-out log c
[T2] Monotone stack
nature:
I lim leftward so as to be greater than the first height of point i
Then k must be [lim + 1, i] in the minimum
Think of the punched segment tree, multiple log will be on the test T
Therefore, with O (n) monotonically stack, when the forward current i, each time between a minimum i to maintain Lim, POP minimum point i is off can update the minimum value i
T3 [rollback] Mo team