自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 PAT甲级 A1110

PAT甲级 A1110题目详情1110 Complete Binary Tree (25分)Given a tree, you are supposed to tell if it is a complete binary tree.Input Specification:Each input file contains one test case. For each case, the first line gives a positive integer N (≤20) which is th

2020-07-10 16:49:44 185

原创 PAT甲级 A1109

PAT甲级 A1109题目详情1109 Group Photo (25分)Formation is very important when taking a group photo. Given the rules of forming K rows with N people as the following:The number of people in each row must be N/K (round down to the nearest integer), with all the

2020-07-08 21:50:52 162

原创 PAT甲级 A1108

PAT甲级 A1108题目详情1108 Finding Average (20分)The basic task is simple: given N real numbers, you are supposed to calculate their average. But what makes it complicated is that some of the input numbers might not be legal. A legal input is a real number in [

2020-07-08 20:07:07 179 1

原创 PAT甲级 A1107

PAT甲级 A1107题目详情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 with the same hobbies. A social cluster is a set of people who have some of their hobbies in

2020-07-07 16:24:49 113

原创 PAT甲级 A1106

PAT甲级 A1106题目详情1106 Lowest Price in Supply Chain (25分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone on th

2020-07-06 21:51:07 294

原创 PAT甲级 A1105

PAT甲级 A1105题目详情1105 Spiral Matrix (25分)This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral matrix is filled in from the first element at the upper-left corner, then move in a clockwise s

2020-07-06 20:47:17 279

原创 PAT甲级 A1104

PAT甲级 A1104题目详情1104 Sum of Number Segments (20分)Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence { 0.1, 0.2, 0.3, 0.4 }, we have 10 segments: (0.1) (0.1, 0.2) (0.1, 0.2, 0.3) (0.

2020-07-06 19:55:20 126

原创 PAT甲级 A1103

PAT甲级 A1103题目详情1103 Integer Factorization (30分)The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K−P factorization of N for any positive integ

2020-07-06 16:23:16 469

原创 PAT甲级 A1102

PAT甲级 A1102题目详情1102 Invert a Binary Tree (25分)The following is from Max Howell @twitter:Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fuck off.Now it’s your turn to prove that

2020-07-06 00:48:51 83

原创 PAT甲级 A1101

PAT甲级 A1101题目详情1101 Quick Sort (25分)There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot are moved to its left and those larg

2020-07-05 22:19:29 711

原创 PAT甲级 A1100

PAT甲级 A1100题目详情1100 Mars Numbers (20分)People on Mars count their numbers with base 13:Zero on Earth is called “tret” on Mars.The numbers 1 to 12 on Earth is called “jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec” on Mars, respectively.For

2020-07-05 21:23:18 114

原创 PAT甲级 A1099

PAT甲级 A1099题目详情1099 Build A Binary Search Tree (30分)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node’s key.The right subtr

2020-07-05 18:04:33 828

原创 PAT甲级 A1098

PAT甲级 A1098题目详情1098 Insertion or Heap Sort (25分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds

2020-07-05 17:20:36 1310

原创 PAT甲级 A1089

PAT甲级 A1089题目详情1089 Insert or Merge (25分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, finds the lo

2020-07-04 21:36:21 1845

原创 PA甲级 A1097

PAT甲级 A1097题目详情1097 Deduplication on a Linked List (25分)Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K, only the first node of which the value o

2020-07-04 17:19:16 106

原创 PAT甲级 A1096

PAT甲级 A1096题目详情1096 Consecutive Factors (20分)Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3×5×6×7, where 5, 6, and 7 are the three consecutive numbers. Now given any posi

2020-07-03 17:16:40 2038

原创 PAT甲级 A1094

PAT甲级 A1094题目详情1094 The Largest Generation (25分)A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation with the largest population.Input Specif

2020-07-03 13:51:40 91

原创 PAT甲级 A1093

PAT甲级 A1093解题思路1093 Count PAT’s (25分)The string APPAPT contains two PAT’s as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and the 6th characters.Now given any string,

2020-07-01 00:22:08 92

原创 PAT甲级 A1092

PAT甲级 A1092题目详情1092 To Buy or Not to Buy (20分)Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sell the s

2020-06-30 23:09:35 1274

原创 PAT甲级 A1090

PAT甲级 A1090题目详情1090 Highest Price in Supply Chain (25分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone on t

2020-06-30 20:32:02 96

原创 PAT甲级 A1087

PAT甲级 A1087题目详情1087 All Roads Lead to Rome (30分)Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.Input Specification:Each input f

2020-06-30 16:05:06 156

原创 Anaconda配置tensorflow环境

Anaconda配置tensorflow环境下载Anaconda这步不需要多说 直接用官网根据教程下载配置python环境(1)检测anaconda环境是否安装成功:conda --version(2)检测目前安装了哪些环境变量:conda info --envs(3)配置python:conda create --name tensorflow python=3.5配置anaconda网上一些绑源的方法存在问题 可以用清华镜像(亲测有用)进行下载pip install tensorflo

2020-06-11 12:56:48 320

原创 PAT甲级 A1086

PAT甲级 A1086题目详情1086 Tree Traversals Again (25分)An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the stack oper

2020-06-10 20:15:03 124

原创 PAT甲级 A1085

PAT甲级 A1085解题思路1085 Perfect Sequence (25分)Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the maximum and minimum numbers in the sequence, respectively.Now g

2020-06-10 15:41:21 105

原创 PAT甲级 A1084

PAT甲级 A1084题目详情1084 Broken Keyboard (20分)On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given a string that you are supposed to type, and th

2020-06-10 13:36:40 149

原创 PAT甲级 A1083

PAT甲级 A1083题目详情1083 List Grades (25分)Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given i

2020-06-09 16:04:25 82

原创 PAT甲级 A1082

PAT甲级 A1082题目详情1082 Read Number in Chinese (25分)Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output Fu first if it is negative. For example, -123456789 is read as Fu yi Yi er Qian san Bai si Sh

2020-06-09 15:24:02 137

原创 PAT甲级 A1081

PAT甲级 A1081题目详情1081 Rational Sum (20分)Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum.Input Specification:Each input file contains one test case. Each case starts with a positive integer N (≤100), fo

2020-06-07 23:18:28 91

原创 PAT甲级 A1080

PAT甲级 A1080解题思路1080 Graduate Admission (30分)It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission procedur

2020-06-05 15:14:44 361

原创 PAT甲级 A1079

PAT甲级 A1079题目详情1079 Total Sales of Supply Chain (25分)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone on the

2020-06-04 15:23:18 296

原创 PAT甲级 A1078

PAT甲级 A1078题目详情1078 Hashing (25分)The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is defined to be H(key)=key%TSize where TSize is the

2020-06-03 23:41:20 142

原创 PAT甲级 A1077

PAT甲级 A1077题目详情1077 Kuchiguse (20分)The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker’s personality. Such a preference is called “Kuchiguse” and is

2020-06-03 21:53:23 96

原创 PAT甲级 A1076

PAT甲级 A1076题目详情1076 Forwards on Weibo (30分)Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a user makes

2020-06-03 20:43:21 156

原创 PAT甲级 A1074

PAT甲级 A1073题目详情1075 PAT Judge (25分)The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT.Input Specification:Each input file contains one test case

2020-05-31 17:21:07 87

原创 PAT甲级 A1074

PAT甲级 A1074题目详情1074 Reversing Linked List (25分)Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K=3, then you must output 3→2→1→6→5→4; if K=4, you m

2020-05-31 15:50:17 196

原创 PAT甲级 A1073(1072昨天半夜写完 晚点发)

PAT甲级 A1073题目详情1073 Scientific Notation (20分)Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [±][1-9].[0-9]+E[±][0-9]+ which means that the integer portio

2020-05-31 14:58:57 139 1

原创 PAT甲级 A1071

PAT甲级 A1071题目详情1071 Speech Patterns (25分)People often have a preference among synonyms of the same word. For example, some may prefer “the police”, while others may prefer “the cops”. Analyzing such patterns can help to narrow down a speaker’s identity,

2020-05-29 21:06:25 104

原创 PAT甲级 A1070

PAT甲级 A1070题目详情1070 Mooncake (25分)Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the region’s culture. Now given the inventory

2020-05-29 19:48:33 104

原创 PAT甲级 A1069

PAT甲级 A1069题目详情1069 The Black Hole of Numbers (20分)For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order, a new number can be obtained by taking

2020-05-29 13:05:49 161

原创 PAT甲级 A1068

PAT甲级 A1068题目详情1068 Find More Coins (30分)Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However, there was a

2020-05-28 18:36:21 195

空空如也

空空如也

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

TA关注的人

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