pat甲级(模拟题)
月下独喝
这个作者很懒,什么都没留下…
展开
-
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...原创 2019-05-26 16:27:50 · 227 阅读 · 0 评论 -
1153 Decode Registration Card of PAT (25 分)(排序题)(字符串的处理)
1153 Decode Registration Card of PAT (25 分)A registration card number of PAT consists of 4 parts:the 1st letter represents the test level, namely, T for the top level, A for advance and B for basi...原创 2019-07-24 15:23:23 · 114 阅读 · 0 评论 -
pat甲级 1093 Count PAT's (左右数组处理)(简单模拟)
1093 Count PAT's (25 分)The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and ...原创 2019-08-03 11:56:51 · 160 阅读 · 0 评论 -
pat甲级1101 Quick Sort(左右数组)(简单模拟)
1101 Quick Sort (25 分)There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the p...原创 2019-08-03 12:21:36 · 102 阅读 · 0 评论 -
1144 The Missing Number(set的运用)(简单模拟)
1144 The Missing Number (20 分)Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list.Input Specification:Each input file contains one test case. F...原创 2019-08-13 16:10:35 · 104 阅读 · 0 评论 -
1049 Counting Ones(数学逻辑)(化简)
1049 Counting Ones (30 分)The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. For example, given N bei...原创 2019-08-06 22:29:16 · 143 阅读 · 0 评论 -
1089 Insert or Merge (25 分) (判断插入排序,分治排序)
1089 Insert or Merge (25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one...原创 2019-08-09 14:16:56 · 162 阅读 · 0 评论 -
1113 Integer Set Partition(小模拟)(简单逻辑)
1113 Integer Set Partition (25 分)Given a set of N (>1) positive integers, you are supposed to partition them into two disjoint sets A1 and A2 of n1 and n2 numbers, respectively. Let S...原创 2019-08-19 16:20:38 · 94 阅读 · 0 评论 -
1116 Come on! Let's C(简单模拟)
1116 Come on! Let's C (20 分)"Let's C" is a popular and fun programming contest hosted by the College of Computer Science and Technology, Zhejiang University. Since the idea of the contest is for fun...原创 2019-08-21 09:19:21 · 124 阅读 · 0 评论 -
1073 Scientific Notation(简单模拟)(字符串的处理)
Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]+E[+-][0-9]+ which means that the inte...原创 2019-07-19 16:39:16 · 98 阅读 · 0 评论 -
1077 Kuchiguse(简单模拟)(字符串处理)
1077 Kuchiguse (20 分)The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such ...原创 2019-07-19 09:07:44 · 171 阅读 · 0 评论 -
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 ...原创 2019-05-26 10:47:25 · 73 阅读 · 0 评论 -
1028 List Sorting(排序题)
1028 List Sorting (25 分)Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contains one test case. For each case, t...原创 2019-06-13 09:06:29 · 187 阅读 · 1 评论 -
1100 Mars Numbers(stl (string字符串的处理))
1100 Mars Numbers (20 分)People on Mars count their numbers with base 13:Zero on Earth is called "tret" on Mars. The numbers 1 to 12 on Earth is called "jan, feb, mar, apr, may, jun, jly, aug, sep...原创 2019-06-22 20:43:48 · 115 阅读 · 0 评论 -
1060 Are They Equal (25 分)(保留浮点数)(string字符串处理)
1060 Are They Equal (25 分)If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123×105 with simple chopping. No...原创 2019-07-02 10:46:21 · 114 阅读 · 0 评论 -
1051 Pop Sequence(stl,栈的运用)
1051 Pop Sequence (25 分)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 is a ...原创 2019-07-02 16:42:40 · 114 阅读 · 0 评论 -
1024 Palindromic Number(大整数)(回文数判断)
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...原创 2019-07-04 18:33:46 · 246 阅读 · 0 评论 -
1059 Prime Factors(求出一个质数的质因数个数)(素数表)
Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1k1×p2k2×⋯×pmkm.Input Specification:Each input file co...原创 2019-07-04 19:48:28 · 253 阅读 · 0 评论 -
1055 The World's Richest(排序(剪枝))
1055 The World's Richest (25 分)Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, ...原创 2019-07-06 10:36:43 · 157 阅读 · 0 评论 -
1121 Damn Single(简单模拟)
1121 Damn Single (25 分)"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of.Input ...原创 2019-08-21 11:00:54 · 268 阅读 · 0 评论