#abc292b. B - Yellow and Red Card
B - Yellow and Red Card
Score : points
问题描述
名编号为 到 的球员将进行一场足球比赛。
当一名球员犯规时,该球员将收到一张 黄牌 或 红牌。
满足以下任一条件的球员将被 罚下场:
- 累计获得两张黄牌。
- 收到一张红牌。
一旦球员被罚下场,该球员将不再收到任何牌。
你将观看这场比赛。最初,所有球员都没有收到任何牌。
将会有 个事件。正确回答在这些事件中提出的问题。
有三种类型的事件,其格式从输入中给出为 c x
,其中 为 、 或 。事件如下。
1 x
: 球员 收到一张黄牌。2 x
: 球员 收到一张红牌。3 x
: 询问你球员 是否已被罚下场。回答Yes
或No
。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
players numbered to will play a soccer game.
When a player commits an offense, that player will receive a yellow card or a red card.
A player who satisfies one of the following conditions will be removed from the game.
- Accumulates two yellow cards.
- Receives a red card.
Once a player is removed, that player will no longer receive any cards.
You will watch this game. Initially, the players have not received any cards.
There will be events. Correctly answer the questions asked in the events.
There are three kinds of events, which are given in the format c x
from the input, where is , , or . The events are as follows.
1 x
: Player receives a yellow card.2 x
: Player receives a red card.3 x
: You are asked whether player has been removed from the game. AnswerYes
orNo
.
Constraints
- in all events.
- There is at least one event of the third kind.
- A player who has been removed will no longer receive any cards.
- All values in the input are integers.
Input
The input is given from Standard Input in the following format, where denotes the -th event.
Each event is in one of the following formats:
1
2
3
Output
Print lines, where is the number of events of the third kind in the input.
The -th line should contain Yes
if, for the -th event of the third kind, player has been removed from the game, and No
otherwise.
Sample Input 1
3 9
3 1
3 2
1 2
2 1
3 1
3 2
1 2
3 2
3 3
Sample Output 1
No
No
Yes
No
Yes
No
Here are all the events in chronological order.
In the -st event, you are asked whether player has been removed from the game. Player has not been removed, so you should print No
.
In the -nd event, you are asked whether player has been removed from the game. Player has not been removed, so you should print No
.
In the -rd event, player receives a yellow card.
In the -th event, player receives a red card and is removed from the game.
In the -th event, you are asked whether player has been removed from the game. Player has been removed, so you should print Yes
.
In the -th event, you are asked whether player has been removed from the game. Player has not been removed, so you should print No
.
In the -th event, player receives a yellow card and is removed from the game.
In the -th event, you are asked whether player has been removed from the game. Player has been removed, so you should print Yes
.
In the -th event, you are asked whether player has been removed from the game. Player has not been removed, so you should print No
.
update @ 2024/3/10 12:10:37