题目描述
按题目意思模拟即可
#include
#include
using namespace std;
int main(){
int n,pe[55];
cin>>n;
for(int i = 1;i <= 54;i++)cin>>pe[i];
string sh[55];
for(int i = 1;i <= 13;i++){
sh[i] = "S" + to_string(i);
sh[13+i] = "H" + to_string(i);
sh[26+i] = "C" + to_string(i);
sh[39+i] = "D" + to_string(i);
}
sh[53] = "J1",sh[54] = "J2";
string tem[55];
for(int i = 1;i <= n;i++){
for(int j = 1;j <= 54;j++)
tem[pe[j]] = sh[j];
for(int j = 1;j <= 54;j++)
sh[j] = tem[j];
}
for(int i = 1;i <= 54;i++){
if(i != 54) cout<<sh[i]<<" ";
else cout<<sh[i];
}
return 0;
}