Reference to 數碼暴龍App世代 デジモンユニバース アプリモンスターズ


In the Digimon Universe, a virus has spread across the network causing a huge malfunction in people’s devices. Assume that there are $N$ devices in the Digimon Universe, the indexes of all devices will be represented as 1, 2,...,$N$.

In order to save the world from this virus, Globemon has evolved and has 2 main abilities, “Ultimate Search” and “Clear Gaze”. These 2 abilities will respectively be named as Ability 1 and Ability 2.

Ability 1

Globemon will perform “Ultimate Search”.
Globemon will provide you 2 integers, $X$, $Y$.
Indicating that $Y$ new viruses have invaded device $X$.
You do not need to output anything for this ability.

Ability 2

Globemon will perform “Clear Gaze”.
Then Globemon will provide you with a single integer, $Z$.
Indicating that Globemon will kill all viruses located at device $Z$. You will need to output the number of viruses killed by the “Clear Gaze”.


Now, Globemon starts to perform his abilities for $Q$ times. For each ability performed you will need to output the relative information required mentioned above. You may assume that before any abilities are performed, the number of viruses on each device are 0.

After all abilities are performed, you will need to check whether or not no viruses are remaining on all devices. If yes, output “World Saved” on the last line of your output, or else output “Good Luck Humans” on the last line of your output.

Input

The first line consists of 2 integers, $N$, $Q$. Representing the number of devices and number of abilities performed.
The following $Q$ lines will be according to the format below.

If Ability 1 is performed:

3 integers will be provided 1, $X$, $Y$.
Indicating that ability 1 is performed, where Y new viruses have invaded device X.

If Ability 2 is performed:

2 integers will be provided 2, $Z$.
Indicating that ability 2 is performed, where Globemon will kill all viruses located at device $Z$.

Output

Output the requested answer stated in the question for each query.
On the final line, either output “World Saved” or “Good Luck Humans” based on the scenarios mentioned above.

Subtasks

Subtask 1: $Q$ = 0 (5 pts)
Subtask 2: Ability 1 is not performed (8 pts)
Subtask 3: Ability 2 is not performed (10 pts)
Subtask 4: For every ability 1, $X$ = 1 (15 pts)
Subtask 5: For every ability 2, $Z$ = 1 (20 pts)
Subtask 6: No additional constraints (42 pts)

Constraints

For all test cases,
$1 \le N, Q \le 10^5$
$1\le X, Z \le N$
$0 \le Y \le 10^3$

Sample Test Cases

Input Output
3 5
1 2 5
1 3 7
1 2 3
2 2
2 3
8
7
World Saved

Let’s look query by query.
1: 5 Viruses have entered Device 2
2: 7 Viruses have entered Device 3
3: 3 Viruses have entered Device 2
4: All Viruses on device 2 are killed
5: All viruses on device 3 are killed
After all, there are no viruses left on any devices

7 11
2 5
1 5 10
1 7 2
2 5
1 1 1
2 7
2 1
1 6 9
1 2 3
1 2 5
2 2
0
10
2
1
8
Good Luck Humans
Click to copy.

Scoring: Per Subtask
Authored by wy23918
Appeared in WYHK 2026 Mini Comp 0 🗣️🙊🇫🇷🥖🤮 🟥🟦3️⃣2️⃣1️⃣🎊 8️⃣0️⃣🧙‍♀️ 🇩🇪🏙️🌍🦠🧑‍💻💃🌧️