会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Physicaloser
个人主页:https://zhayujie.com
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2017年9月18日
PAT-1134 Vertex Cover (图的建立 + set容器)
摘要: A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least on...
阅读全文
posted @ 2017-09-18 09:54 zhayujie
阅读(107)
评论(0)
推荐(0)
2017年9月17日
PAT-1133 Splitting A Linked List(链表分解)
摘要: Cutting an integer means to cut a K digits long integer Z into two integers of (K/2) digits long integers ...
阅读全文
posted @ 2017-09-17 21:52 zhayujie
阅读(147)
评论(0)
推荐(0)
PAT-1132 Cut Integer (整数分割)
摘要: Cutting an integer means to cut a K digits long integer Z into two integers of (K/2) digits long integers ...
阅读全文
posted @ 2017-09-17 20:50 zhayujie
阅读(142)
评论(0)
推荐(0)
2017年9月15日
PAT 乙级-1025 链表反转
摘要: 给定一个常数K以及一个单链表L,请编写程序将L中每K个结点反转。例如:给定L为1→2→3→4→5→6,K为3,则输出应该为3→2→1→6→5→4;如果K为4,则输出应该为4→3→2→1→5→6,即最后不到K个元素...
阅读全文
posted @ 2017-09-15 20:39 zhayujie
阅读(111)
评论(0)
推荐(0)
2017年9月12日
PAT-1063 Set Similarity (set集合)
摘要: 1063. Set SimilarityGiven two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of dist...
阅读全文
posted @ 2017-09-12 21:34 zhayujie
阅读(154)
评论(0)
推荐(0)
PAT-1060 Are They Equal (科学计数法)
摘要: 1060. Are They Equal If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since t...
阅读全文
posted @ 2017-09-12 11:19 zhayujie
阅读(170)
评论(0)
推荐(0)
2017年9月9日
汉诺塔 - 经典递归问题
摘要: 汉诺塔问题是一个经典的递归问题,大意是:有A, B, C三根柱子,A柱上有n个盘子,小的在上,大的在下,现在要在B柱的帮助下将A柱上的所有盘子移动到C柱上,而且要求每次只能移动一个,并且任何时候小的盘子只能在大的盘子上面。 利用递归逐步分解问题的思想可以轻松解决这道题。首先考虑只有一个圆盘(n=0)
阅读全文
posted @ 2017-09-09 23:08 zhayujie
阅读(303)
评论(0)
推荐(0)
2017年9月8日
PAT-1059 Prime Factors (素数因子)
摘要: 1059. Prime Factors Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…
阅读全文
posted @ 2017-09-08 22:51 zhayujie
阅读(951)
评论(0)
推荐(0)
PAT-1058 A+B in Hogwarts (进制转换)
摘要: 1058. A+B in HogwartsIf you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid expl...
阅读全文
posted @ 2017-09-08 21:02 zhayujie
阅读(137)
评论(0)
推荐(0)
PAT-1057 Stack (树状数组 + 二分查找)
摘要: 1057. StackStack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basi...
阅读全文
posted @ 2017-09-08 16:17 zhayujie
阅读(314)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告