萌新求助:RE三个点,70分

学术版

[这是](https://www.luogu.com.cn/record/40392249)提交记录
by xtracer @ 2020-10-24 10:53:24


就这?
by xqh07 @ 2020-10-24 13:01:45


@[xtracer](/user/341049) 这么简单个题这么麻烦
by so_kids @ 2020-10-24 14:37:49


[提交链接](https://www.luogu.com.cn/record/40411321) 附上代码 ```cpp #include<iostream> #include<cmath> #include<cstring> #include<cstdio> using namespace std; int n,cnt[110],maxnl=-1,maxn[110],k; char name[110][21],xinhao[210]; int main() { cin>>n; for(int i=1;i<=n;i++){ cin>>name[i]>>xinhao;//cin自动分行 for(int j=0;j<strlen(xinhao);j++){//依次判断(一个一个找就可以无视重叠) if(xinhao[j]=='s'&&xinhao[j+1]=='o'&&xinhao[j+2]=='s') cnt[i]++; } if(cnt[i]==maxnl){//如果与目前最大的相等就加上 maxn[++k]=i; } if(cnt[i]>maxnl){//不相等就重置 k=0; maxnl=cnt[i]; maxn[++k]=i; } } for(int j=1;j<=k;j++) { for(int i=0;i<strlen(name[maxn[j]]);i++) cout<<name[maxn[j]][i]; cout<<" "; } cout<<endl; cout<<maxnl; return 0; } ```
by so_kids @ 2020-10-24 15:03:22


**谢谢各位大佬**
by xtracer @ 2020-10-24 17:28:58


|