#P8690. [蓝桥杯 2019 国 B] 填空问题
[蓝桥杯 2019 国 B] 填空问题
Problem Description
Task : Square Sequence.
Problem Description.
Xiaoming wants to find two positive integers and such that:
-
.
-
, , and form an arithmetic progression.
Among all possible solutions, find the minimum value of .
Answer Submission.
This is a fill-in-the-blank result problem. You only need to compute the result and submit it. The result of this problem is an integer. When submitting the answer, only fill in this integer; any extra content will not be scored.
Task : Prime Decomposition.
Problem Description.
Decompose into a sum of several pairwise distinct prime numbers. How many different methods are there?
Note that different orders are considered the same method. For example, and are considered the same method.
Answer Submission.
This is a fill-in-the-blank result problem. You only need to compute the result and submit it. The result of this problem is an integer. When submitting the answer, only fill in this integer; any extra content will not be scored.
Task : Splicing.
Problem Description.
Xiaoming wants to cut a piece of wood into two parts and then splice them into a right angle.
As shown in the figure below, he divides the middle part into small squares. He marks whether each small square belongs to the left side or the right side. Then he cuts the wood along the boundary line between the two sides, rotates the right part upward, and splices them together.

Each small square must belong to exactly one of the left or right side, and the squares on the same side must be connected. When splicing, the spliced part must remain inside the original big square.
For a grid of small squares, how many legal ways are there to partition the squares?
Answer Submission.
This is a fill-in-the-blank result problem. You only need to compute the result and submit it. The result of this problem is an integer. When submitting the answer, only fill in this integer; any extra content will not be scored.
Task D: Evaluation.
Problem Description.
After learning about divisors, Xiaoming becomes curious about them. He finds that for any given positive integer , one can always find an integer that has exactly divisors. Xiaoming is very interested in the smallest number that has divisors, and he defines it as .
For example, , , , , .
Now Xiaoming wants to know: when , what is ? That is, what is ?
Answer Submission.
This is a fill-in-the-blank result problem. You only need to compute the result and submit it. The result of this problem is an integer. When submitting the answer, only fill in this integer; any extra content will not be scored.
Task E: Path Counting.
Problem Description.
Starting from the top-left corner of a grid matrix, walk along the edges of the grid. How many routes satisfy the following conditions?
-
The total length does not exceed .
-
Finally return to the top-left corner.
-
The route does not self-intersect.
-
The route does not go outside the grid matrix.
As shown in the figure below, are three legal routes. Note that and are considered different routes because their directions are different.

Answer Submission.
This is a fill-in-the-blank result problem. You only need to compute the result and submit it. The result of this problem is an integer. When submitting the answer, only fill in this integer; any extra content will not be scored.
Input Format
Input an uppercase letter indicating which task it is.
Output Format
According to the input task letter, output the answer for the corresponding task.
Hint
Answer template, for reference.
#include<iostream>
using namespace std;
int main() {
string ans [] = {
"The answer of task A", // 双引号中替换为 A 题的答案
"The answer of task B", // 双引号中替换为 B 题的答案
"The answer of task C", // 双引号中替换为 C 题的答案
"The answer of task D", // 双引号中替换为 D 题的答案
"The answer of task E", // 双引号中替换为 E 题的答案
};
char T;
cin >> T;
cout << ans[T - 'A'] << endl;
return 0;
}
Translated by ChatGPT 5