上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: Description "Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。 Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右 阅读全文
posted @ 2017-02-16 14:47 Robin! 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 思路: 求出每个状态i(已杀死机器人集合)能杀死的机器人数kill[i],即已死机器人的武器加上初始武器又能杀死的机器人的集合; 每个状态i都只能往包含在kill[i]中,且不包含在s中的机器人j扩展,即i -> i|(1 << j); dp[i]代表到达该状态的顺序总数,i等于所有前一个合法状态的 阅读全文
posted @ 2017-02-14 23:24 Robin! 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 思路:这题的难点在于判断是否该数是平衡数,解决方法是枚举力矩o的位置,计算每一位n累加的(n-o)*i的值是否等于0。 Code: 阅读全文
posted @ 2017-02-13 22:41 Robin! 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 思路: 正反各求出每个数作为结尾数字的LIS,然后找出最长的Wavio Sequence,用O(n2)试了一次TLE,所以只能用O(nlogn)的算法。 Code: 阅读全文
posted @ 2017-02-13 21:24 Robin! 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/UVA-1220 思路: 树形DP模板题,求最大人数很简单,难点在于如何判断最大人数的名单是否有不同的情况; 解决方法是用一个数组f[manx][2]记录该节点是否出场的情况,为真时代表有多种情况; 具体讨论: Code: 阅读全文
posted @ 2017-02-06 22:58 Robin! 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/UVA-10003 思路: 石子合并问题的逆过程,做法一模一样; Code: 阅读全文
posted @ 2017-02-06 16:11 Robin! 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Problem Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the 阅读全文
posted @ 2017-02-04 21:46 Robin! 阅读(239) 评论(0) 推荐(0) 编辑
摘要: Problem Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical st 阅读全文
posted @ 2017-02-03 02:03 Robin! 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 题目: The cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, the price of milk and lab 阅读全文
posted @ 2017-02-02 01:55 Robin! 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 题目: Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A..B (1 <= A <= B <= 阅读全文
posted @ 2017-02-01 21:23 Robin! 阅读(152) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页