
PAT
文章平均质量分 66
sakura_is_the_best
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PAT 1049. Counting Ones (30)(数位dp(记忆化搜索))
The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. For example, given N being 12, there are five 1’s in原创 2017-11-26 21:55:04 · 329 阅读 · 0 评论 -
pat 天梯赛 L2-006. 树的遍历
L2-006. 树的遍历 给定一棵二叉树的后序遍历和中序遍历,请你输出其层序遍历的序列。这里假设键值都是互不相等的正整数。 输入格式: 输入第一行给出一个正整数N(<=30),是二叉树中结点的个数。第二行给出其后序遍历序列。第三行给出其中序遍历序列。数字间以空格分隔。 输出格式: 在一行中输出该树的层序遍历的序列。数字间以1个空格分隔,行首尾不得有多余空格。 不解释题意(中文题)...原创 2018-03-25 12:13:32 · 190 阅读 · 0 评论 -
PAT 1020. Delete At Most Two Characters (35)&&2018天梯赛L3-020. 至多删三个字符(dp)
两道题题意相似,只是一个能删两个字符一个能删三个字符,做法也相似,先从简单的开始… PAT 1020. Delete At Most Two Characters (35) Given a string which contains only lower case English letters, how many different strin...原创 2018-05-01 17:31:32 · 895 阅读 · 2 评论