谁帮我看看为啥只有10分啊?
查看原帖
谁帮我看看为啥只有10分啊?
1555964
cby123450楼主2024/11/10 22:13
#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/10 22:13
加载中...