样例全过,但40分,求调
查看原帖
样例全过,但40分,求调
468872
The_43_Bachelor楼主2024/11/9 10:52
#include<bits/stdc++.h>
using namespace std;
const int N=10010;
long long n,sum=0;
bool pd=true;
string s[1010];
int main() {
//	freopen("poker.in","r",stdin);
//	freopen("poker.out","w",stdout);
	cin>>n;
	for(int i=1; i<=n; i++) {
		cin>>s[i];
		if(i==1) {
			pd=true;
		} else {
			for(int j=1; j<=sum; j++) {
				if(s[i]==s[j]) {
					pd=false;
				}
			}
		}
		if(pd==true) {
			sum++;
		}
		pd=true;
	}
	cout<<52-sum;
	return 0;
}
2024/11/9 10:52
加载中...