题解(CSP-J 2024)
2025-08-20 10:58:48
发布于:广东
2阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
const int maxn = 60;
int n;
struct node{
char type;
char num;
}a[maxn];
int main(){
cin >> n;
int cnt = 0;
for(int i = 1; i <= n; i++){
string s;
cin >> s;
a[i].type = s[0];
a[i].num = s[1];
bool f = true;
for(int j = 1; j < i; j++){
if(a[j].type == a[i].type && a[j].num == a[i].num){
f = false;
}
}
if(f) cnt++;
}
cout << 52 - cnt;
return 0;
}
这里空空如也
有帮助,赞一个