P8728 [Lanqiao Cup 2020 National B] Fill-in-the-Blank Problems

Description

This problem consists of multiple fill-in-the-blank tasks. You are given an uppercase letter indicating which task it is, and you need to output the corresponding answer. ## Task A: Beautiful $2$ ### Problem Description Xiao Lan really likes $2$. This year is AD $2020$, so he is very happy. He is curious: from AD $1$ to AD $2020$ (inclusive), how many years have the digit $2$ in their decimal representation? ### Answer Submission This is a result fill-in-the-blank problem. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer. Any extra content will not be scored. ## Task B: Diffusion ### Problem Description Xiao Lan is drawing on an infinitely large special canvas. This canvas can be seen as a grid, and each cell can be represented by a 2D integer coordinate. Xiao Lan first clicks a few points on the canvas: $(0,0),(2020,11),(11,14),(2000,2000)$. Only these cells are black, and all other positions are white. Every minute, the black color diffuses a bit. Specifically, if a cell is black, it spreads to its four adjacent cells (up, down, left, right), making those four cells black as well (if a cell was already black, it remains black). After $2020$ minutes, how many cells on the canvas are black? ### Answer Submission This is a result fill-in-the-blank problem. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer. Any extra content will not be scored. ## Task C: Number of Divisors of a Factorial ### Problem Description Define the factorial $n! = 1 \times 2 \times 3 \times \cdots \times n$. How many divisors does $100!$ have? ### Answer Submission This is a result fill-in-the-blank problem. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer. Any extra content will not be scored. ## Task D: Essentially Increasing Subsequences ### Problem Description Xiao Lan especially likes monotonically increasing things. In a string, if you take some characters and keep them in their original order in the string, and the resulting sequence is strictly increasing, then it is called a strictly increasing subsequence of this string. For example, in the string lanqiao, if you take the characters $\mathrm{n}$ and $\mathrm{q}$, then $\mathrm{nq}$ forms a strictly increasing subsequence. Similar strictly increasing subsequences include lnq, i, ano, etc. Xiao Lan发现, some subsequences have different positions but the same character sequence. For example, taking the second character and the last character gives $\mathrm{ao}$, and taking the last two characters also gives ao. Xiao Lan thinks they are not essentially different. For a string, Xiao Lan wants to know how many essentially different increasing subsequences there are. For example, for the string lanqiao, there are $21$ essentially different increasing subsequences. They are l, a, n, q, i, o, ln, an, lq, aq, nq, ai, lo, ao, no, io, lnq, anq. Now, for the following string (a total of $200$ lowercase English letters, shown in four lines): (If you copy the text below into a text file, please be sure to check that the copied content is exactly the same as in the document. In the task directory there is a file inc.txt, whose content is the same as the text below.) ``` tocyjkdzcieoiodfpbgcncsrjbhmugdnojjddhllnofawllbhf iadgdcdjstemphmnjihecoapdjjrprrqnhgccevdarufmliqij gihhfgdcmxvicfauachlifhafpdccfseflcdgjncadfclvfmad vrnaaahahndsikzssoywakgnfjjaihtniptwoulxbaeqkqhewl ``` How many essentially different increasing subsequences are there? ### Answer Submission This is a result fill-in-the-blank problem. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer. Any extra content will not be scored. ## Task E: Toy Snake ### Problem Description Xiao Lan has a toy snake with a total of $16$ segments, labeled with numbers $1$ to $16$. Each segment is a square. Two adjacent segments can be in a straight line or form a $90$ degree angle. Xiao Lan also has a $4 \times 4$ grid box for storing the toy snake. The cells of the box are labeled with letters $\mathrm{A}$ to $\mathrm{P}$, totaling $16$ letters. Xiao Lan can fold his toy snake and put it into the box. He found that there are many ways to place the toy snake into it. The figure below shows two solutions: ![](https://cdn.luogu.com.cn/upload/image_hosting/o83c5jqw.png) Please help Xiao Lan calculate: how many different solutions are there in total? If in two solutions, there exists some segment of the toy snake that is placed in different cells of the box, then they are considered different solutions. ### Answer Submission This is a result fill-in-the-blank problem. You only need to compute the result and submit it. The result is an integer. When submitting, only fill in this integer. Any extra content will not be scored.

Input Format

Input one uppercase letter, indicating which task it is.

Output Format

According to the given task letter, output the corresponding answer.

Explanation/Hint

Answer template for reference. ```cpp #include using namespace std; int main() { string ans [] = { "The answer of task A", // Replace inside the double quotes with the answer for task A "The answer of task B", // Replace inside the double quotes with the answer for task B "The answer of task C", // Replace inside the double quotes with the answer for task C "The answer of task D", // Replace inside the double quotes with the answer for task D "The answer of task E", // Replace inside the double quotes with the answer for task E }; char T; cin >> T; cout