各种DP总结

 

一.数位DP

 

1.含有或不含某个数“xx”:

HDU3555 Bomb
HDU2089 不要62

 

2.满足某些条件,如能整除某个数,或者数位上保持某种特性:

HDU3652 B-number
CodeForces - 55D Beautiful numbers
POJ3252 Round Numbers 
HDU3709 Balanced Number

 

 

二.区间DP:

 

1.由小区间往左右两边扩散:

POJ3186 Treats for the Cows 
ZOJ3469 Food Delivery

 

2.将大区间分割成两段小区间(做法是把区间 [l, r] 的左端点l作为研究对象):

POJ2955 Brackets(括号匹配)
Codeforces Round #106 (Div. 2) D. Coloring Brackets(括号匹配)
LightOJ - 1422 Halloween Costumes(刷墙)
HDU2476 String painter (刷墙)
HDU4283 You Are the One 
POJ1651 Multiplication Puzzle(最优矩阵链乘)
 
 

 

posted on 2017-12-03 20:26  h_z_cong  阅读(184)  评论(0编辑  收藏  举报

导航