PAT(A) 1104. Sum of Number Segments (20)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1104

1104. Sum of Number Segments (20)


Given a sequence of positive numbers, a segment is defined

PAT(A) 1103. Integer Factorization (30)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1103

1103. Integer Factorization (30)


The K-P factorization of a positive integer N is to write

C++全局变量值被修改

2017年9月9日晚,在做PAT甲级1103 Integer Factorization (30)一题时碰到一个问题,测试点5总是过不去。后来经过10号晚上反复测试发现其中一个全局变量的值在执行某个函数是被莫名修改了。

为验证全局变量的改动情况,写了一部分代码用于测试,如下: ``` C++

include "iostream"

PAT(A) 1102. Invert a Binary Tree (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1102

1102. Invert a Binary Tree (25)


The following is from Max Howell @twitter:

Google: 90% of our engineers

PAT(A) 1101. Quick Sort (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1101

1101. Quick Sort (25)


There is a classical process named partition in the famous quick sort

PAT(A) 1100. Mars Numbers (20)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1100

1100. Mars Numbers (20)


People on Mars count their numbers with base 13:

Zero on Earth is called "tret"

PAT(A) 1095. Cars on Campus (30)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1095

1095. Cars on Campus (30)


Zhejiang University has 6 campuses and a lot of gates. From each gate

PAT(A) 1094. The Largest Generation (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1094

1094. The Largest Generation (25)


A family hierarchy is usually presented by a pedigree tree where

PAT(A) 1093. Count PAT's (25)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1093

1093. Count PAT's (25)


The string APPAPT contains two PAT's as substrings. The first

PAT(A) 1092. To Buy or Not to Buy (20)

原题目:

原题链接:https://www.patest.cn/contests/pat-a-practise/1092

1092. To Buy or Not to Buy (20)


Eva would like to make a string of beads with her favorite colors so