40分求调
查看原帖
40分求调
1066396
szm111213楼主2024/11/11 19:40
#include<bits/stdc++.h>
using namespace std;
string str[100];
int main()
{
	long long k, x = 0;
	cin >> k;
	for (int i = 0; i < k; i++) 
	{
		string n;
		cin >> n;
		bool b = 0;
		for (int j = 0; j < x; j++)
		{
			if (str[j][0] == n[0] && str[j][1] == n[1])
			{
				b = 1;
				break;
			}
		}
		if (!b)
		{
			x++;
			str[x] = n;
		}
	}
	cout << 52 - x << endl;
	return 0;
}

2024/11/11 19:40
加载中...