-
Notifications
You must be signed in to change notification settings - Fork 0
/
pta1042.cpp
57 lines (48 loc) · 825 Bytes
/
pta1042.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <bits/stdc++.h>
using namespace std;
map<int,int>dit;
vector<string>card(55);
vector<int>ans(55);
char color[]={0,'S','H','C','D','J'};
void suffle();
int main()
{
int n,tem;cin>>n;
for(int k=1;k<=4;++k)
{
for(int i=1;i<=13;++i)
{
ostringstream temp;
temp<<i;
card[i+(k-1)*13]=color[k]+temp.str();
}
}
card[53]="J1";card[54]="J2";
for(int i=1;i<=54;++i)
{
cin>>ans[i];
}
for(int i=0;i<n;++i)
{
suffle();
}
for(int i=1;i<=54;++i)
{
if(i!=1)
cout<<" ";
cout<<card[i];
}
return 0;
}
void suffle()
{
vector<string>tem(55);
for(int i=1;i<=54;++i)
{
tem[ans[i]]=card[i];
}
for(int i=1;i<=54;++i)
{
card[i]=tem[i];
}
}