#P8691. [蓝桥杯 2019 国 C] 填空问题

[蓝桥杯 2019 国 C] 填空问题

Problem Description

Task A\mathrm{A}: Odd Multiple

Problem Description

Please find the smallest integer XX that satisfies both:

  • XX is a multiple of 20192019.

  • Every digit of XX is odd.

Answer Submission

This is a fill-in-the-blank (final answer) problem. 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 00.

Task B\mathrm{B}: Increasing Sequences

Problem Description

For a letter matrix, we say an increasing sequence in the matrix means finding two letters in the matrix such that they are in the same row, the same column, or on the same 4545-degree diagonal line, and when viewed from left to right, or from top to bottom, these two letters are in increasing order.

For example, in the following matrix

LANN
QIAO

there are 1313 increasing sequences: LN, LN, AN, AN, IO, AO, LQ, AI, NO, NO, AQ, IN, AN, etc. Note that when two letters are arranged from bottom-left to top-right, the order "from left to right" and "from top to bottom" are different orders.

For the following matrix of 3030 rows and 5050 columns, how many increasing sequences are there in total? (If you copy the text below into a text file, be sure to check that the copied content is exactly the same as in the document. There is an attached file inc.txt whose content is the same as the text below.)

VLPWJVVNNZSWFGHSFRBCOIJTPYNEURPIGKQGPSXUGNELGRVZAG
SDLLOVGRTWEYZKKXNKIRWGZWXWRHKXFASATDWZAPZRNHTNNGQF
ZGUGXVQDQAEAHOQEADMWWXFBXECKAVIGPTKTTQFWSWPKRPSMGA
BDGMGYHAOPPRRHKYZCMFZEDELCALTBSWNTAODXYVHQNDASUFRL
YVYWQZUTEPFSFXLTZBMBQETXGXFUEBHGMJKBPNIHMYOELYZIKH
ZYZHSLTCGNANNXTUJGBYKUOJMGOGRDPKEUGVHNZJZHDUNRERBU
XFPTZKTPVQPJEMBHNTUBSMIYEGXNWQSBZMHMDRZZMJPZQTCWLR
ZNXOKBITTPSHEXWHZXFLWEMPZTBVNKNYSHCIQRIKQHFRAYWOPG
MHJKFYYBQSDPOVJICWWGGCOZSBGLSOXOFDAADZYEOBKDDTMQPA
VIDPIGELBYMEVQLASLQRUKMXSEWGHRSFVXOMHSJWWXHIBCGVIF
GWRFRFLHAMYWYZOIQODBIHHRIIMWJWJGYPFAHZZWJKRGOISUJC
EKQKKPNEYCBWOQHTYFHHQZRLFNDOVXTWASSQWXKBIVTKTUIASK
PEKNJFIVBKOZUEPPHIWLUBFUDWPIDRJKAZVJKPBRHCRMGNMFWW
CGZAXHXPDELTACGUWBXWNNZNDQYYCIQRJCULIEBQBLLMJEUSZP
RWHHQMBIJWTQPUFNAESPZHAQARNIDUCRYQAZMNVRVZUJOZUDGS
PFGAYBDEECHUXFUZIKAXYDFWJNSAOPJYWUIEJSCORRBVQHCHMR
JNVIPVEMQSHCCAXMWEFSYIGFPIXNIDXOTXTNBCHSHUZGKXFECL
YZBAIIOTWLREPZISBGJLQDALKZUKEQMKLDIPXJEPENEIPWFDLP
HBQKWJFLSEXVILKYPNSWUZLDCRTAYUUPEITQJEITZRQMMAQNLN
DQDJGOWMBFKAIGWEAJOISPFPLULIWVVALLIIHBGEZLGRHRCKGF
LXYPCVPNUKSWCCGXEYTEBAWRLWDWNHHNNNWQNIIBUCGUJYMRYW
CZDKISKUSBPFHVGSAVJBDMNPSDKFRXVVPLVAQUGVUJEXSZFGFQ
IYIJGISUANRAXTGQLAVFMQTICKQAHLEBGHAVOVVPEXIMLFWIYI
ZIIFSOPCMAWCBPKWZBUQPQLGSNIBFADUUJJHPAIUVVNWNWKDZB
HGTEEIISFGIUEUOWXVTPJDVACYQYFQUCXOXOSSMXLZDQESHXKP
FEBZHJAGIFGXSMRDKGONGELOALLSYDVILRWAPXXBPOOSWZNEAS
VJGMAOFLGYIFLJTEKDNIWHJAABCASFMAKIENSYIZZSLRSUIPCJ
BMQGMPDRCPGWKTPLOTAINXZAAJWCPUJHPOUYWNWHZAKCDMZDSR
RRARTVHZYYCEDXJQNQAINQVDJCZCZLCQWQQIKUYMYMOVMNCBVY
ABTCRRUXVGYLZILFLOFYVWFFBZNFWDZOADRDCLIRFKBFBHMAXX

Answer Submission

This is a fill-in-the-blank (final answer) problem. 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 00.

Task C\mathrm{C}: Square Decomposition

Problem Description

Decompose 20192019 into a sum of several pairwise distinct perfect squares. How many different ways are there?

Note that swapping the order is considered the same method. For example, 132+252+352=201913^{2}+25^{2}+35^{2}=2019 and 132+352+252=201913^{2}+35^{2}+25^{2}=2019 are considered the same method.

Answer Submission

This is a fill-in-the-blank (final answer) problem. 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 00.

Task D: Optimal Travel

Problem Description

China's high-speed rail network is well connected and convenient to use, and Xiaoming often travels between cities by high-speed rail.

Now, Xiaoming has another long vacation, and he plans to continue traveling by high-speed rail. This time, he plans to visit the following cities:

Shanghai, Guangzhou, Changsha, Xi'an, Hangzhou, Jinan, Chengdu, Nanjing, Kunming, Zhengzhou, Tianjin, Taiyuan, Wuhan, Chongqing, Nanchang, Changchun, Shenyang, Guiyang, Fuzhou.

Xiaoming plans to start from Beijing, visit each of the above cities exactly once, and finally return to Beijing. In each city (except Beijing), Xiaoming stays for at least 2424 hours. When Xiaoming decides to travel from one city to another, he only chooses cities that have a direct high-speed rail connection, and he will not transfer in the middle.

The attached file trip.txt contains the train trips that Xiaoming can choose. Xiaoming will not choose other trips.

Xiaoming departs at 12:00 noon on day 11. How many minutes are needed at minimum for Xiaoming to visit each of the above cities exactly once and finally return to Beijing? (Note that the unit is minutes. Also note that in cities other than Beijing he must stay at least 2424 hours, i.e. at least 14401440 minutes.)

Answer Submission

This is a fill-in-the-blank (final answer) problem. 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 00.

Task E: Dice Manufacturing

Problem Description

Dice are commonly used tools in games. A die is a regular hexahedron (cube). Its six faces are labeled with 11 to 66 pips, one of each. Usually, the pips from 11 to 66 look like the figure below.

Among them, the shapes of 11, 44, and 55 remain unchanged after rotations by 9090^\circ, 180180^\circ, or 270270^\circ, while the shapes of 22, 33, and 66 remain unchanged after a 180180^\circ rotation.

Xiaoming wants to manufacture a batch of dice. He hopes they will be more interesting: he wants any two dice he makes to be different under rotation. What is the maximum number of dice he can make?

Answer Submission

This is a fill-in-the-blank (final answer) problem. 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 00.

Input Format

Input a capital letter indicating which task it is.

Output Format

Output the answer corresponding to the given task label.

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