PAT甲级
ykycode
安徽大学计算机学硕。
两次获得大学生数学竞赛省一等奖,且排名前列。
蓝桥杯C++组省一、国三。
毕业曾被国家电网录用,热爱代码的心让我选择了一家上市公司的C++开发岗。
后来又转行Java开发。
展开
-
PAT (Advanced Level) Practise 1001. A+B Format (20)
1001. A+B Format (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueCalculate a + b and output the sum in standard原创 2017-11-17 22:12:59 · 106 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1020. Tree Traversals (25)
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the cor原创 2018-01-13 10:28:54 · 115 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1021. Deepest Root (25)
A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root原创 2018-01-13 10:40:00 · 130 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1022. Digital Library (30)
A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a原创 2018-01-13 23:48:26 · 105 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1023. Have Fun with Numbers (20)
Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number con原创 2018-01-15 09:08:19 · 146 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1024. Palindromic Number (25)
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers原创 2018-01-15 09:10:14 · 131 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1025. PAT Ranking (25)
Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists w原创 2018-01-15 09:12:09 · 144 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1026. Table Tennis (30)
A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the ava原创 2018-01-15 09:14:15 · 155 阅读 · 0 评论 -
PAT (Advanced Level) Practise 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 for Red, the middle 2 dig原创 2018-01-15 09:15:44 · 151 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1028. List Sorting (25)
Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each case, the first line contains two integers N原创 2018-01-15 09:17:39 · 153 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1014. Waiting in Line (30)
1014. Waiting in Line (30)Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the custome原创 2017-12-30 10:13:36 · 129 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1015. Reversible Primes (20)
1015. Reversible Primes (20)A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime b原创 2017-12-30 10:19:28 · 170 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1029. Median (25)
Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The原创 2018-01-18 10:12:26 · 148 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1030. Travel Plan (30)
A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to decide the shortest path b原创 2018-01-18 10:21:23 · 159 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1019. General Palindromic Number (20)
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers原创 2018-01-13 10:25:35 · 376 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1017. Queueing at Bank (25)
1017. Queueing at Bank (25)Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have t原创 2018-01-13 10:20:23 · 138 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1002. A+B for Polynomials (25)
1002. A+B for Polynomials (25)This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, and eac原创 2017-12-10 11:28:38 · 225 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1012. The Best Rank (25)
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原创 2017-12-20 00:03:50 · 126 阅读 · 0 评论 -
PAT (Advanced Level) Practise 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原创 2017-12-12 09:33:10 · 138 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1013. Battle Over Cities (25)
1013. Battle Over Cities (25)It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are close原创 2017-12-21 08:58:32 · 148 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1004. Counting Leaves (30)
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.InputEach input file contains one test case. Each case starts with原创 2017-12-13 09:27:54 · 140 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1005. Spell It Right (20)
1005. Spell It Right (20)Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each i原创 2017-12-13 10:03:10 · 167 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1006. Sign In and Sign Out (25)
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原创 2017-12-14 16:37:14 · 162 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1007. Maximum Subsequence Sum (25)
1007. Maximum Subsequence Sum (25)Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 Maximum Subsequence is the continu原创 2017-12-16 12:24:24 · 155 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1008. Elevator (20)
1008. Elevator (20)The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in spec原创 2017-12-16 14:04:44 · 137 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1009. Product of Polynomials (25)
1009. Product of Polynomials (25)This time, you are supposed to find A*B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupie原创 2017-12-16 16:32:58 · 142 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1010. Radix (25)
1010. Radix (25)Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number.Now f原创 2017-12-17 09:57:09 · 217 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1011. World Cup Betting (20)
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原创 2017-12-17 10:42:03 · 147 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1016. Phone Bills (25)
1016. Phone Bills (25)A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time原创 2018-01-13 10:17:13 · 146 阅读 · 0 评论 -
PAT (Advanced Level) Practise 1031. Hello World for U (20)
Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as:h de ll rlowoThat is, the characters must be pr原创 2018-01-18 14:36:15 · 170 阅读 · 0 评论