解题代码
#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
vector<string>chessList(n);
for (int i = 0; i < n; i++)
{
for (int j = 0; j < 8; j++)
{
string t;
cin >> t;
chessList[i] += t;
}
}
for (int i = 0; i < n; i++)
{
int times = 1;
for (int j = i - 1; j >= 0; j--)
{
if (chessList[i]==chessList[j])
{
times++;
}
}
cout << times << endl;
}
return 0;
}