#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 qwq\tt{qwq} 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 11 to 2020 frogs, how many Chinese characters are there in total?

Convention: When the digit 22 appears alone, it is read as “两”, but inside other numbers it is read as “二”, for example, “十二”. 1010 is read as “十”, 1111 is read as “十一”, and 2222 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 20202020, and today is October 1818.

Among the numbers from 11 to 20202020, how many are coprime with 10181018?

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 A\mathrm{A} have six characters. The first three characters can be digits 0 to 9 or letters A to F, with 1616 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 A\mathrm{A}?

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 FF, whose elements are defined as follows:

  1. The smallest 55 Fibonacci numbers 1,2,3,5,81,2,3,5,8 belong to set FF.

  2. If an element xx belongs to FF, then 3x+23 x+2, 5x+35 x+3, and 8x+58 x+5 all belong to set FF.

  3. No other elements belong to FF.

What is the value of the 20202020-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:

A BA\ B

BC\mathrm{BC}

You can find 44 increasing substrings of length 11, 44 increasing substrings of length 22, and 22 increasing substrings of length 33, for a total of 1010.

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