随笔分类 -  PAT

摘要:Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as: That is 阅读全文
posted @ 2017-03-14 14:12 claremz 阅读(231) 评论(0) 推荐(0)
摘要:This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Inp 阅读全文
posted @ 2017-03-14 13:59 claremz 阅读(208) 评论(0) 推荐(0)
摘要:At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door 阅读全文
posted @ 2017-03-14 13:53 claremz 阅读(204) 评论(0) 推荐(0)
摘要:With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing ba 阅读全文
posted @ 2017-03-14 13:45 claremz 阅读(156) 评论(0) 推荐(0)
摘要:Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C. Input Specification: The first line of the input gives the p 阅读全文
posted @ 2017-03-14 13:30 claremz 阅读(339) 评论(0) 推荐(0)
摘要:The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of e 阅读全文
posted @ 2017-03-14 13:22 claremz 阅读(269) 评论(0) 推荐(0)
摘要:Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "ins 阅读全文
posted @ 2017-03-14 13:18 claremz 阅读(1004) 评论(0) 推荐(1)
摘要:This time, you are supposed to find A*B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu 阅读全文
posted @ 2017-03-14 13:06 claremz 阅读(179) 评论(0) 推荐(0)
摘要:This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. Each case occupies 2 lines, a 阅读全文
posted @ 2017-03-10 13:16 claremz 阅读(153) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/18/exam/4/question/630 PTA - 数据结构与算法题目集(中文) - 5-10 现有村落间道路的统计数据表中,列出了有可能建设成标准公路的若干条道路的成本,求使每个村落都有公路连通所需要的最低成本。 输入数据包括 阅读全文
posted @ 2015-11-25 09:43 claremz 阅读(1448) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/15/exam/4/question/717 PTA - 数据结构与算法题目集(中文) - 5-9 有了一张自驾旅游路线图,你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序,帮助前来咨询的游客找一条出发地和 阅读全文
posted @ 2015-11-17 11:37 claremz 阅读(1146) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/16/exam/4/question/673 PTA - Data Structures and Algorithms (English) - 5-11 This time let us consider the situation 阅读全文
posted @ 2015-11-06 20:06 claremz 阅读(416) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/15/exam/4/question/716 PTA - 数据结构与算法题目集(中文) - 5-8 哈利·波特要考试了,他需要你的帮助。这门课学的是用魔咒将一种动物变成另一种动物的本事。例如将猫变成老鼠的魔咒是haha,将老鼠变成鱼的 阅读全文
posted @ 2015-10-13 17:15 claremz 阅读(1635) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/15/exam/4/question/715 PTA - 数据结构与算法题目集(中文)- 5-7 “六度空间”理论又称作“六度分隔(Six Degrees of Separation)”理论。这个理论可以通俗地阐述为:“你和任何一个陌 阅读全文
posted @ 2015-10-11 16:47 claremz 阅读(2804) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/15/exam/4/question/714 给定一个有N个顶点和E条边的无向图,请用DFS和BFS分别列出其所有的连通集。假设顶点从0到N−1编号。进行搜索时,假设我们总是从编号最小的顶点出发,按编号递增的顺序访问邻接点。 输入第1 阅读全文
posted @ 2015-09-30 17:49 claremz 阅读(686) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/16/exam/4/question/672 PTA - Data Structures and Algorithms (English) - 5-10 This time let us consider the situation 阅读全文
posted @ 2015-09-30 17:08 claremz 阅读(217) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/16/exam/4/question/671 PTA - Data Structures and Algorithms (English) - 5-9 In 1953, David A. Huffman published his p 阅读全文
posted @ 2015-09-21 16:08 claremz 阅读(973) 评论(1) 推荐(1)
摘要:题目:http://pta.patest.cn/pta/test/16/exam/4/question/670 PTA - Data Structures and Algorithms (English) - 5-8 We have a network of computers and a list 阅读全文
posted @ 2015-09-15 22:29 claremz 阅读(500) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/16/exam/4/question/668 PTA - Data Structures and Algorithms (English) - 5-6 An AVL tree is a self-balancing binary se 阅读全文
posted @ 2015-09-15 10:05 claremz 阅读(564) 评论(0) 推荐(0)
摘要:题目:http://pta.patest.cn/pta/test/16/exam/4/question/667 PTA - Data Structures and Algorithms (English) - 5-5 An inorder binary tree traversal can be i 阅读全文
posted @ 2015-09-14 09:42 claremz 阅读(1119) 评论(0) 推荐(0)