#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void sh(int [][13]);
void print(int [][13],int*,int*);
int main(void){
int mark[4]={100,200,300,400};
int num[13]={1,2,3,4,5,6,7,8,9,10,11.12,13};
int deck[4][13]={0};
sh(deck);
print(deck,mark,num);
}
void sh(int de[][13]){
int Anum,row,Amark;
for(Anum=1;Anum<=52;Anum++){
do{
}while(de[row][Amark]!=0);
de[row][Amark]=Anum;
}
}
void print(int A[][13],int *m,int *n ){
int Bnum,Brow,Bmark;
for(Bnum=1;Bnum<=52;Bnum++){
for(Brow=0;Brow<4;Brow++){
for(Bmark=0;Bmark<13;Bmark++){
if(A[Brow][Bmark]==Bnum){
printf("%5d:%d-%d\n",Bnum
,m
[Brow
],n
[Bnum
]); }
}
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHRpbWUuaD4Kdm9pZCBzaChpbnQgW11bMTNdKTsKdm9pZCBwcmludChpbnQgW11bMTNdLGludCosaW50Kik7CmludCBtYWluKHZvaWQpewoJaW50IG1hcmtbNF09ezEwMCwyMDAsMzAwLDQwMH07CglpbnQgbnVtWzEzXT17MSwyLDMsNCw1LDYsNyw4LDksMTAsMTEuMTIsMTN9OwoJaW50IGRlY2tbNF1bMTNdPXswfTsKCXNyYW5kKHRpbWUoTlVMTCkpOwoJc2goZGVjayk7CglwcmludChkZWNrLG1hcmssbnVtKTsKCQp9CgoKdm9pZCBzaChpbnQgZGVbXVsxM10pewoJaW50IEFudW0scm93LEFtYXJrOwoJZm9yKEFudW09MTtBbnVtPD01MjtBbnVtKyspewoJCWRvewoJCQlyb3c9cmFuZCgpJTQ7CgkJCUFtYXJrPXJhbmQoKSUxMzsKCQkJfXdoaWxlKGRlW3Jvd11bQW1hcmtdIT0wKTsKCQkJZGVbcm93XVtBbWFya109QW51bTsKCX0KfQoKdm9pZCBwcmludChpbnQgQVtdWzEzXSxpbnQgKm0saW50ICpuICl7CglpbnQgQm51bSxCcm93LEJtYXJrOwoJZm9yKEJudW09MTtCbnVtPD01MjtCbnVtKyspewoJCWZvcihCcm93PTA7QnJvdzw0O0Jyb3crKyl7CgkJCWZvcihCbWFyaz0wO0JtYXJrPDEzO0JtYXJrKyspewoJCQkJaWYoQVtCcm93XVtCbWFya109PUJudW0pewoJCQkJCXByaW50ZigiJTVkOiVkLSVkXG4iLEJudW0sbVtCcm93XSxuW0JudW1dKTsKCQkJCX0KCQkJfQoJCX0KCX0KfQoKCgoKCgoK