CSP题解|202305-1 重复局面|100分
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;cin>>n;
map<string,int>mp;
while(n--){
//n为步数
int row=8;
string s="";
while(row--){
string temp;
cin>>temp;
s+=temp;
}
if(mp.find(s)==mp.end()){
cout<<1<<endl;
mp[s]=1;
}else{
mp[s]++;
cout<<mp[s]<<endl;
}
}
}
13行本来用getline,一直0分,换成cin就AC了...
查看10道真题和解析
