![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT (Advanced Level) Practice
文章平均质量分 68
cjz-lxg
小白
展开
-
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 subsequence which has the largest sum of its elements. For example, given seq...原创 2022-01-11 15:08:24 · 187 阅读 · 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, you are supposed to find the ones who have unlocked and loc原创 2022-01-10 16:39:02 · 214 阅读 · 0 评论 -
1005 Spell It Right (20 分)
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. Each case occupies one line whi..原创 2022-01-09 20:16:59 · 168 阅读 · 0 评论 -
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 with a line containing0<N<100, the number of n...原创 2022-01-08 20:16:08 · 230 阅读 · 0 评论 -
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 length of each road between any pair of cities are marked原创 2022-01-06 20:44:47 · 40 阅读 · 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 information of a polynomial: KN1aN1N2aN2...NKaNK...原创 2022-01-02 20:48:09 · 55 阅读 · 0 评论