#P10552. [THUPC 2024 决赛] 警钟长鸣

[THUPC 2024 决赛] 警钟长鸣

Problem Description

The twice-a-year THUPC is here again, and Little Z has brought out his signature skill—the flashy “sign-in” problem at the end. In previous years, the sign-in problem was always solved quickly right after the contest started. This time, Little Z decided to do something different: “If I deliberately make the sign-in problem super cryptic, so contestants have to scratch their heads for even a little while at the beginning, wouldn’t that be great?”

He acted right away. Little Z carefully designed a whole set of fancy misdirection tricks. Looking at the final finished problem, he felt extremely proud. He even started imagining: soon after the contest begins, contestants stare at the problem with no clue, the venue becomes completely silent, and the scoreboard stays dead quiet...

With this sense of “harvest joy,” Little Z arrived at the contest venue on the competition day. However, when the start signal sounded, the venue was filled with waves of whispering. Little Z walked over and found that the tone and mood of the discussions were definitely not what normal problem discussions should sound like—many people even burst into laughter.

“Strange, did something go wrong with my problem?” Little Z opened the scoreboard in confusion, only to see the number of accepted submissions for this problem rising rapidly—faster than even previous sign-in problems! “No, that can’t be!” With trembling hands, Little Z opened the problem and switched back and forth between pages. Suddenly, what he saw made him freeze on the spot.

Yes, you guessed it right. Little Z made a serious mistake during the problem-setting process, allowing contestants to pass this problem with ease! After he recovered a bit from the shock of realizing his mistake, Little Z decided to fix it immediately. However, after thinking calmly, Little Z suddenly realized a fact like a bolt from the blue: he had already made an irreparable mistake!

To be honest, mistakes in contest problems are not rare. Most common issues—such as those in the statement, testdata, judging data, judging configuration, and so on—can be fixed in time during the contest to minimize losses. But Little Z’s mistake hit the most fatal point: contestants had already obtained information they should not have obtained, information sufficient to let them solve the problem easily. At this point, it was too late; no effort could hide the fact that Little Z had caused a huge disaster.

“Ah~” Little Z felt the world spinning and nearly fainted.

What happened afterward, and how the mess was handled, has become blurry in Little Z’s memory. Even today, the details of this legendary story have long been lost. After staying silent for a long time, Little Z finally decided to learn from the pain and, after some artistic adaptation, tell this story to the world as a warning, so that the alarm bells will always ring.

Input Format

There is no input.

Output Format

Output what this problem is supposed to output. Note that the output of this problem is unique and deterministic.

Hint

Because this problem requires directly outputting the answer, the sample output could be used to pass the problem, so it is not shown in the statement.

Staff members are asked to check carefully before the contest, and do not accidentally send the sample to contestants.

Source and Acknowledgements

From the THUPC2024 (Tsinghua University Student Programming Contest and Invitational Contest) Finals. Thanks to THUSAA for providing the problem.

For data, statement, reference solution, editorial, etc., please refer to the official THUPC repository: https://thusaac.com/public.

Translated by ChatGPT 5