随笔分类 -  递归

摘要:链接:http://poj.org/problem?id=1694http://acm.hust.edu.cn/vjudge/contest/view.action?cid=27454#problem/EAn Old Stone GameTime Limit:1000MSMemory Limit:10000KTotal Submissions:3132Accepted:1422DescriptionThere is an old stone game, played on an arbitrary general tree T. The goal is to put one stone on 阅读全文
posted @ 2013-07-29 15:38 free斩 阅读(260) 评论(0) 推荐(0)
摘要:题目:http://acm.timus.ru/problem.aspx?space=1&num=1181http://acm.hust.edu.cn/vjudge/contest/view.action?cid=27048#problem/A1181. Cutting a Painted PolygonTime limit: 1.0 secondMemory limit: 64 MBThere is a convex polygon with vertices painted in three colors: Red (R), Green (G) and Blue (B). It is 阅读全文
posted @ 2013-07-25 19:27 free斩 阅读(237) 评论(0) 推荐(0)
摘要:题目链接:http://poj.org/problem?id=15792012年暑假组队后第一场个人训练赛FunctionRunFunTimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:13148Accepted:6836DescriptionWeallloverecursion!Don'twe?Considerathree-parameterrecursivefunctionw(a,b,c):ifa<=0orb<=0orc<=0,thenw(a,b,c)returns:1ifa>20orb>20orc&g 阅读全文
posted @ 2012-08-14 16:25 free斩 阅读(266) 评论(0) 推荐(0)
摘要:递归和打表找规律或者记忆化搜索题目链接:http://poj.org/problem?id=15792012年暑假组队后第一场个人训练赛FunctionRunFunTimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:13148Accepted:6836DescriptionWeallloverecursion!Don'twe?Considerathree-parameterrecursivefunctionw(a,b,c):ifa20orb>20orc>20,thenw(a,b,c)returns:w(20,20,20)if 阅读全文
posted @ 2012-08-14 16:25 free斩 阅读(197) 评论(0) 推荐(0)