摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5945 题意: 求数x最少经过多少次变换能变为1,(1)如果x%k==0,那么可以x=x/k。(2)x=x-i,(1<=i<=t) 思路: 动规需要从1开始,一直往上计算,直到x为止。 递归公式为:dp 阅读全文
posted @ 2017-09-03 20:19 _yxg123 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2002 2002: [Hnoi2010]Bounce 弹飞绵羊 Description 某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏。 阅读全文
posted @ 2017-09-03 19:05 _yxg123 阅读(98) 评论(0) 推荐(0) 编辑