#P8689. Multi-Part Result Fill-in Challenge

    ID: 21855 Type: Default 1000ms 256MiB

Multi-Part Result Fill-in Challenge

Multi-Part Result Fill-in Challenge

This contest problem consists of five independent result-fill in sub-problems. In each sub-problem, you are required to output a single integer which is the final answer. The five sub-problems are described below:

Problem A: Three Increasing Sequences

Consider a letter matrix. A three increasing sequence is defined as a sequence of three letters found in the same row, same column, or along the same $45^\circ$ diagonal, such that when read from left-to-right (or top-to-bottom), the sequence is strictly increasing. For example, in the matrix:

YQPD
BKEZ
AFYV

there are sequences such as BKZ, BEZ, AFY, AFV, AKP, DEF, etc. In the actual problem, you are given a 30-row by 50-column matrix (the file inc.txt provided in the attachments contains exactly the same text as below). Your task is to compute the total number of three increasing sequences in the given matrix.

Problem B: Optimal Travel

China’s high‐speed rail network is extensive and convenient. Xiao Ming plans a trip starting from Beijing to visit the following 18 cities (Shanghai, Guangzhou, Changsha, Xi'an, Hangzhou, Jinan, Chengdu, Nanjing, Kunming, Zhengzhou, Tianjin, Taiyuan, Wuhan, Chongqing, Nanchang, Changchun, Shenyang, Guiyang, Fuzhou) exactly once and then return to Beijing.

Important constraints:

  • In every city except Beijing, he must stay at least 24 hours (i.e. at least 1440 minutes).
  • He only takes direct high-speed trains between cities according to the schedule provided in the file trip.txt (which is attached).
  • His departure time from Beijing is 12:00 noon on day 1.

Your task is to compute the minimum number of minutes required for the complete tour.

Problem C: Dice Manufacturing

A standard die is a cube with faces numbered 1 to 6. Typically, the layouts for the numbers are such that after certain rotations the pattern remains the same. Specifically, the patterns for 1, 4, and 5 remain unchanged after rotations of $90^\circ$, $180^\circ$, and $270^\circ$, while the patterns for 2, 3, and 6 remain unchanged after a $180^\circ$ rotation.

Xiao Ming wants to manufacture dice such that any two dice are different even when rotated. Determine the maximum number of dice he can produce under this condition.

Problem D: Sequence Summation

For a positive integer $t$, there always exists an integer with exactly $t$ positive divisors. Define $S_t$ as the smallest integer with exactly $t$ divisors. For example, $S_1 = 1$, $S_2 = 2$, $S_3 = 4$, $S_4 = 6$, ...

Your task is to compute the sum $S_1 + S_2 + \cdots + S_{60}$.

Problem E: Non-square Sum Set

Xiao Ming dislikes perfect squares – not only is he avoiding picking any perfect square from $1$ to $100$, he also does not want any two numbers in his chosen set to add up to a perfect square. Determine the maximum number of numbers he can select under these conditions.

Answer Submission: This is a result fill-in problem. You only need to output the integer result for each sub-problem in the order A, B, C, D, and E, each on a separate line. Do not output any additional text.

inputFormat

This problem does not require any input.

outputFormat

Output exactly five lines. The first line is the answer for Problem A, the second line for Problem B, the third for Problem C, the fourth for Problem D, and the fifth for Problem E – all as integers.

sample

2526

10080 30 13794 50

</p>