PAT
QuickservedNoodle
这个作者很懒,什么都没留下…
展开
-
PAT 1088 甲级 Rational Arithmetic (20分)
For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient. Input Specification: Each input file contains one test cas...转载 2020-05-07 20:49:26 · 127 阅读 · 0 评论 -
PAT 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, ...转载 2020-05-04 15:32:32 · 171 阅读 · 0 评论 -
PAT 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 the...原创 2020-05-04 12:53:36 · 127 阅读 · 0 评论 -
PAT 1091 甲级 Acute Stroke (30分)
One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI slice, your job is to c...原创 2020-05-01 14:40:27 · 148 阅读 · 0 评论 -
PAT 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 sel...原创 2020-05-01 14:12:30 · 127 阅读 · 0 评论 -
PAT 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 g...原创 2020-05-01 14:01:11 · 120 阅读 · 0 评论 -
PAT 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 S...原创 2020-04-30 21:36:53 · 126 阅读 · 0 评论 -
PAT 1095 甲级 Cars on Campus (30分)
Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the information available, you a...原创 2020-04-30 21:10:34 · 159 阅读 · 0 评论 -
PAT 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 ...原创 2020-04-30 20:11:02 · 151 阅读 · 0 评论 -
PAT 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 or a...原创 2020-04-30 17:42:33 · 196 阅读 · 0 评论 -
PAT 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,...原创 2020-04-30 17:05:18 · 115 阅读 · 0 评论 -
PAT 1099 甲级
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 subt...原创 2020-04-30 14:20:10 · 143 阅读 · 0 评论 -
PAT 1100 甲级
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, oc...原创 2020-04-29 23:02:57 · 130 阅读 · 0 评论