随笔分类 -  PAT

摘要:明天就要考PAT,为了应付期末已经好久没有刷题了啊啊啊啊,今天开了一道最短路,状态不是很好 1.没有读清题目要求,或者说没有读完题目,明天一定要注意 2.vis初始化的时候从1初始化到n,应该从0开始,以后初始化就从0到n即可 题目大意:给一张地图,两个结点中既有距离也有时间,有的单行有的双向,要求 阅读全文
posted @ 2019-12-06 20:55 NTS100K 阅读(215) 评论(0) 推荐(0)
摘要:PAT 1030 最短路最小边权 堆优化dijkstra+DFS 1030 Travel Plan (30 分) A traveler's map gives the distances between cities along the highways, together with the cos 阅读全文
posted @ 2019-11-14 16:02 NTS100K 阅读(208) 评论(0) 推荐(0)
摘要:1107 Social Clusters (30 分) When register on a social network, you are always asked to specify your hobbies in order to find some potential friends wi 阅读全文
posted @ 2019-10-31 21:13 NTS100K 阅读(162) 评论(0) 推荐(0)
摘要:最近刷PAT老是碰到这种憨批题目,这种题目在算法面试中也是常客了,主要分为4类 已知前序 中序,求后序 已知前序 中序,求层次 已知后序 中序,求前序 已知前序 中序,求层次 而这四种题目如果要做出来的话, 通通不需要建树,因为建树也是按照一定的递归顺序来的,就算是层次遍历,也可以在递归途中保存一些 阅读全文
posted @ 2019-10-30 17:11 NTS100K 阅读(632) 评论(0) 推荐(0)
摘要:A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the 阅读全文
posted @ 2019-10-29 12:16 NTS100K 阅读(190) 评论(2) 推荐(0)
摘要:A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re 阅读全文
posted @ 2019-10-29 12:15 NTS100K 阅读(185) 评论(0) 推荐(0)
摘要:A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years 阅读全文
posted @ 2019-10-29 12:15 NTS100K 阅读(164) 评论(0) 推荐(0)
摘要:Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules 阅读全文
posted @ 2019-10-29 12:14 NTS100K 阅读(206) 评论(0) 推荐(0)
摘要:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c 阅读全文
posted @ 2019-10-29 12:14 NTS100K 阅读(126) 评论(0) 推荐(0)
摘要:To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C Programming Language, Mathematics 阅读全文
posted @ 2019-10-29 12:13 NTS100K 阅读(214) 评论(0) 推荐(0)
摘要:As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some ro 阅读全文
posted @ 2019-10-29 11:47 NTS100K 阅读(155) 评论(0) 推荐(0)
摘要:Calculate a + b and output the sum in standard format that is, the digits must be separated into groups of three by commas (unless there are less than 阅读全文
posted @ 2019-10-29 11:37 NTS100K 阅读(158) 评论(0) 推荐(0)

浏览器标题切换end