自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(160)
  • 收藏
  • 关注

原创 (PAT)1155 Heap Paths (30分)(cj)

声明: 博客内所有英文题目来自https://pintia.cn/ 中 PAT(Advanced Level) Practice, 博客内容只用于学术目的,仅为PAT入门提供一个参考,不用于任何商业行为。 转载请注明出处。 1155Heap Paths(30分)In computer science, aheapis a specialized tree...

2020-05-19 12:22:55 264

原创 (PAT)1154 Vertex Coloring (25分)(cj)

声明: 博客内所有英文题目来自https://pintia.cn/ 中 PAT(Advanced Level) Practice, 博客内容只用于学术目的,仅为PAT入门提供一个参考,不用于任何商业行为。 转载请注明出处。 1154Vertex Coloring(25分)Aproper vertex coloringis a labeling of the g...

2020-05-19 12:18:50 269

原创 (PAT)1153 Decode Registration Card of PAT (25分) (cj)

声明: 博客内所有英文题目来自 https://pintia.cn/ 中 PAT(Advanced Level) Practice, 博客内容只用于学术目的,仅为PAT入门提供一个参考,不用于任何商业行为。 1153Decode Registration Card of PAT(25分)A registration card number of PAT consists of 4 parts:the 1s...

2020-05-19 12:13:31 305

原创 (PAT)1152 Google Recruitment (20分) (cj)

声明: 博客内所有英文题目来自 https://pintia.cn/ 中 PAT(Advanced Level) Practice, 博客内容只用于学术目的,仅为PAT入门提供一个参考,不用于任何商业行为。 1152Google Recruitment(20分)In July 2004, Google posted on a giant billboard alon...

2020-05-19 12:06:30 442

原创 HDFS-3.1.2 在W10系统下配置

环境配置jdk 1.8.212 (一定要1.8, 很重要!!!) hadoop 3.1.2 Windows 10https://github.com/TheLastArcher/HDFS-Configuration先下载这个压缩包 把bin etc 俩文件夹覆盖hadoop-3.1.2 下就可以了;我的hadoop -3.1.2 放在D:/hadoop-3.1.2; (主要和...

2019-06-28 11:32:12 226

原创 mysql 读入本地的数据

第一步mysql> show variables like '%local%';+---------------+-------+| Variable_name | Value |+---------------+-------+| local_infile | OFF |+---------------+-------+1 row in set, 1 warni...

2019-05-23 16:44:30 280

原创 凑平方数 - 蓝桥杯2016

凑平方数把0~9这10个数字,分成多个组,每个组恰好是一个平方数,这是能够办到的。 比如:0, 36, 5948721再比如:10985247361, 25, 63907840, 4, 289, 15376等等...注意,0可以作为独立的数字,但不能作为多位数字的开始。分组时,必须用完所有的数字,不能重复,不能遗漏。如果不计较小组内数据的先后顺序,请问有多少种不同...

2019-03-18 20:58:04 486

原创 1139 First Contact (30 分)(cj)

1139 First Contact (30 分)Unlike in nowadays, the way that boys and girls expressing their feelings of love was quite subtle in the early years. When a boy A had a crush on a girl B, he would usually...

2018-09-14 22:06:13 600

原创 1148 Werewolf - Simple Version (20 分)

 1148 Werewolf - Simple Version (20 分)Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 said: "...

2018-09-14 19:12:49 442

原创 1135 Is It A Red-Black Tree (30 分)(cj)

1135 Is It A Red-Black Tree (30 分)There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 properties:(1) Every node is either red or black...

2018-09-14 18:18:34 384

原创 1150 Travelling Salesman Problem (25 分)(cj)

1150 Travelling Salesman Problem (25 分)The "travelling salesman problem" asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest poss...

2018-09-14 15:26:29 194

原创 1149 Dangerous Goods Packaging (25 分)(cj)

1149 Dangerous Goods Packaging (25 分)When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same container, or we might get ourselves in serious trou...

2018-09-14 14:08:35 445

原创 1151 LCA in a Binary Tree (30 分)(cj)

1151 LCA in a Binary Tree (30 分)The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants.Given any two nodes in a binary tree, you a...

2018-09-14 13:15:51 351

原创 1143 Lowest Common Ancestor (30 分)(cj)

1143 Lowest Common Ancestor (30 分)The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants.A binary search tree (BST) is recursively...

2018-09-14 10:43:46 320

原创 1141 PAT Ranking of Institutions (25 分)(cj)

1141 PAT Ranking of Institutions (25 分)After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the ranklist.In...

2018-09-14 09:40:25 215

原创 1142 Maximal Clique (25 分)(cj)

1142 Maximal Clique (25 分)A clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent. A maximal clique is a clique that cannot be extend...

2018-09-14 09:08:11 201

原创 1145 Hashing - Average Search Time (25 分)(cj)

1145 Hashing - Average Search Time (25 分)The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try to find another sequence of integer key...

2018-09-13 17:15:49 290

原创 1144 The Missing Number (20 分)(cj)

1144 The Missing Number (20 分)Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list.Input Specification:Each input file contains one test case. F...

2018-09-13 16:05:46 181

原创 1137 Final Grading (25 分)(cj)

1137 Final Grading (25 分)For a student taking the online course "Data Structures" on China University MOOC (http://www.icourse163.org/), to be qualified for a certificate, he/she must first obtain n...

2018-09-13 15:52:38 250

原创 1136 A Delayed Palindrome (20 分)(cj)

1136 A Delayed Palindrome (20 分)Consider a positive integer N written in standard notation with k+1 digits a​i​​ as a​k​​⋯a​1​​a​0​​ with 0≤a​i​​<10 for all i and a​k​​>0. Then N is palindromi...

2018-09-13 13:42:07 198

原创 1140 Look-and-say Sequence (20 分)(cj)

1140 Look-and-say Sequence (20 分)Look-and-say sequence is a sequence of integers as the following:D, D1, D111, D113, D11231, D112213111, ...where D is in [0, 9] except 1. The (n+1)st number is...

2018-09-13 13:22:19 184

原创 1138 Postorder Traversal (25 分)(cj)

1138 Postorder Traversal (25 分)Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal sequences, you are supposed to output the first num...

2018-09-13 12:28:19 299

原创 1134 Vertex Cover (25 分)(cj)

1134 Vertex Cover (25 分)A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of the set. Now given a graph with several vertex sets, you...

2018-09-13 10:01:33 208

原创 1133 Splitting A Linked List (25 分)(cj)

1133 Splitting A Linked List (25 分)Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non-negatives, and all the values i...

2018-09-13 09:42:37 355

原创 1132 Cut Integer (20 分)(cj)

1132 Cut Integer (20 分)Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 167334, we have A = 167 and B...

2018-09-13 09:27:15 198

原创 1131 Subway Map (30 分)(cj)

1131 Subway Map (30 分)In the big cities, the subway systems always look so complex to the visitors. To give you some sense, the following figure shows the map of Beijing subway. Now you are supposed...

2018-09-13 09:17:33 454

原创 1130 Infix Expression(25 分)(cj)

1130 Infix Expression(25 分)Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operators.Input Specifica...

2018-09-12 19:38:18 255

原创 1126 Eulerian Path (25 分)(cj)

1126 Eulerian Path (25 分)In graph theory, an Eulerian path is a path in a graph which visits every edge exactly once. Similarly, an Eulerian circuit is an Eulerian path which starts and ends on the ...

2018-09-12 18:04:18 182

原创 1129 Recommendation System (25 分)(cj)

1129 Recommendation System (25 分)Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that rates the user...

2018-09-12 17:26:33 395

原创 1128 N Queens Puzzle(20 分)(cj)

1128 N Queens Puzzle(20 分)The "eight queens puzzle" is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other. Thus, a solution requires that no two...

2018-09-12 13:10:13 148

原创 1127 ZigZagging on a Tree(30 分)(cj)

1127 ZigZagging on a Tree(30 分)Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder traversal se...

2018-09-12 11:09:29 738

原创 1125 Chain the Ropes(25 分)(cj)

1125 Chain the Ropes(25 分)Given some segments of rope, you are supposed to chain them into one rope. Each time you may only fold two segments into loops and chain them into one piece, as shown by th...

2018-09-12 10:08:27 174

原创 1124 Raffle for Weibo Followers(20 分)(cj)

1124 Raffle for Weibo Followers(20 分)John got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his followers on Weibo -- that is, he would select winners from every N fol...

2018-09-12 09:48:05 158

原创 1123 Is It a Complete AVL Tree(30 分)(cj)

1123 Is It a Complete AVL Tree(30 分)An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they d...

2018-09-12 09:32:14 282

原创 1122 Hamiltonian Cycle(25 分)(cj)

1122 Hamiltonian Cycle(25 分)The "Hamilton cycle problem" is to find a simple cycle that contains every vertex in a graph. Such a cycle is called a "Hamiltonian cycle".In this problem, you are supp...

2018-09-12 08:01:08 165

原创 1121 Damn Single(25 分)(cj)

1121 Damn Single(25 分)"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of.Input S...

2018-09-12 07:42:05 184

原创 1119 Pre- and Post-order Traversals(30 分)(cj)

1119 Pre- and Post-order Traversals(30 分)Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder tr...

2018-09-11 18:59:55 333

原创 1120 Friend Numbers(20 分)(cj)

1120 Friend Numbers(20 分)Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For example, 123 and 51 are friend numbers since 1+2+3...

2018-09-11 16:42:11 163

原创 1118 Birds in Forest(25 分)(cj)

1118 Birds in Forest(25 分)Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are supposed to help the ...

2018-09-11 16:37:45 2143

原创 1117 Eddington Number(25 分)(cj)

1117 Eddington Number(25 分)British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number", E -- that is, the maximum int...

2018-09-11 16:27:38 264

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除