Summary of C++ Real Questions in Group B of the 10th Blue Bridge Cup National Competition in 2019

first question

Please find two positive integers X and Y satisfy the following conditions: 1,
2019<X<Y 2,
2019 2, X 2, Y^2 forming an arithmetic sequence
of X and Y that meet the conditions may have multiple situations, please give The value of X+Y, and make X+Y as small as possible.

Second question

2019 can be decomposed into several different prime numbers. How many different decomposition schemes are there?
Note: The decomposition scheme does not consider the order, such as 2+2017=2019 and 2017+2=2019 belong to the same scheme.

Third question

What is given is nine 3x3 grids, and then how to divide and rotate them so that they can be perfectly stitched together. It seems to ask how many divisions are there in a 7*7 grid?

Fourth question

There is a 7X7 square. The coordinates of the top left corner of the grid are (0,0), and the coordinates of the bottom right corner are (7,7).
Find the number of paths that meet the following conditions:
1. The starting point and the end point are both (0,0)
2. The path is not self-intersecting
3. The path length is not greater than 12
4. For each vertex, there are four directions to go up, down, left, and right. But you can't cross the line.

Fifth question

Probably find the smallest integer with 100 divisors (for example, 6 has 4 divisors, 1, 2, 3, 6)

Sixth question

Given two strings S and T, make sure that the length of S is not less than the length of T, and ask how many characters of S should be modified at least to make T a subsequence of S.

Enter a description:

Two lines.
The first line is the string S, and the second line is the string T.
Ensure that the length of S is not less than the length of T, and that the length of S ranges from 10 to 1000.

Output description:

The answer, a non-negative integer.

Input sample:

XBBBBBAC
ACC

Sample output:

2

Guess you like

Origin blog.csdn.net/weixin_44723496/article/details/109407660