请问这还用解释吗?
#include <bits/stdc++.h>
using namespace std;
int n, h[4][13], ans;
string s;
int main()
{
scanf("%d", &n);
while (n--)
{
cin >> s;
char a = s[0], b = s[1];
int c;
if (b == 'T') c = 9;
else if (b == 'J') c = 10;
else if (b == 'Q') c = 11;
else if (b == 'K') c = 12;
else if (b == 'A') c = 0;
else c = b - 49;
if (a == 'C') h[0][c]++;
else if (a == 'D') h[1][c]++;
else if (a == 'S') h[2][c]++;
else h[3][c]++;
}
for (int i = 0; i < 4; i++)
for (int j = 0; j < 13; j++) ans += !h[i][j];
printf("%d", ans);
return 0;
}