当前位置:网站首页>Dynamic planning summary
Dynamic planning summary
2022-06-29 10:19:00 【qqq2018】
It's usually used dp Several kinds of problems to be solved :
1. Count :
(1) How many ways to the lower right corner
(2) How many ways can sum be sum
2. Find the maximum and minimum :
(1) The maximum number and from top left to bottom right
(2) The longest ascending subsequence
3. Seeking existence :
(1) Take the stone , Whether the first is sure to win
(2) Can you choose k Number makes sum sum
Two . The problem solving steps :
1. Define the State :( One or two dimensions , There are several variables )
(1) Look at the last choice
(2) How to spell the front with the last time
2. State transition equation
3. Initialize conditions and boundaries ( Tips : Initialization is placed in for In circulation )
4. Consider state compression
One dimensional rolling array compressed into two variables
After two-dimensional compression into one-dimensional, most of them traverse from back to front
边栏推荐
猜你喜欢
随机推荐
Codeforces - 1151b thinking
FreeRTOS (VIII) - time management
520 diamond Championship 2021
弧形 View 和弧形 ViewPager
Application of keil5 integrated development environment for single chip microcomputer
JVM之方法的绑定机制
HDU 6778 car (group enumeration -- > shape pressure DP)
如果我在北京,到哪里开户比较好?另外想问,现在在线开户安全么?
Codeforces Round #652 (Div. 2)
Shanke's C language 2018 exercise (Telecom)
1098 insertion or heap sort (25 points)
PGP在加密技术中的应用
JVM method return address
2019.11.13训练总结
To 3 --- 最后的编程挑战
自定义控件之侧滑关闭 Activity 控件
Function pointer, function pointer array, calculator + transfer table, etc
CodeForces - 1151B 思维
sympy的dsolve函数
nacos注册中心集群









