#P7568. 「MCOI-05」追杀
「MCOI-05」追杀
Description
Dream SMP has players, numbered from to . Initially, every player has lives. A player is canonically alive if and only if their number of lives is non-zero.
Large wars often happen on Dream SMP, so players may kill (PvP) other players. For two canonically alive players and , if kills , then loses one life. Note that if or is not canonically alive, the kill has no effect.
In total, manhunts are recorded in chronological order, numbered , where the -th manhunt is killing .
DreamXD (player ) has unlocked the superpower of time travel. He can now choose any such that and , travel to the moment after the -th manhunt and before the -th manhunt, and then manhunt (kill) player . The case means traveling to after the -th manhunt.
Different choices of and may lead to different final sets of players who are canonically alive. For each with , DreamXD wants to know: how many pairs make the final set of canonically alive players contain exactly players?
Input Format
The first line contains two positive integers .
The next lines each contain two positive integers , meaning that at time , manhunts .
Output Format
Output one line with positive integers, where the -th integer is the number of plans such that finally there are exactly players alive (excluding Dream).
2 2
1 2
1 2
0 3 3
23 22
2 1
14 10
4 9
12 11
2 1
4 9
12 3
5 3
5 6
4 13
5 5
15 15
7 22
7 22
7 1
6 3
1 2
1 2
2 1
18 16
19 17
20 8
21 8
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 72 456 0 0
Hint
Explanation for Sample 2
This sample corresponds to the Dream SMP situation at the time (4/26/2021), and only includes canonical deaths, i.e. those in the script:
- Aug 2, 2020: Tommy killed by Dream
- Aug 2, 2020: Fundy killed by George
- Aug 2, 2020: Wilbur killed by Punz
- Aug 2, 2020: Tubbo killed by Sapnap
- Aug 2, 2020: Tommy killed by Dream
- Sep 2, 2020: Wilbur killed by Punz
- Oct 16, 2020: Tubbo killed by Techno
- Oct 16, 2020: Schlatt killed by Techno
- Oct 17, 2020: Schlatt killed by Quackity
- Nov 16, 2020: Wilbur killed by Philza
- Nov 16, 2020: Schlatt killed by Schlatt
- Dec 6, 2020: Karl killed by Karl
- Dec 14, 2020: Mexican Dream killed by Natural Causes
- Dec 14, 2020: Mexican Dream killed by Natural Causes
- Dec 14, 2020: Mexican Dream killed by Dream
- Dec 16, 2020: Quackity killed by Techno
- Jan 20, 2021: Dream killed by Tommy
- Jan 20, 2021: Dream killed by Tommy
- Mar 1, 2021: Tommy killed by Dream
- Mar 12, 2021: Connor killed by Ranboo
- Mar 23, 2021: Ponk killed by Sam
- Apr 18, 2021: Skeppy killed by Bad
- Apr 26, 2021: Foolish killed by Bad
This problem uses bundled testdata.
- Subtask 1 (5 pts): , .
- Subtask 2 (11 pts): .
- Subtask 3 (41 pts): .
- Subtask 4 (43 pts): no special constraints.
For of the testdata, , , .
Translated by ChatGPT 5
京公网安备 11011102002149号