会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
invoid
首页
新随笔
管理
2016年6月21日
bzoj1019: [SHOI2008]汉诺塔
摘要: dp. 用g[x][i]代表第x根柱子的i个原盘会到哪个柱子,f[x][i]代表所用步数。 则根据g[x][i-1]和g[g[x][i-1]][i-1]就能知道搬运的过程是怎样的。 #include #include #include using namespace std; char p[7][3]; int g[40][3],n; long long f[40][3]; ...
阅读全文
posted @ 2016-06-21 13:29 invoid
阅读(131)
评论(0)
推荐(0)
编辑
公告