PAT_A

PAT_A1015 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 re ......
Reversible Primes PAT_A 1015 PAT

PAT_A1081 Rational Sum

1、 #分数 本题主要考察分数的运算,和分数的输出 2、数据范围为int,但两分母相乘时,最大可达到long long,应该用long long 3、测试点4会检查0的输出。 ......
Rational PAT_A 1081 PAT Sum

PAT_A1049 Counting Ones【困难】

数学问题/简单数学 需要严格推理,具体见算法笔记上机指南p199.每次迭代,记录当前位出现1的个数;对当前位的数分三种情况讨论。 ......
Counting PAT_A 1049 Ones PAT

PAT_A1104 Sum of Number Segments

Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence { 0.1, 0.2, 0.3, 0.4 }, we ......
Segments Number PAT_A 1104 PAT

PAT_A1029 Median

two_pointers;令两个序列的最后都添加一个很大的数作为哨兵节点,可以简化代码,解决数组问题;使用cin、cout会超时。 ......
Median PAT_A 1029 PAT

PAT_A1089 Insert or Merge

According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert ......
Insert PAT_A Merge 1089 PAT

PAT_A1044 Shopping in Mars

Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making ......
Shopping PAT_A 1044 Mars PAT

PAT_A 1010 Radix

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 ......
PAT_A Radix 1010 PAT

PAT_A 1085 Perfect Sequence

Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the max ......
Sequence Perfect PAT_A 1085 PAT

PAT_A 1038 Recover the Smallest Number

Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, we c ......
Smallest Recover Number PAT_A 1038

PAT_A1067 Sort with Swap(0, i)

使用p数组存放各元素当前所处位置,e数组在这里无用。在寻找没有归位的元素时,如果每次从头开始寻找会超时。 ......
PAT_A 1067 Sort with Swap

PAT_A1070 Mooncake

Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional ......
Mooncake PAT_A 1070 PAT
共12篇  :1/1页 首页上一页1下一页尾页