#include <stdio.h>
#include <stdlib.h>
#include <time.h>
//dai4kai
void shuffle(int [][13]);
void print_trump(int [][13],int*,int*);
int main(void) {
int deck[4][13]={0};
int trump_mark[4]={100,200,300,400};
int trump_num[13]={1,2,3,4,5,6,7,8,9,10,11,12,13};
shuffle(deck);
print_trump(deck,trump_mark,trump_num);
return 0;
}
void shuffle(int deck[][13]){
int count=0;
while(count<52){
if(deck[m][n]==0){
deck[m][n]=count+1;
count++;
}
}
}
void print_trump(int deck[][13],int trump_mark[4],int trump_num[13]){
int i,m,n;
for(i=0;i<52;i++){
for(m=0;m<4;m++){
for(n=0;n<13;n++){
if(deck[m][n]==i+1){
if(trump_mark
[m
]==100) printf("100-%d\n",trump_num
[n
]); else if(trump_mark
[m
]==200) printf("200-%d\n",trump_num
[n
]); else if(trump_mark
[m
]==300) printf("300-%d\n",trump_num
[n
]); else if(trump_mark
[m
]==400) printf("400-%d\n",trump_num
[n
]); }
}
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHRpbWUuaD4KLy9kYWk0a2FpCnZvaWQgc2h1ZmZsZShpbnQgW11bMTNdKTsKdm9pZCBwcmludF90cnVtcChpbnQgW11bMTNdLGludCosaW50Kik7CmludCBtYWluKHZvaWQpIHsKaW50IGRlY2tbNF1bMTNdPXswfTsKaW50IHRydW1wX21hcmtbNF09ezEwMCwyMDAsMzAwLDQwMH07CmludCB0cnVtcF9udW1bMTNdPXsxLDIsMyw0LDUsNiw3LDgsOSwxMCwxMSwxMiwxM307CnNodWZmbGUoZGVjayk7CnByaW50X3RydW1wKGRlY2ssdHJ1bXBfbWFyayx0cnVtcF9udW0pOwpyZXR1cm4gMDsKfQp2b2lkIHNodWZmbGUoaW50IGRlY2tbXVsxM10pewppbnQgY291bnQ9MDsKc3JhbmQodGltZShOVUxMKSk7CndoaWxlKGNvdW50PDUyKXsKaW50IG09cmFuZCgpJTQ7CmludCBuPXJhbmQoK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