#P8728. Multi-Problem Contest: Five Challenges
Multi-Problem Contest: Five Challenges
Multi-Problem Contest: Five Challenges
This contest consists of five independent tasks. For each task, you are required to output a single integer answer on its own line. Do not print any extra characters or spaces.
Problem A: Beautiful \(2\)
Description: Little Blue loves the digit \(2\). In the years between 1 and 2020 (inclusive), count how many years contain the digit \(2\) in their decimal representation.
Answer Submission: Output a single integer which is the computed count.
Problem B: Diffusion
Description: Little Blue starts with an infinite grid which is all white except for four black cells located at \((0,0)\), \((2020,11)\), \((11,14)\) and \((2000,2000)\). Every minute, each black cell spreads to its four adjacent cells (up, down, left, right). After \(2020\) minutes, determine the total number of black cells.
Answer Submission: Output a single integer which is the total count.
Problem C: Divisors of Factorial
Description: Given \(n! = 1 \times 2 \times 3 \times \cdots \times n\), compute the number of divisors of \(100!\). In other words, if the prime factorization of \(100!\) is \(\prod_{i}p_i^{a_i}\), you need to output \(\prod_{i}(a_i+1)\).
Answer Submission: Output a single integer representing the number of divisors.
Problem D: Essentially Increasing Subsequences
Description: In a string, a subsequence is called increasing if the characters (in order) are in strictly ascending order (according to their ASCII values). Two subsequences are considered essentially the same if their character sequences are identical, regardless of the positions chosen. Given a 200-character lowercase string (provided below in four lines), compute the number of essentially different increasing subsequences.
tocyjkdzcieoiodfpbgcncsrjbhmugdnojjddhllnofawllbhf iadgdcdjstemphmnjihecoapdjjrprrqnhgccevdarufmliqij gihhfgdcmxvicfauachlifhafpdccfseflcdgjncadfclvfmad vrnaaahahndsikzssoywakgnfjjaihtniptwoulxbaeqkqhewl
Answer Submission: Output a single integer which is the count of unique increasing subsequences.
Problem E: Toy Snake
Description: Little Blue has a toy snake consisting of 16 square segments labeled 1 through 16. He wants to fold this snake into a 4 × 4 box (cells labeled A to P, one per cell). Adjacent segments of the snake must occupy adjacent cells (either in a straight line or bending at 90°). Two arrangements are considered different if there is any segment that occupies a different cell. Compute the total number of distinct ways to place the snake in the box.
Answer Submission: Output a single integer representing the total number of arrangements.
Note: Your program should output exactly 5 lines. The first line is the answer for Problem A, the second line for Problem B, and so on.
inputFormat
There is no input for this problem.
outputFormat
Output 5 lines. Each line contains a single integer answer corresponding to Problems A, B, C, D, and E respectively.
sample
563
24694503
78002501713920000
5333
184
</p>