2020 10th C/C++ Group A First Blue Bridge Cup Provincial Match

Here is the topic column of the Blue Bridge Cup over the years. It will be updated and will release the real questions and answers from previous years. Welcome friends to pay attention to me. Your likes and attention are the best motivation for me! ! !
Update one real question every day, so stay tuned

Lanqiao Cup Past Papers and Detailed Answers


Question 1: Running training

Title description
Xiao Ming is going to do a running training. At the beginning, Xiao Ming is full of physical strength, and his physical strength is calculated as 10,000. If Xiao Ming runs, he loses 600 stamina per minute. If Xiao Ming rests, he will increase his physical strength by 300 per minute. The loss and increase in physical strength change uniformly.
Xiao Ming intends to run for one minute, rest for one minute, run for another minute, and rest for another minute... and so on. If Xiao Ming's physical strength reaches zero at some point, he will stop exercising. How long will Xiao Ming stop exercising?
To make the answer an integer, please output the answer in seconds. Only fill in the number and not the unit in the answer.
Topic analysis
topic codes



The second question: merge detection

Title description The
new crown epidemic is caused by the new crown virus and has spread in country A recently. In order to control the epidemic as soon as possible, country A is preparing to give a large number of people a virus nucleic acid test.
However, the test kit is in short supply. In order to solve this difficulty, scientists thought of a way: combined testing. About to put the specimens collected from multiple people (k) into the same kit for testing. If the result is negative, it means that all k persons are negative, and the test of k persons has been completed with one kit. If the result is positive, it means that at least one person is positive, and all the samples of these k persons need to be tested independently again (theoretically, if k−1 persons are negative before the test, it can be inferred that the kth person is positive, but This inference will not be used in actual operation, but k individuals will be tested independently), plus the initial combined test, a total of k + 1 kits have been used to complete the test of k individuals. Country A estimates that the infection rate of the tested population is about 1%, which is evenly distributed. How much can I save the most kits?
Topic analysis
topic codes



Question 3: Assign masks

Title description The
mayor of a city has obtained several batches of masks. Given the number of masks in each batch, the mayor will allocate the masks to 2 hospitals in the city. Due to logistics restrictions, each batch of masks can only be allocated to one of the hospitals. The mayor hopes that the difference between the total number of masks obtained by the two hospitals is as small as possible. Could you please calculate the smallest difference?
Topic analysis
topic codes



Fourth question: Matrix

Title description
Put 1∼2020 in a 2×1010 matrix. It is required that the right side in the same row is larger than the left side, and the lower side in the same column is larger than the upper side. How many options are there?
The answer is big, you only need to give the remainder of the number of plans divided by 2020.
Topic analysis
topic codes



Fifth question: perfect square number

Title description
If the whole integer X itself is a perfect square number, and every digit of it is also a perfect square number, we call X a perfect square number. The first few perfect square numbers are 0, 1
, 4, 9 , 100, 144... Could you please calculate the 2020th perfect square number?
Topic analysis
topic codes



Question 6: Decoding

Title description
Xiao Ming has a long string of English letters, which may contain upper and lower case.
In this string of letters, many consecutive letters are repeated. Xiao Ming thought of a way to express this string of letters even shorter: write several consecutive identical letters in the form of letters + number of occurrences. For example, for 5 consecutive a, that is, aaaaa, Xiao Ming can be abbreviated as a5 (or a4a, aa3a, etc.).
For this example: HHHellllloo, Xiao Ming can be abbreviated as H3el5o2. For the convenience of expression, Xiao Ming will not write more than 9 consecutive identical characters in abbreviated form.
Now give the abbreviated string, please help Xiao Ming to restore it to the original string.
Topic analysis
topic codes



Seventh question: go square

Title description
There are some two-dimensional lattices on the plane.
The numbering of these points is like the numbering of a two-dimensional array, from top to bottom from the 1st to the nth row, from left to right from the 1st to the mth column. Each point can be represented by a row number and a column number. Said. Now there is a person standing in row 1, column 1, and going to row n and column m. You can only go right or down.
Note that if the row number and column number are both even numbers, you cannot enter this grid.
Ask how many options are there.
Topic analysis
topic codes



Question 8: Small integer splicing

Title description
Given an array of length n A1, A2,..., An. You can choose two numbers Ai and Aj (i is not equal to j), and then put Ai and Aj one after the other into a new integer. For example, 12 and 345 can be combined into 12345 or 34512. Note that the order of exchanging Ai and Aj is always regarded as two spellings, even when Ai=Aj.
Please calculate how many spellings satisfy that the integer spelled out is less than or equal to K.
Topic analysis
topic codes



Question 9: Super glue

Title description
Xiao Ming has n stones, arranged in a row in order. He is going to glue these stones together. Each stone has its own weight. If two stones are glued together, they will merge into a new stone. The weight is the sum of the weight of the two stones.
In order to ensure that the stones are firmly pasted, the glue required to paste the two stones is proportional to the product of the weight of the two stones. This question does not consider the physical unit. It is considered that the required glue is numerically equal to the product of the weight of the two stones.
For each merging, Xiao Ming can only merge two stones that are adjacent to each other, and put the new stones that are merged into the original position.
Now, Xiao Ming wants to glue all the stones together with the least amount of glue. Please help Xiao Ming calculate the minimum amount of glue needed.
Topic analysis
topic codes



Tenth question: network analysis

Title description
Xiao Ming is doing a network experiment.
He set up n computers, called nodes, for sending, receiving and storing data.
Initially, all nodes are independent and there is no connection.
Xiao Ming can connect two nodes through a network cable, and the two nodes can communicate with each other after the connection. If two nodes are connected by a network cable, they are called adjacent.
Xiao Ming sometimes tests the network at that time. He will send a message at a node, and the message will be sent to each neighboring node, and then these nodes will be forwarded to their neighbors until all directly or indirectly neighbors The nodes have all received the information. All sending and receiving nodes will store the information. A message is only stored once.
Given the process of Xiaoming's connection and testing, please calculate the size of the information stored in each node.
Topic analysis
topic codes



Guess you like

Origin blog.csdn.net/kiwi_berrys/article/details/111463920