P28235 [洛谷] [MtOI2018] Honkai Impact 3rd? The Battle of the Unlucky!
提高+
题目描述

Background

The original problem statement was too ugly and was modified by disangan233 on September 26, 2019.

During the summer of 2018, disangan233 played Honkai Impact 3rd all summer long, and his account finally reached level 50! He finally managed to get his Inverse God Miko to S rank!

To celebrate Honkai Impact 3rd reaching the top of the App Store, Mihoyo gave all players 5 expansion supply cards.

After sending "Angry grass Dawei for a miracle!" in the mystical 233 chatroom, he... pulled out律化娜 in a single draw.

Screenshot_20180804-124812.png

Problem Description

In Honkai Impact 3rd, there is a place called the Herrscher Base where Valkyries will partyand fight against enemies.

The Valkyries have an attack power of $atk$, and they will engage in a resource protection battle!

There is 1 boss in the Herrscher Base, with a health of $hp$, and the boss does not attack the Valkyries.

There is a road of length $n$, with the boss at one end and the resource that the Valkyries need to protect at the other end. Initially, the boss will move towards the resource by 1 unit length per second. The Valkyries need to protect the resource, so they must attack the boss.

The entire road is divided into $n$ grids, with the resource at the $n$-th grid, the Valkyries at the 1st grid, and the boss at the 0th grid.

Because the Valkyries' arms are too short, they can only attack the boss when he reaches their current grid, after which the Valkyries will retreat by one grid.

The Valkyries have the following 8 attack methods (each grid can only use one attack method):

  • Skill, deals $80\%$ damage, and gives the boss 1 layer of burning buff, which causes an additional $10\%$ damage every second. (Burning buff can stack)
  • Evasion, deals $70\%$ damage, and pauses time for the boss for $5s$. (The boss cannot move during these $5s$ but will still take burning damage)
  • Ultimate, deals $120\%$ damage, and pauses time for the boss for $5s$.
  • Branch Attack, deals $70\%$ damage, and slows down the boss's time, increasing the time the boss takes to pass each grid by $1s$.
  • Ai-chan's Bomb, gives the boss 1 layer of burning buff, and makes the boss angry, increasing his speed by $50\%$.
  • Herrscher's Oath, deals $60\%$ damage, and if the boss has a burning buff, it reduces by 1 layer, pausing time for the boss for $4s$.
  • Otto's Light, deals $10\%$ damage, and if the boss has a burning buff, it clears the buff, pausing time for the boss for $10s$.
  • Herrscher's Power, deals $80\%$ damage, and doubles the boss's movement speed.

Given all the information, help disangan233 calculate whether his Valkyries can defeat the boss before he touches the resource.

If they can, output the farthest grid number from the resource when the boss dies. If not, output the maximum damage dealt to the boss.

Input Format

The input consists of 2 lines.

The first line contains 1 positive integer $n$.

The second line contains 2 positive integers, representing the boss's health $hp$ and the Valkyries' attack power $atk$.

Output Format

The output consists of 2 lines.

The first line outputs the farthest grid number from the resource when the boss dies or the maximum damage value $\max$.

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

If the boss reaches the resource grid, output "MiHoYo Was Destroyed!" on the second line.

Note: The data guarantees that there will be no situation where the boss dies at the resource grid.

Sample Input and Output

Input Sample #1

1
1000 100

Output Sample #1

120
MiHoYo Was Destroyed!

Input Sample #2

10
1000 0

Output Sample #2

0
MiHoYo Was Destroyed!

Input Sample #3

10
198 100

Output Sample #3

2
Tech Otakus Save The World!

Input Sample #4

3
23333 100

Output Sample #4

440
MiHoYo Was Destroyed!

Input Sample #5

100
19260817 2330

Output Sample #5

99
Tech Otakus Save The World!

Notes/Hints

Sample Explanation #3

Start with 1 skill, followed by 1 ultimate.

Sample Explanation #4

Start with 1 skill, followed by 2 ultimates.

Subtasks

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

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

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

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

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

$$ n\leq 1,000 \qquad \max Atk\leq 2^{63}-1 $$

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

$$ n\leq 5,000 \qquad \max Atk\leq 2^{63}-1 $$

For $100\%$ of the data, it is guaranteed:

$$ n\leq 10,000 \qquad atk\equiv 0(\bmod\ 10)\qquad atk\leq 10,000\qquad \max Atk\leq 2^{64}-1 $$

Problem Source

MtOI2018 Lost Home Water Problem Contest T4

Problem Author: disangan233

Problem Tester: CYJian

72679

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1 1000 100
样例输出
120 MiHoYo Was Destroyed!