2011年7月31日

摘要: 使用动态规划解题,直接将区间以开始点排序,然后将不重叠的点的最大值+1以记录就可以了。直接在循环中记录了最大点,更简洁。 View Code 1 //#include 2 #include 3 #include 4 #include 5 using ... 阅读全文
posted @ 2011-07-31 21:27 AdaByron 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 第一个使用贪心算法做的ACM题目O(∩_∩)O哈哈~。将兑换比从大到小排序,然后兑换直至完成,输出结果即可 View Code 1 #include 2 #include 3 #include 4 struct Exchange{ 5 int ro... 阅读全文
posted @ 2011-07-31 21:16 AdaByron 阅读(220) 评论(0) 推荐(0) 编辑

2010年10月16日

摘要: 本题解题时考虑每组数据出现情况中不够全面,在判断中使用break;导致在遇到类似 42 -:--:--0:23:32的数据时出现问题。由于遇到-:--:--时break,导致后面的数据无法输入,所以出错。切记注意慎用break,并注意break对后续输入的数据的影响。感谢CSDN的logiciel... 阅读全文
posted @ 2010-10-16 12:11 AdaByron 阅读(274) 评论(0) 推荐(0) 编辑

2010年8月23日

摘要: Problem Description For products that are wrapped in small packings it is necessary that the sheet of paper containing the directions for use is fol... 阅读全文
posted @ 2010-08-23 19:43 AdaByron 阅读(228) 评论(0) 推荐(0) 编辑
摘要: View Code 1 #include 2 #include 3 using namespace std; 4 int main() 5 { 6 int m,n; 7 while (cin>>m>>n) 8 { 9 ... 阅读全文
posted @ 2010-08-23 11:38 AdaByron 阅读(140) 评论(0) 推荐(0) 编辑

导航