![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT--*A(感谢柳婼!!!)
文章平均质量分 95
Raytheon 1715313189
这个人是条懒狗,什么也没留下...
展开
-
1068 万绿丛中一点红 (20分)(坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑坑)
我太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜了 太菜...原创 2020-03-18 18:29:51 · 327 阅读 · 0 评论 -
1155 Heap Paths (30分)(月亮和星星在一起了/♥)
In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (...原创 2020-01-21 19:11:06 · 128 阅读 · 0 评论 -
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-01-20 17:35:12 · 96 阅读 · 0 评论 -
1078 Hashing (25分)(rero↗rero↘rero→rero↘rero↗rero→rero↗rero↘)
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 beH(key)=key%TSi...原创 2020-01-17 11:54:00 · 193 阅读 · 0 评论 -
1099 Build A Binary Search Tree (30分)(KO NO WA DIO DA!!!)
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 s...原创 2020-01-16 21:37:36 · 195 阅读 · 0 评论 -
1064 Complete Binary Search Tree (30point(s))(xxgm快点好啊!)
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 s...原创 2020-01-16 20:50:52 · 176 阅读 · 0 评论 -
1036 Boys vs Girls (25分)(学习?明天再说明天再说明天再说明天再说)
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.Input Specification:Each input file contains one ...原创 2020-01-13 22:10:38 · 118 阅读 · 0 评论 -
1076 Forwards on Weibo (Life is so fucking hard, bring a brother to tears)
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...原创 2019-11-30 18:50:42 · 2369 阅读 · 0 评论 -
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 t...原创 2019-11-23 20:06:38 · 165 阅读 · 0 评论 -
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 scientists to count the max...原创 2019-11-16 17:39:32 · 192 阅读 · 0 评论 -
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. Asocial clusteris a set of people who have some of the...原创 2019-11-14 21:29:29 · 958 阅读 · 0 评论 -
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 t...原创 2019-11-12 18:22:53 · 100 阅读 · 0 评论 -
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...原创 2019-11-12 16:37:08 · 182 阅读 · 0 评论 -
1004 Counting Leaves (30 分)(w u b l u b d u b d a)
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains one test case. Each case start...原创 2019-11-10 12:37:00 · 102 阅读 · 0 评论 -
1140 Look-and-say Sequence (我特别特别忙)
Look-and-say sequence is a sequence of integers as the following:D, D1, D111, D113, D11231, D112213111, ...whereDis in [0, 9] except 1. The (n+1)st number is a kind of description of the nth...原创 2019-10-13 17:28:29 · 97 阅读 · 0 评论 -
1132 Cut Integer(今天5401开门了吗?)
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 = 334. It is interestin...原创 2019-10-13 16:33:49 · 117 阅读 · 0 评论 -
(今天是两个舍友把我锁宿舍的一天,嘿,嘿嘿。。。。)1011 World Cup Betting (20 分)
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 battles for the World Cup trophy in South Africa. S...原创 2019-05-03 20:37:57 · 262 阅读 · 0 评论 -
1060 Are They Equal (今天降温了,注意保暖。)
If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as0.123×105with simple chopping. Now given the number of signi...原创 2019-09-18 21:33:10 · 82 阅读 · 0 评论 -
1117 Eddington Number(我又开始逃课了)
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 integerEsuch that it is forE...原创 2019-09-19 10:34:54 · 74 阅读 · 0 评论 -
1120 Friend Numbers (STL(迫真))
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 = 5+1 = 6, and 6 is their...原创 2019-09-19 10:49:23 · 83 阅读 · 0 评论 -
1121 Damn Single(Why not be a gay?)
Single dog, single dog, single everyday. See AV, hit the plane, they're doing all day. Hey! Single dog, single dog, why not be a gay? No more wait, no more afraid, make yourself a gay."Dam...原创 2019-09-19 12:25:23 · 1197 阅读 · 0 评论 -
1056 Mice and Rice (我讨厌当班长啊啊啊啊啊啊啊啊啊啊md)
Mice and Riceis the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of each mouse is to eat as much ric...原创 2019-09-19 22:39:04 · 145 阅读 · 0 评论 -
1065 A+B and C (64bit)(李永乐2020线代基础班)
Given three integersA,BandCin [−263,263], you are supposed to tell whetherA+B>C.Input Specification:The first line of the input gives the positive number of test cases,T(≤10). Th...原创 2019-09-20 20:35:04 · 206 阅读 · 0 评论 -
1069 The Black Hole of Numbers(副班长??????)
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 taki...原创 2019-09-20 21:04:48 · 88 阅读 · 0 评论 -
1050 String Subtraction (20 分)(阿中哥哥我可以!)
Given two stringsS1andS2,S=S1−S2is defined to be the remaining string after taking all the characters inS2fromS1. Your task is simply to calculateS1−S2for any given ...原创 2019-09-29 15:44:53 · 100 阅读 · 0 评论 -
1051 Pop Sequence(我不惦记钱,我惦记什么?)
Given a stack which can keepMnumbers at most. PushNnumbers in the order of 1, 2, 3, ...,Nand pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of...原创 2019-09-29 17:19:46 · 106 阅读 · 0 评论 -
1052 Linked List Sorting (25 分)(元旦元旦元旦!!!!!!)
A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integerkeyand aNextpointer to the next structure. Now giv...原创 2019-10-08 21:07:24 · 148 阅读 · 0 评论 -
1152 Google Recruitment(溜了溜了)
In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for recruitment. The content is super-simple, a URL consisting of the first 10-digit ...原创 2019-09-16 17:52:48 · 178 阅读 · 0 评论 -
1071 Speech Patterns(wtnl)
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 speake...原创 2019-09-16 17:29:21 · 178 阅读 · 0 评论 -
(搏一搏)1028 List Sorting (25 分)
优秀的算法https://blog.csdn.net/whutshiliu/article/details/83096237Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file c...原创 2019-05-19 12:38:55 · 187 阅读 · 0 评论 -
(想起上次参观博物馆时问题的答案----“烦”)1027 Colors in Mars (20 分)
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are forRed, the middle 2 di...原创 2019-05-19 11:52:48 · 196 阅读 · 0 评论 -
(她是什么神仙颜值啊啊啊啊啊啊啊啊!!!)1007 Maximum Subsequence Sum (25 分)
Given a sequence ofKintegers {N1,N2, ...,NK}. A continuous subsequence is defined to be {Ni,Ni+1, ...,Nj} where1≤i≤j≤K. The Maximum Subsequence is the continuous subseque...原创 2019-04-30 22:36:21 · 149 阅读 · 0 评论 -
(我今天要剪个短发。。。)1006 Sign In and Sign Out (25 分)
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. Given the records of signing in's and out's, yo...原创 2019-04-30 19:21:00 · 143 阅读 · 0 评论 -
(抱歉,我们有九天春假(滑稽))1005 Spell It Right (20 分)
Given a non-negative integerN, your task is to compute the sum of all the digits ofN, and output every digit of the sum in English.给定一个非负整数N,您的任务是计算N的所有数字的和,并以英语输出和的每一个数字。Input Specification:...原创 2019-04-30 18:47:16 · 102 阅读 · 0 评论 -
(做了整整一天啊啊啊啊啊啊啊啊啊,我也太菜了吧,放弃了放弃了。。。。)1012 The Best Rank (25 分)
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only:C- C Programming Language,M- Mathematics (Calculus or Linear Algrbra), andE- En...原创 2019-05-04 21:42:42 · 314 阅读 · 0 评论 -
(能做出这道题的都是大神啊,我菜不成声。。。)1010 Radix (25 分)
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive int...原创 2019-05-04 16:33:16 · 219 阅读 · 0 评论 -
(祝某个今天脱单的好朋友999999~)1009 Product of Polynomials (25 分)
This time, you are supposed to findA×BwhereAandBare two polynomials.这一次,你应该找到A×B,其中A和B是两个多项式。Input Specification:Each input file contains one test case. Each case occupies 2 lines, and ea...原创 2019-05-03 18:16:19 · 157 阅读 · 0 评论 -
(爱你三千遍~)1008 Elevator (20 分)
The highest building in our city has only one elevator. A request list is made up withNpositive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 se...原创 2019-05-03 15:49:00 · 297 阅读 · 0 评论 -
(一题覆盖所有dijkstra可能的出题组合!?)1003 Emergency (25 分)
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the ...原创 2019-04-28 12:29:07 · 252 阅读 · 0 评论 -
(这才第二个。。。好难。。。)1002 A+B for Polynomials (25 分)
This time, you are supposed to findA+BwhereAandBare two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the inform...原创 2019-04-27 11:38:22 · 164 阅读 · 0 评论