649 人解决,875 人已尝试。
739 份提交通过,共有 2726 份提交。
2.1 EMB 奖励。
单点时限: 1.0 sec
内存限制: 256 MB
lbromine
wanted to play It Takes Two, but it takes two. So he went to his friends and asked them if they had played It Takes Two.
It is known thatlbromine
has $n$ friends. When he asks a friend, the friend will only answer that he has not played or played It Takes Two with another person.Because some of his friends are forgetful,maybe some friends have played It Takes Two but say no.
lbromine
thinks that a friend has played It Takes Two only when the friend said he had played with another person or another friend oflbromine
said he had played with him.
Nowlbromine
wants to count how many friends he thinks have never played It Takes Two so that he can choose the right person to play with.
An integer $n$ in the first line indicates thatlbromine
has $n\ (1 \leq n\leq 10^5)$ friends.
The next $n$ line has two strings per line. The first string represents the friend’s name, and the second string represents the answer of the friend.
It is guaranteed that the answer oflbromine's
friends can only be No
or a person’s name (may not be a friend oflbromine
).
A person’s name only contains uppercase and lowercase letters and underscores,and the length cannot exceed $10$ characters.
no one names No
.
One integer indicates how many friendslbromine
thinks have never played It Takes Two
3 CN_Amuzi No komorebi MaverickFW MaverickFW No
1
649 人解决,875 人已尝试。
739 份提交通过,共有 2726 份提交。
2.1 EMB 奖励。