#P8741. [蓝桥杯 2021 省 B] 填空问题
[蓝桥杯 2021 省 B] 填空问题
Problem Description
This problem set contains multiple fill-in-the-blank tasks. For each task, you only need to compute the result and submit it as required.
Task A: Space
Problem Description
Xiao Lan plans to use of memory to create an array. Each element of the array is a -bit binary integer. If we do not consider the space used by the program itself and the extra space needed for memory management, how many -bit binary integers can be stored in ?
Answer Submission
This is a fill-in-the-blank question. You only need to compute the result and submit it. The result of this problem is an integer. When submitting, only fill in this integer. Any extra content will make you score .
Task B: Cards
Problem Description
Xiao Lan has many digit cards. Each card has a digit from to .
Xiao Lan wants to use these cards to form some numbers. He wants to start from and form positive integers. Each time he forms one number, he keeps it, and the cards used for that number cannot be used to form other numbers.
Xiao Lan wants to know how far he can go starting from .
For example, when Xiao Lan has cards, with cards for each digit from to , he can form numbers from to . But when forming , the digit card has only one card left, which is not enough to form .
Now Xiao Lan has cards for each digit from to , a total of cards. How far can he form numbers starting from ?
Hint: It is recommended to solve this problem using computer programming.
Answer Submission
This is a fill-in-the-blank question. You only need to compute the result and submit it. The result of this problem is an integer. When submitting, only fill in this integer. Any extra content will make you score .
Task C: Lines
Problem Description
In a Cartesian coordinate plane, two points determine a line. If multiple points lie on the same line, then the lines determined by any two of these points are the same.
Given integer lattice points on the plane: $\{(x,y) \mid 0 \leq x<2,0 \leq y<3,x \in \mathbb{Z},y \in \mathbb{Z}\}$, that is, points whose -coordinate is an integer between and (including and ), and whose -coordinate is an integer between and (including and ). These points determine different lines in total.
Given integer lattice points on the plane: $\{(x,y) \mid 0 \leq x<20,0 \leq y<21,x \in \mathbb{Z},y \in \mathbb{Z}\}$, that is, points whose -coordinate is an integer between and (including and ), and whose -coordinate is an integer between and (including and ). How many different lines do these points determine in total?
Answer Submission
This is a fill-in-the-blank question. You only need to compute the result and submit it. The result of this problem is an integer. When submitting, only fill in this integer. Any extra content will make you score .
Task D: Cargo Placement
Problem Description
Xiao Lan has a huge warehouse and can place many cargos in it.
Now Xiao Lan has boxes of cargo to place in the warehouse. Each box is a regular cube. Xiao Lan defines three mutually perpendicular directions: length, width, and height. The edges of each box must be strictly parallel to the length, width, and height directions.
Xiao Lan wants all the cargos to finally form a big cube. That is, stack , , and boxes along the length, width, and height directions respectively, satisfying .
Given , how many different stacking schemes satisfy the requirement?
For example, when , there are the following schemes: , , , , , .
When (note that it has digits), how many schemes are there in total?
Hint: It is recommended to solve this problem using computer programming.
Answer Submission
This is a fill-in-the-blank question. You only need to compute the result and submit it. The result of this problem is an integer. When submitting, only fill in this integer. Any extra content will make you score .
Task E: Path
Problem Description
After learning shortest paths, Xiao Lan is very happy. He defines a special graph and wants to find the shortest path in it.
Xiao Lan's graph consists of nodes, numbered from to in order.
For two different nodes , if the absolute value of the difference between and is greater than , then there is no edge between them. If the absolute value of the difference between and is less than or equal to , then there is an undirected edge between them, whose length is the least common multiple of and .
For example, there is no edge between node and node . There is an undirected edge between node and node with length . There is an undirected edge between node and node with length .
Please compute the length of the shortest path between node and node .
Hint: It is recommended to solve this problem using computer programming.
Answer Submission
This is a fill-in-the-blank question. You only need to compute the result and submit it. The result of this problem is an integer. When submitting, only fill in this integer. Any extra content will make you score .
Input Format
Input one uppercase letter, indicating which task it is.
Output Format
According to the input task label, 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", // Replace inside the double quotes with the answer to task A
"The answer of task B", // Replace inside the double quotes with the answer to task B
"The answer of task C", // Replace inside the double quotes with the answer to task C
"The answer of task D", // Replace inside the double quotes with the answer to task D
"The answer of task E", // Replace inside the double quotes with the answer to task E
};
char T;
cin >> T;
cout << ans[T - 'A'] << endl;
return 0;
}
Translated by ChatGPT 5