随笔分类 -  动态规划

摘要:题目链接:http://acm.swust.edu.cn/problem/360/Time limit(ms): 1000 Memory limit(kb): 65535Description设一个n个节点的二叉树tree的中序遍历为(l,2,3,…,n),其中数字1,2,3,…,n为... 阅读全文
posted @ 2015-06-29 01:04 繁夜 阅读(370) 评论(0) 推荐(0)
摘要:题目链接:http://acm.swust.edu.cn/problem/402/Time limit(ms): 5000 Memory limit(kb): 65535Description太平王世子事件后,陆小凤成了皇上特聘的御前一品侍卫。 皇宫以午门为起点,直到后宫嫔妃们的寝宫... 阅读全文
posted @ 2015-06-29 00:01 繁夜 阅读(686) 评论(0) 推荐(0)
摘要:题目链接:http://acm.swust.edu.cn/problem/0581/Time limit(ms): 1000 Memory limit(kb): 65535Description把m个含有k种不同颜色的石子放成一条线上。现在要问你怎么才能取走最少的石子,使得没有两个相同... 阅读全文
posted @ 2015-06-28 19:00 繁夜 阅读(339) 评论(0) 推荐(0)
摘要:题目链接:http://acm.swust.edu.cn/problem/1084/Time limit(ms): 1000 Memory limit(kb): 65535Description小时候,Mzx0821暗恋班上的一个妹子Zzx。 一次班上做活动,班上同学被安排坐成m行n列... 阅读全文
posted @ 2015-06-18 16:27 繁夜 阅读(355) 评论(0) 推荐(0)
摘要:题目链接:http://acm.swust.edu.cn/problem/code/745255/Time limit(ms): 1000 Memory limit(kb): 65535Description以下方法称为最小代价的字母树:给定一正整数序列,例如:4,1,2,3,在不改变... 阅读全文
posted @ 2015-06-18 13:08 繁夜 阅读(680) 评论(0) 推荐(0)
摘要:题目链接:http://poj.org/problem?id=2184Cow ExhibitionTime Limit:1000MSMemory Limit:65536KTotal Submissions:9479Accepted:3653Description"Fat and docile, bi... 阅读全文
posted @ 2015-06-14 11:39 繁夜 阅读(277) 评论(0) 推荐(0)
摘要:题目链接:http://acm.swust.edu.cn/problem/649/Time limit(ms): 1000 Memory limit(kb): 65535Consider two teams, Lakers and Celtics, playing a series ofNBA... 阅读全文
posted @ 2015-06-14 10:30 繁夜 阅读(578) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4842过河Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Problem Descriptio... 阅读全文
posted @ 2015-06-12 19:58 繁夜 阅读(861) 评论(0) 推荐(0)
摘要:题目链接:http://acm.swust.edu.cn/problem/585/Time limit(ms): 3000 Memory limit(kb): 65535SWUST国的一支科学考察队到达了举世闻名的古埃及金字塔。关于金字塔的建造一直是一个未解之谜, 有着“西方史学之父”之称... 阅读全文
posted @ 2015-06-09 21:52 繁夜 阅读(590) 评论(0) 推荐(0)
摘要:题目链接:http://acm.swust.edu.cn/problem/893/Time limit(ms): 1000 Memory limit(kb): 65535Josh loves playing with blocks. Currently, he has N blocks, ... 阅读全文
posted @ 2015-06-09 10:35 繁夜 阅读(314) 评论(0) 推荐(0)
摘要:题目链接: http://acm.swust.edu.cn/contest/0226/problem/1139/There is a row of n coins whose values are some positive integers c₁, c₂,...,cn, not necessari... 阅读全文
posted @ 2015-05-30 21:45 繁夜 阅读(935) 评论(0) 推荐(0)
摘要:题目链接: http://acm.swust.edu.cn/problem/1132/Time limit(ms): 1000 Memory limit(kb): 65535Several coins are placed in cells of an n×m board. A rob... 阅读全文
posted @ 2015-05-30 21:23 繁夜 阅读(1218) 评论(0) 推荐(0)
摘要:LIS(Longest Increasing Subsequence)最长上升子序列 或者 最长不下降子序列。很基础的题目,有两种算法,复杂度分别为O(n*logn)和O(n^2) 。**********************************************************... 阅读全文
posted @ 2015-02-20 21:09 繁夜 阅读(589) 评论(0) 推荐(0)