#include<stdio.h>
int main(){
char hashtable[5] = {'S', 'H', 'C', 'D', 'J'};
int n, t;
scanf("%d", &n);
int a[55], b[55], c[55];
for(int i = 1; i < 55; i++){
scanf("%d", &a[i]);
b[i] = i;
}
while(n--){
for(int i = 1; i < 55; i++){
c[a[i]] = b[i];
}
for(int i = 1; i < 55; i++){
b[i] = c[i];
}
}
for(int i = 1; i < 55; i++){
printf("%c%d", hashtable[(c[i] - 1) / 13], (c[i] - 1) % 13 +1);
if(i != 54) printf(" ");
}
return 0;
}
1042 Shuffling Machine (20分)
最新推荐文章于 2020-06-27 15:16:44 发布