luogu#P4922. [MtOI2018] 崩坏3?非酋之战!
[MtOI2018] 崩坏3?非酋之战!
Background
The original statement was too ugly, so it was modified by disangan233 on 2019/09/26.
During the summer vacation of 2018, disangan233 grinded Honkai 3rd for the whole summer, and his account finally reached level ! He finally grinded his “Gyakushin Miko (逆神巫女)” to S rank!
To celebrate Honkai 3rd reaching APP Store Top1, miHoYo handed out Expansion Supply Cards to all players on the server.
After sending "怒 grass 大伟出奇迹!" in the “Xuánxué233 (玄学233)” chatroom, then… he single-pulled Herrscher Kiana (律化娜).

Problem Description
In Honkai 3rd, there is a place called the Schicksal Base, where Valkyries will throw a party fight enemies inside the base.
The Valkyries’ attack power is , and they will fight to defend resources.
There is boss in the Schicksal Base. The boss has health , and the boss will not attack the Valkyries.
Now there is a road of length . One end is the boss, and the other end is the resources that the Valkyries must protect. At the beginning, the boss will move toward the resources at a speed of unit length per second. The Valkyries need to protect the resources, so they must attack the boss.
We divide the whole road into cells. Initially, the resources are in cell , the Valkyrie is in cell , and the boss is in cell .
Because the Valkyrie’s arms are too short, she will attack the boss only when the boss reaches the cell where the Valkyrie currently is. After attacking, the Valkyrie will retreat by one cell.
The Valkyrie has the following attack methods (each cell can use only one attack method).
- Skill: deal damage, and give the boss stack of burning buff. In each subsequent second, the boss additionally takes damage. (Burning buff stacks.)
- Dodge: deal damage, and time-stop the boss for . (During these , the boss cannot move and still takes burning damage.)
- Ultimate: deal damage, and time-stop the boss for .
- Branch attack: deal damage, and apply space-time slow. The time for the boss to pass through each cell increases by .
- Ai-chan’s bomb: give the boss stack of burning buff, and make the boss enraged, movement speed .
- Judah’s Oath: deal damage. If the boss has a burning buff, reduce it by stack. Time-stop the boss for .
- Otto’s Light: deal damage. If the boss has a burning buff, clear the buff. Time-stop the boss for .
- Herrscher’s Power: deal damage, and increase the boss’s movement speed by .
Now you are given all the information. Help the newbie disangan233 calculate whether his Valkyrie can defeat the boss before the boss touches the resources.
If she can, output the cell index that is farthest from the resources when the boss dies. If she cannot, output the maximum damage dealt to the boss.
Input Format
The input has lines.
Line contains positive integer .
Line contains positive integers, the boss’s health and the Valkyrie’s attack power .
Output Format
The output has lines.
Line outputs the cell index that is farthest from the resources when the boss dies, or the maximum total damage .
If the boss dies, output Tech Otakus Save The World! on line .
If the boss reaches the cell where the resources are, output MiHoYo Was Destroyed! on line .
Note: The testdata guarantees that there is no case where the boss dies on the resources cell.
1
1000 100
120
MiHoYo Was Destroyed!
10
1000 0
0
MiHoYo Was Destroyed!
10
198 100
2
Tech Otakus Save The World!
3
23333 100
440
MiHoYo Was Destroyed!
100
19260817 2330
99
Tech Otakus Save The World!
Hint
Sample Explanation
Use Skill at the start, then use Ultimate.
Sample Explanation
Use Skill at the start, then use Ultimates.
Subtasks
For of the data, it is guaranteed that:
For of the data, it is guaranteed that:
For of the data, it is guaranteed that:
For of the data, it is guaranteed that:
For of the data, it is guaranteed that:
$$n\leq 10,000 \qquad atk\equiv 0(\bmod\ 10)\qquad atk\leq {10}^6\qquad \max Atk\leq 2^{64}-1$$Source
Problem setter: disangan233
Problem verifier: CYJian
72679
Translated by ChatGPT 5