当日总结

链接:https://ac.nowcoder.com/acm/contest/19850/M
来源:牛客网

Younik挂好号之后,就去找医生了。但是她没想到,看医生居然也要排队!

于是younik可怜兮兮地站在大厅里,盯着墙上的显示屏,显示屏会不停地打出名字,如果一个人被叫到但没进去,显示屏可能会叫他很多次。

你能告诉younik她是第几个被叫到的人吗?

Ps.如果一个人被叫了两次,他还是一个人,不能算两个人。(题目数据范围为200)

include

include

include

using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin>>n;
setname;
while(n--)
{
string str;
cin>>str;
if(str=="younik")
{
name.insert(str);
cout<<name.size();
break;
}
else{
name.insert(str);
}
}
return 0;
}

posted @ 2025-11-14 23:48  lagranSun  阅读(2)  评论(0)    收藏  举报