PAT甲级
逆风阿煜Go
专注Go领域相关的技术分享!!
虽能力有限,但热爱分享,真诚分享,希望和各路大佬交流学习,共同进步!!
展开
-
PAT(Advanced)甲级---1009Product of Polynomials(25 分)
1009Product of 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...原创 2020-03-08 22:26:53 · 102 阅读 · 0 评论 -
PAT(Advanced)甲级---1008Elevator(20分)
1008Elevator(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 s...原创 2020-03-08 21:57:31 · 99 阅读 · 0 评论 -
PAT(Advanced)甲级---1007Maximum Subsequence Sum(25 分)
1007Maximum 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 Su...原创 2020-03-08 21:35:43 · 84 阅读 · 0 评论 -
PAT(Advanced)甲级---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, you...原创 2020-02-12 20:06:56 · 98 阅读 · 0 评论 -
PAT(Advanced)甲级---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. Input Specification: Each input file contains one test case. Eac...原创 2020-02-11 15:46:56 · 85 阅读 · 0 评论 -
PAT(Advanced)甲级---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. Input Specification: Each input file contains one test case. Each case starts w...原创 2020-02-10 15:53:05 · 86 阅读 · 0 评论 -
PAT(Advanced)甲级---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 l...原创 2020-02-10 15:50:30 · 94 阅读 · 0 评论 -
PAT(Advanced)甲级---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 informa...原创 2020-02-10 15:47:03 · 73 阅读 · 0 评论 -
PAT(Advanced)甲级---1001 A+B Format(20分)
Calculatea+band 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...原创 2020-02-10 15:43:59 · 98 阅读 · 0 评论 -
PAT(Advanced)甲级---1114 Family Property (25 分)【DFS,并查集】
This time, you are supposed to help us collect the data for family-owned property. Given each person's family members, and the estate(房产)info under his/her own name, we need to know the size of each f...原创 2019-08-14 19:34:08 · 202 阅读 · 0 评论 -
PAT(Advanced)甲级---1103 Integer Factorization (30分)【DFS】
The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K−P factorization of N for any positive...原创 2019-08-19 15:29:21 · 120 阅读 · 0 评论 -
PAT(Advanced)甲级---1086(25分)Tree Traversals Again
不建树(思路清晰推荐) 前中根遍历得到后根,或者后中根遍历得到前根都是一样的,只是根输出的位置不同。 #include<cstdio> #include<iostream> #include<stack> #include<string> using namespace std; stack<int> st; int pre[40...原创 2019-02-02 11:10:55 · 89 阅读 · 0 评论