https://blog.csdn.net/u011077606/article/details/43487421
The blog of the big guy who has been quoted countlessly.
Konjac will take two days to read, huh?
Principle:
1. Use min (row, column) as the path of dfs.
2. Assuming that the column is relatively small, the number of species placed in the next row is determined by the effect of the previous row on the next row.
3. dp[i][state] :The number of species in dp[i][state] is
4, dp[line+1][0] is the final result
State pressure DP-from giving up to giving up completely
Guess you like
Origin blog.csdn.net/qq_42882717/article/details/100129227
Ranking