题解:P11137 [APC001] B - Checker
NTT__int128 · · 题解
P11137 [APC001] B - Checker题解
对于每个字符串,依次枚举每个字符,如果字符相同就把相同字符数量
代码:
#include<bits/stdc++.h>
using namespace std;
int n,a;
string s,t;
int main(){
cin>>n>>s;
while(n--){
cin>>t;
int c=0;
for(int i=0;i<s.size();i++)if(s[i]==t[i])c++;
if(c>=(s.size()+1)/2)a++;
}
cout<<a<<'\n'<<(!a?"Good job!":"Make persistent efforts.");
return 0;
}