2019 Blue Bridge Cup Group B C++ Provincial Competition Questions and Feelings

The 10th Blue Bridge Cup Competition in 2019, the provincial software category C/C++ university group B

Question A: Team up

Total score for this question: 5 points
[Problem description]
As the coach of the basketball team, you need to select a player from positions 1 to 5 from the following list to
form the team's starting lineup.
The ratings for each player from 1 to 5 are shown in the table below. Can you calculate
the maximum possible sum of the ratings of the starting lineup's 1st to 5th positions?

Question B: Year String

The total score of this question: 5 points
[Problem description]
Xiaoming uses the letter A to correspond to the number 1, B to 2, and so on, and Z to 26. For
numbers above 27, Xiaoming uses a string of two or more digits to correspond, for example, AA corresponds to 27, AB corresponds
to 28, AZ corresponds to 52, and LQ corresponds to 329.
What is the corresponding string for 2019?

[Answer submission]
This is a question with the result filled in the blank, you only need to calculate the result and submit it. The result of this question is an
uppercase English character string. When submitting the answer, only fill in this character string. Pay attention to all uppercase characters. Filling in
redundant content will not give you any points.

Question C: Evaluation of Sequences

Total score for this question: 10 points
[Problem description]
Given a sequence of 1, 1, 1, 3, 5, 9, 17, ..., starting from the 4th item, each item is the sum of the previous 3 items. Find
the last 4 digits of item 20190324.
[Answer submission]
This is a question with the result filled in the blank, you only need to calculate the result and submit it. The result of this question is a
4-digit integer (hint: the thousand-digit of the answer is not 0). When submitting the answer, only fill in this integer, and
the extra content will not be awarded.
Question C: Evaluation of Sequences

Question D: Decomposition of Numbers

Total score for this question: 10 points
[Problem description]
Decompose 2019 into the sum of 3 different positive integers, and require that each positive integer does not
contain the numbers 2 and 4, how many different decomposition methods are there?
Note that swapping the order of 3 integers is considered the same method, for example 1000+1001+18 and
1001+1000+18 are considered the same.
[Answer submission]
This is a question with the result filled in the blank, you only need to calculate the result and submit it. The result of this question is an
integer. Only fill in this integer when submitting the answer. Fill in the extra content will not be able to score.

E: maze

Question F: Sum of Special Numbers

Time limit: 1.0s Memory limit: 256.0MB Total score for this question: 15 points
[Problem description]
Xiaoming is very interested in numbers containing 2, 0, 1, and 9 in the digits (excluding leading 0), and
this is between 1 and 40 The numbers include 1, 2, 9, 10 to 32, 39 and 40, a total of 28, and their sum is 574.
Excuse me, in 1 to n, what is the sum of all such numbers?
【Input format】The
input line contains two integers n.
[Output format]
Output one line, including an integer, which represents the sum of the numbers that satisfy the condition.
[Sample input]
40
[Sample output]
574
[Evaluation case scale and convention]
For 20% of the evaluation use cases, 1≤n≤10.
For 50% of the evaluation use cases, 1≤n≤100.
For 80% of the evaluation cases, 1≤n≤1000.
For all evaluation cases, 1≤n≤10000.

Question G: Weights of Complete Binary Trees


Question H: Arithmetic Number Sequence

Time limit: 1.0s Memory limit: 256.0MB Total score for this question: 20 points
[Problem description]
The math teacher gave Xiao Ming a problem of summing arithmetic sequences. But the careless Xiao Ming forgot
part of the sequence and only remembered the N integers.
Now given these N integers, Xiaoming wants to know how many terms are there in the shortest arithmetic sequence containing these N integers
?
【Input format】
The first line of input contains an integer N.
The second row contains N integers A1,A2,...,AN. (Note that A1∼AN is not necessarily
given in the order of arithmetic progression)
【Output format】
Output an integer to represent the answer.
[Sample input]
5
2641020
[Sample output]
10
[Sample description]
The shortest arithmetic sequence including 2, 6, 4, 10, 20 is 2, 4, 6, 8, 10, 12, 14, 16 ,
18, 20.
[Scale and conventions of evaluation use cases]
For all evaluation use cases, 2≤N≤100000

Question I: Postfix Expressions

Time limit: 1.0s Memory limit: 256.0MB Total score for this question: 25 points
[Problem description]
Given N plus signs, M minus signs and N+M+1 integers A1,A2,...,AN+M +1, Xiao
Ming wants to know which of the legal postfix expressions made up of N plus signs, M minus signs and N+M+1 integers has the
largest result?
Please output this maximum result.
For example, if 123+- is used, the result of the suffix expression "23+1-" is 4, which is the largest.
【Input format】
The first line contains two integers N and M.
The second line contains N+M+1 integers A1,A2,...,AN+M+1.
【Output format】
Output an integer representing the answer.
[Sample input]
11
123
[Sample output]
4
[Evaluation case scale and convention]
For all evaluation cases, 0≤N, M≤100000, −10e9 ≤Ai≤10e9.

J: psionic transmission



 

I specially reported to Group B, I want to do a good job and get the top score in the province. Unfortunately, this year is not as lucky as last year. The site bug was delayed by an hour and let me sleep. I was a little confused when I did the question in the morning, and it was cold to 25 people.

1. 490

2. BYQ

3. 4659

4. 40785

5. DDDDRRURRRRRRDRRRDDDLDDRDDDDDDDDDDDDRRRURRUURRDDDDRDRRRRRRDRRURRDDDRRRRUURUUUUUUULULLUUUURRRRUULLLUUUULLUUULUURRURRURURRRDDRRRRRDDRRDDLLLDDRRDDRDDLDDDLLDDLLLDLDDDLDDRRRRRRRRRDDDDDDRR

The first three questions of fill-in-the-blank questions are easy to verify, and there are very few people who are wrong. The fourth question should pay attention to the fact that the three numbers are not equal to each other, and the fifth question is BFS.

The code of the programming question is briefly omitted. Compared with the previous two years, this question has no code to fill in the blank. It may be because there are more simple programming questions, and the difficulty is actually slightly lower. Except for the last question, DP, which is difficult to write, other questions are more basic. Even if you can't do the best, you can get half of the points. If you don't make mistakes, there should be many people who have the opportunity to get close to the full score.

However, after all, Blue Bridge cannot submit the results directly, plus some deliberate traps, and it is easy to make mistakes. Most of the people who scored nearly full marks on the nine questions should only have one or two in most provinces. The person who can solve the last question is indeed a big guy. , rare.

Four people in the same group took a taxi. They said that they filled in the blanks with two wrong ones, and programmed wrong three times. I thought that I should not be the worst in the exam, but I didn’t expect them to be ranked in the top five in the province... Believe their evil, a bunch of bad old men are bad very...

I hope I can go to Peking University this year, not to go to Beijing Union University.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324737807&siteId=291194637