PAT (Advanced Level) Practice
guangjinzheng
这个作者很懒,什么都没留下…
展开
-
1056 Mice and Rice(PAT 甲等 C++实现)
1056 Mice and Rice(25 point(s))Mice and Rice is 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 ...原创 2018-09-03 16:36:31 · 142 阅读 · 0 评论 -
1051 Pop Sequence(PAT 甲等 C++实现)
1051 Pop Sequence(25 point(s))Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers...原创 2018-09-03 14:47:01 · 176 阅读 · 0 评论 -
1032 Sharing(PAT 甲等 C++实现)
1032 Sharing(25 point(s))To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share th...原创 2018-09-02 20:32:17 · 217 阅读 · 0 评论 -
1013 Battle Over Cities(PAT 甲等 C++实现)
1013 Battle Over Cities (25 point(s))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 clo...原创 2018-09-19 19:28:57 · 182 阅读 · 0 评论 -
1008 Elevator(PAT 甲等 C++实现)
1008 Elevator (20)(20 point(s))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, i...原创 2018-07-24 11:13:12 · 283 阅读 · 0 评论 -
1007 Maximum Subsequence Sum(PAT 甲等 C++实现)
1007 Maximum Subsequence Sum (25)(25 point(s))Given a sequence of K integers { N~1~, N~2~, ..., N~K~ }. A continuous subsequence is defined to be { N~i~, N~i+1~, ..., N~j~ } where 1 <= i <= j ...原创 2018-07-24 13:37:45 · 118 阅读 · 0 评论 -
1103 Integer Factorization(PAT 甲等 C++实现)
1103 Integer Factorization (30 point(s))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 t...原创 2018-09-19 16:29:14 · 220 阅读 · 0 评论 -
1001 A+B Format (PAT 甲等 C++实现)
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).InputEach input file contains...原创 2018-05-20 13:56:21 · 1706 阅读 · 1 评论