帮我看看问题在哪?
查看原帖
帮我看看问题在哪?
1555964
cby123450楼主2024/11/4 22:03
#include <bits/stdc++.h>
using namespace std;
int main (){
	freopen("poker.in","r",stdin);
	freopen("poker.out","w",stdout);
	int n,s = 52;
	cin >> n;
	string a = "";
	for(int i = 1;i <= n;i++){
		string b = "",c = "";
		cin >> c;
		a += c;
		s--;
		for(int j = 2;j < i*2;j+=2){
			b += a[j];
			b += a[j+1];
			if (b == c){
				s++;
			}
		} 
	}
	cout << s;
	fclose(stdin);
	fclose(stdout);
	return 0;
} 
2024/11/4 22:03
加载中...