摘要: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=27938#problem/E题目大意:Given,n, count the number of solutions to the equationx+2y+2z=n, wherex,y,z,... 阅读全文
posted @ 2013-08-08 20:29 beautifulzzzz 阅读(250) 评论(0) 推荐(0) 编辑
摘要: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=28235#problem/B题目大意: 有两个同时再空间中匀速运动的导弹,告诉一个时间以及各自的初始坐标和该时间时的坐标,求运动过程中的最短距离解题思路: 求出相对初位置、相对速度,则答案就... 阅读全文
posted @ 2013-08-08 20:15 beautifulzzzz 阅读(405) 评论(0) 推荐(0) 编辑
摘要: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=28235#problem/A题目大意:给出三维空间两个三角形三个顶点,判断二者是否有公共点,三角形顶点、边、内部算三角形的一部分。解题思路:见模板//********************... 阅读全文
posted @ 2013-08-08 19:51 beautifulzzzz 阅读(539) 评论(0) 推荐(0) 编辑
摘要: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=28415#problem/F题目大意:有n个士兵排成一列,将军想从中抽出最少人数使队伍中任何士兵都能够看到左边最远处或右边最远处解题思路:①此题是最长上升子序列的升级版。 ②这里先介绍一下最... 阅读全文
posted @ 2013-08-08 17:00 beautifulzzzz 阅读(820) 评论(0) 推荐(0) 编辑
摘要: DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways:q By an integer sequence P = p1 p2...pn ... 阅读全文
posted @ 2013-08-08 16:00 beautifulzzzz 阅读(423) 评论(0) 推荐(0) 编辑
摘要: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=28415#problem/D题目大意:给一个长为n的字符串,问最少插入几个字符成回文串解题思路:总长-最长公共(原来的和其倒过来的串)子序列(LCS)知识详解——LCS:给出两个子序列A,B... 阅读全文
posted @ 2013-08-08 13:40 beautifulzzzz 阅读(395) 评论(0) 推荐(0) 编辑