- 博客(28)
- 资源 (16)
- 收藏
- 关注
原创 PAT 1096. Consecutive Factors
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
2015-03-23 16:19:49
627
原创 PAT 1097 Deduplication on a Linked List
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
2015-03-23 16:17:32
450
原创 PAT 1098. Insertion or Heap Sort
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,
2015-03-23 16:16:09
561
原创 PAT 1099. Build A Binary Search Tree
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
2015-03-23 16:13:20
678
原创 PAT 1092. To Buy or Not to Buy
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
2015-03-19 13:24:24
490
原创 PAT 1093. Count PAT's
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
2015-03-19 13:22:53
473
原创 PAT 1094. The Largest Generation
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
2015-03-19 13:20:53
454
原创 PAT 1095. Cars on Campus
Zhejiang University has 6 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
2015-03-19 13:17:41
675
原创 PAT 1091. Acute Stroke
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
2014-12-15 13:14:34
591
原创 PAT 1090. Highest Price in Supply Chain
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
2014-12-15 13:13:21
559
原创 PAT 1089. Insert or Merge
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,
2014-12-15 13:10:24
506
原创 PAT 1088. Rational Arithmetic
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 c
2014-12-15 13:07:16
605
原创 PAT 1084. Broken Keyboard (20)
1084. Broken Keyboard (20)时间限制 200 ms内存限制 32000 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueOn a broken keyboard, some of the keys are worn out. So wh
2014-09-09 16:41:59
578
原创 PAT 1085. Perfect Sequence (25)
1085. Perfect Sequence (25)时间限制 300 ms内存限制 32000 kB代码长度限制 16000 B判题程序 Standard 作者 CAO, PengGiven a sequence of positive integers and another positiv
2014-09-09 16:38:47
601
原创 PAT 1086. Tree Traversals Again (25)
1086. Tree Traversals Again (25)时间限制 200 ms内存限制 32000 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueAn inorder binary tree traversal can be implemented
2014-09-09 16:38:44
1183
原创 PAT 1087. All Roads Lead to Rome (30)
1087. All Roads Lead to Rome (30)时间限制 200 ms内存限制 32000 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueIndeed there are many different tourist routes from
2014-09-09 16:36:05
821
原创 PAT 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
2014-06-25 21:28:33
676
原创 PAT 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 B
2014-06-25 21:24:57
957
原创 PAT 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 i
2014-06-25 21:22:01
600
原创 题目1542:黑白迷阵
题目描述: 黑白迷阵是一个GrassLand编写的手机游戏,它的规则非常简单,有如下4*5的棋盘,其中一些是格子是黑色,一些格子是白色的,每当点击其中某一个格子,它以及它上下左右五个格子的颜色会发出反转,如下图 游戏胜利的条件很简单,把所有的格子变为黑色即可。GrassLand想知道,给定一个游戏格局,至少需
2014-04-03 20:47:21
961
原创 PAT 1080. Graduate Admission (30)
1080. Graduate Admission (30)时间限制 200 ms内存限制 32000 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueIt is said that in 2013, there were about 100 graduate
2014-03-25 15:01:47
710
原创 PAT 1079. Total Sales of Supply Chain (25)
1079. Total Sales of Supply Chain (25)时间限制 250 ms内存限制 32000 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueA supply chain is a network of retailers(零售商),
2014-03-25 14:59:30
747
原创 PAT 1078. Hashing (25)
1078. Hashing (25)时间限制 100 ms内存限制 32000 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueThe task of this problem is simple: insert a sequence of distinct
2014-03-25 14:57:12
1482
原创 PAT 1077. Kuchiguse (20)
1077. Kuchiguse (20)时间限制 100 ms内存限制 32000 kB代码长度限制 16000 B判题程序 Standard 作者 HOU, QimingThe Japanese language is notorious for its sentence ending par
2014-03-25 14:54:55
842
原创 题目1540:麦霸
题目1540:麦霸 时间限制:1 秒内存限制:128 兆特殊判题:否提交:75解决:19题目描述: GrassLand酷爱K歌,俗称麦霸,每次去KTV他都会为自己点许多歌曲。给定点唱机的操作序列,GrassLand希望知道他所点的每首歌曲将会在什么时间开始播放。点唱机的操作主要是对点唱机已选列表的操作,包括:1.top x,将已选列表中第x首
2014-03-24 09:54:15
588
原创 题目1545:奇怪的连通图
题目1545:奇怪的连通图 时间限制:1 秒内存限制:128 兆特殊判题:否提交:316解决:89题目描述: 已知一个无向带权图,求最小整数k。使仅使用权值小于等于k的边,节点1可以与节点n连通。输入: 输入包含多组测试用例,每组测试用例的开头为一个整数n(1 接下去m行,描述图上边的信息,包括三个整数,a(1 输出: 输出为
2014-03-20 16:23:15
628
原创 题目1541:二叉树
题目1541:二叉树 时间限制:1 秒内存限制:128 兆特殊判题:否提交:275解决:47题目描述: 旋转是二叉树的基本操作,我们可以对任意一个存在父亲节点的子节点进行旋转,包括如下几种形式(设被旋转节点为x,其父亲节点为p):1.左旋旋转前,x是p的右儿子。x的左儿子(若存在)变为p的右儿子,p变为x的左儿子。如下图2.右旋旋
2014-03-20 15:43:09
615
原创 题目1554:区间问题
题目描述: 给定一个数组,判断数组内是否存在一个连续区间,使其和恰好等于给定整数k。输入: 输入包含多组测试用例,每组测试用例由一个整数n(1接下去一行为n个整数,描述这个数组,整数绝对值不大于100。最后一行为一个整数k(大小在int范围内)。输出: 对于每组测试用例,若存在这个连续区间,输出其开始和结束的位置,s,e(s 若存在多个符合条件的输出,则输出
2014-03-19 16:30:46
1242
2
庞果英雄会—— 数组排序
2013-09-29
庞果英雄会—— 子序列的个数
2013-09-29
浙大计算机能力测试练习题PAT(1061-1064)
2013-09-02
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人