PAT甲级
pat
Whisper_yl
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
1001 A+B Format
Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input Specification: Each input ...原创 2018-11-28 23:35:39 · 177 阅读 · 0 评论 -
1016 Phone Bills(map的遍历及使用)
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 of day when the call is made. When...原创 2019-01-26 20:35:43 · 279 阅读 · 0 评论 -
1017 Queueing at Bank
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 to wait in line behind the yellow li...原创 2019-01-27 13:56:05 · 207 阅读 · 0 评论 -
1019 General Palindromic Number
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...原创 2019-02-15 14:39:32 · 183 阅读 · 0 评论 -
1021 Deepest Root(DFS,连通分量)
A graph which is connected and acyclic can be considered a tree. The hight 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 i...原创 2019-02-21 22:43:10 · 215 阅读 · 0 评论 -
1018 Public Bike Management
There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stations in the ...原创 2019-02-12 10:36:38 · 207 阅读 · 0 评论 -
1022 Digital Library(map, set复合结构,while(cin >> temp),引用)
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...原创 2019-02-22 22:34:29 · 251 阅读 · 0 评论 -
1024 Palindromic Number
A number that will be the same when it is written forwards or backwards is known as aPalindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers...原创 2019-02-27 22:37:04 · 194 阅读 · 0 评论 -
1023 Have Fun with Numbers
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...原创 2019-02-24 22:41:52 · 175 阅读 · 0 评论 -
1020 Tree Traversals(中序后序确定先序/层序)
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...原创 2019-02-19 22:40:18 · 240 阅读 · 0 评论 -
1012 The Best Rank
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), and E - Eng...原创 2018-12-11 21:13:10 · 319 阅读 · 0 评论 -
1015 Reversible Primes
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 because its reverse 37 is also a pr...原创 2018-12-16 19:58:18 · 268 阅读 · 0 评论 -
1004 Counting Leaves(DFS, vector<int> v[100])
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 starts...原创 2018-12-07 23:07:24 · 206 阅读 · 0 评论 -
1005 Spell It Right(sstream / to_string())
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 input file contains one test case. Eac...原创 2018-12-08 10:38:11 · 216 阅读 · 0 评论 -
1007 Maximum Subsequence Sum(DP)
Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequen...原创 2018-12-08 12:25:13 · 203 阅读 · 0 评论 -
1009 Product of Polynomials
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 occupies 2 lines, and each line contains the informa...原创 2018-12-08 22:24:05 · 164 阅读 · 0 评论 -
1003 Emergency(fill(), Dijkstra)
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 l...原创 2018-12-06 09:32:03 · 242 阅读 · 0 评论 -
1002 A+B for Polynomials
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 occupies 2 lines, and each line contains the informa...原创 2018-12-03 21:14:15 · 143 阅读 · 0 评论 -
1013 Battle Over Cities(Connected Components / BFS)
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 closed. We must know immediately if we nee...原创 2018-12-13 23:10:49 · 170 阅读 · 0 评论 -
1010 Radix(Binary Search)
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 for any pair of positive inte...原创 2018-12-10 09:15:00 · 232 阅读 · 0 评论 -
1014 Waiting in Line(queue)
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 customers to wait in line are: The space...原创 2018-12-16 12:13:23 · 567 阅读 · 0 评论 -
1025 PAT Ranking
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...原创 2019-03-04 16:13:27 · 194 阅读 · 0 评论
分享