#P8721. [蓝桥杯 2020 省 AB3] 填空问题(缺少 inc.txt, E 题数据)
[蓝桥杯 2020 省 AB3] 填空问题(缺少 inc.txt, E 题数据)
Background
This problem is missing inc.txt and the testdata for Problem E. Currently, for Problem E, you only need to output to pass.
Problem Description
Problem A: Counting Frogs
Problem Description
“One frog has one mouth, two eyes, and four legs. Two frogs have two mouths, four eyes, and eight legs.
Three frogs have three mouths, six eyes, and twelve legs. ... Twenty frogs have twenty mouths, forty eyes, and eighty legs.
In the text above, if nothing is omitted and everything is written out completely, from to frogs, how many Chinese characters are there in total?
Convention: When the digit appears alone, it is read as “两”, but inside other numbers it is read as “二”, for example, “十二”. is read as “十”, is read as “十一”, and is read as “二十二”.
Only count the number of Chinese characters. Punctuation marks are not counted.
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 result in no score.
Problem B: Coprime
Problem Description
This year is , and today is October .
Among the numbers from to , how many are coprime with ?
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 result in no score.
Problem C: License Plate
Problem Description
The license plates of City have six characters. The first three characters can be digits 0 to 9 or letters A to F, with possibilities for each position. The last three characters can only be digits 0 to 9. To reduce comparison, the license plate cannot contain three consecutive identical characters.
For example, 202020 is a valid license plate, while AAA202 is not, because the first three letters are the same.
How many valid license plates are there in City ?
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 result in no score.
Problem D: Fibonacci Set
Problem Description
Xiaolan defines a Fibonacci set , whose elements are defined as follows:
-
The smallest Fibonacci numbers belong to set .
-
If an element belongs to , then , , and all belong to set .
-
No other elements belong to .
What is the value of the -th smallest element in this set?
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 result in no score.
Problem E: Increasing Substrings
Problem Description
Xiaolan has a letter matrix. He likes to play some games with his friends on this matrix.
Today, he plans to play a game of finding increasing substrings. The game is cooperative. Xiaolan and his friends first choose a position in the matrix, then start from that position and move to adjacent positions (up, down, left, or right). Each move must satisfy that the letter at the destination position is greater than the letter at the current position. They can move any number of times and can stop at any moment; in this way, they obtain an increasing substring. As long as the positions of the substring in the matrix are different, they are considered different substrings.
Xiaolan wants to know how many increasing substrings can be found in total.
Xiaolan’s matrix is very large and is placed under the problem directory, called inc.txt. To describe the problem more clearly, he also found a very small matrix as an example.
For example, for the matrix:
You can find increasing substrings of length , increasing substrings of length , and increasing substrings of length , for a total of .
Now, for Xiaolan’s large matrix, find the number of increasing substrings.
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 result in no score.
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 for Problem A
"The answer of task B", // Replace inside the double quotes with the answer for Problem B
"The answer of task C", // Replace inside the double quotes with the answer for Problem C
"The answer of task D", // Replace inside the double quotes with the answer for Problem D
"The answer of task E", // Replace inside the double quotes with the answer for Problem E
};
char T;
cin >> T;
cout << ans[T - 'A'] << endl;
return 0;
}
Translated by ChatGPT 5