题解
2025-08-07 15:38:24
发布于:福建
14阅读
0回复
0点赞
循环直接查找哈
#include<bits/stdc++.h>
using namespace std;
string a[56];
int main(){
int n;
int cnt=52;
cin >> n;
for(int i=1;i<=n;i++){
cin >> a[i];
bool f=true;
for(int j=1;j<i;j++){
if(a[i]==a[j]){
f=false;
}
}
if(f) cnt--;
}
cout << cnt;
}
这里空空如也
有帮助,赞一个