luogu#P4922. [MtOI2018] 崩坏3?非酋之战!

    ID: 3862 远端评测题 1000ms 128MiB 尝试: 0 已通过: 0 难度: 8 上传者: 标签>动态规划 DP贪心2018洛谷原创O2优化

[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 5050! He finally grinded his “Gyakushin Miko (逆神巫女)” to S rank!

To celebrate Honkai 3rd reaching APP Store Top1, miHoYo handed out 55 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 atkatk, and they will fight to defend resources.

There is 11 boss in the Schicksal Base. The boss has health hphp, and the boss will not attack the Valkyries.

Now there is a road of length nn. 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 11 unit length per second. The Valkyries need to protect the resources, so they must attack the boss.

We divide the whole road into nn cells. Initially, the resources are in cell nn, the Valkyrie is in cell 11, and the boss is in cell 00.

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 88 attack methods (each cell can use only one attack method).

  • Skill: deal 80%atk80\% atk damage, and give the boss 11 stack of burning buff. In each subsequent second, the boss additionally takes 10%atk10\% atk damage. (Burning buff stacks.)
  • Dodge: deal 70%atk70\% atk damage, and time-stop the boss for 5s5s. (During these 5s5s, the boss cannot move and still takes burning damage.)
  • Ultimate: deal 120%atk120\% atk damage, and time-stop the boss for 5s5s.
  • Branch attack: deal 70%atk70\% atk damage, and apply space-time slow. The time for the boss to pass through each cell increases by 1s1s.
  • Ai-chan’s bomb: give the boss 11 stack of burning buff, and make the boss enraged, movement speed +50%+50\%.
  • Judah’s Oath: deal 60%atk60\% atk damage. If the boss has a burning buff, reduce it by 11 stack. Time-stop the boss for 4s4s.
  • Otto’s Light: deal 10%atk10\% atk damage. If the boss has a burning buff, clear the buff. Time-stop the boss for 10s10s.
  • Herrscher’s Power: deal 80%atk80\% atk damage, and increase the boss’s movement speed by +100%+100\%.

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 22 lines.

Line 11 contains 11 positive integer nn.

Line 22 contains 22 positive integers, the boss’s health hphp and the Valkyrie’s attack power atkatk.

Output Format

The output has 22 lines.

Line 11 outputs the cell index that is farthest from the resources when the boss dies, or the maximum total damage maxAtk\max Atk.

If the boss dies, output Tech Otakus Save The World! on line 22.

If the boss reaches the cell where the resources are, output MiHoYo Was Destroyed! on line 22.

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 33

Use 11 Skill at the start, then use 11 Ultimate.

Sample Explanation 44

Use 11 Skill at the start, then use 22 Ultimates.

Subtasks

For 10%10\% of the data, it is guaranteed that:

n10maxAtk1071n\leq 10 \qquad \max Atk\leq 10^{7}-1

For 20%20\% of the data, it is guaranteed that:

n300maxAtk2321n\leq 300 \qquad \max Atk\leq 2^{32}-1

For 40%40\% of the data, it is guaranteed that:

n1,000maxAtk2631n\leq 1,000 \qquad \max Atk\leq 2^{63}-1

For 70%70\% of the data, it is guaranteed that:

n5,000maxAtk2631n\leq 5,000 \qquad \max Atk\leq 2^{63}-1

For 100%100\% 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

MtOI2018 迷途の家の水题大赛 T4

Problem setter: disangan233

Problem verifier: CYJian

72679

Translated by ChatGPT 5