P8704 [Lanqiao Cup 2020 NOI Qualifier A1] Fill-in-the-Blank Problems
Description
## A: Running Training.
Xiaoming is going to do a running training session. At the beginning, Xiaoming is full of energy, and his energy value is $10000$. If Xiaoming runs, he loses $600$ energy per minute. If Xiaoming rests, he gains $300$ energy per minute. Both the loss and the gain change uniformly.
Xiaoming plans to run for one minute, rest for one minute, then run for one minute, then rest for one minute... and so on in a cycle. If at some moment Xiaoming's energy reaches $0$, he stops exercising. How long will it take before Xiaoming stops?
To make the answer an integer, output the answer in seconds. In the answer, write only the number, without the unit.
## B: Pooled Testing.
The COVID-19 pandemic is caused by the coronavirus, and it has recently spread in country $A$. In order to control the pandemic as soon as possible, country $A$ plans to conduct viral nucleic acid tests for a large number of people.
However, testing kits are in short supply. To solve this difficulty, scientists came up with a method: pooled testing. That is, samples collected from multiple people ($k$ people) are put into the same test kit for testing. If the result is negative, it means all these $k$ people are negative, and one test kit completes testing for $k$ people. If the result is positive, it means at least one person is positive, and the samples of all these $k$ people need to be retested independently (in theory, if the first $k-1$ people test negative, one could infer that the $k$-th person is positive, but in actual operation this inference is not used; instead, the $k$ people are tested independently). Including the initial pooled test, a total of $k+1$ test kits are used to complete testing for $k$ people. Country $A$ estimates that the infection rate among the people to be tested is about $1\%$, uniformly distributed. What value of $k$ saves the most test kits?
## C: Distributing Masks.
The mayor of a city obtained several batches of masks. Given the number of masks in each batch, the mayor needs to distribute the masks to $2$ hospitals in the city.
```
masks=[9090400,8499400,5926800,8547000,4958200,4422600,
5751200,4175600,6309600,5865200,6604400,4635000,
10663400,8087200,4554000]
```
Due to logistics limitations, each batch of masks can only be distributed entirely to one hospital. The mayor wants the difference between the total numbers of masks obtained by the $2$ hospitals to be as small as possible. Please compute what the minimum possible difference is.
## D: Matrix.
Put $1 \sim 2020$ into a $2 \times 1010$ matrix. It is required that within the same row, the number on the right is larger than the number on the left, and within the same column, the number below is larger than the number above. How many different arrangements are there?
The answer is very large. You only need to give the remainder when the number of arrangements is divided by $2020$.
## E: Perfect Squares.
If an integer $X$ is itself a perfect square, and every digit of it is also a perfect square, then we call $X$ a perfect square number. The first few perfect square numbers are $0$, $1$, $4$, $9$, $49$, $100$, $144$ ....
Please compute what the $2020$-th perfect square number is.
Input Format
Input one uppercase letter, indicating which problem it is.
Output Format
According to the given problem label, output the answer to the corresponding problem.
Explanation/Hint
Answer template for reference.
```cpp
#include
using namespace std;
int main() {
string ans [] = {
"The answer of task A", // Replace the content in double quotes with the answer to problem A
"The answer of task B", // Replace the content in double quotes with the answer to problem B
"The answer of task C", // Replace the content in double quotes with the answer to problem C
"The answer of task D", // Replace the content in double quotes with the answer to problem D
"The answer of task E", // Replace the content in double quotes with the answer to problem E
};
char T;
cin >> T;
cout