#include <stdio.h>
#include<stdlib.h>
#include<time.h>
void shuffle(int [][13]);
void print_trump(int [][13], int*, int*);
int main(void) {
int deck[4][13];
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 g[4][13]){
int a,b,c,d,e,i,j,r;
for(i=1; i<=52; i++){
r=r%52;
a=i%13;
b=i/13;
for(j=1;j<i;j++){
d=j%13;
e=j/13;
if(g[e][d]==r){
c++;
}
}
if(c>0){
i--;
}else{
g[b][a]=r;
}
}
}
void print_trump(int a[][13], int b[4], int c[13]){
int z,u,q;
for(z=1;z<=52;z++){
for(u=0;u<=3;u++){
for(q=0;q<=12;q++){
if(z==a[u][q]){
}
}
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlPHN0ZGxpYi5oPgojaW5jbHVkZTx0aW1lLmg+Cgp2b2lkIHNodWZmbGUoaW50IFtdWzEzXSk7CnZvaWQgcHJpbnRfdHJ1bXAoaW50IFtdWzEzXSwgaW50KiwgaW50Kik7CgppbnQgbWFpbih2b2lkKSB7CiBpbnQgZGVja1s0XVsxM107CiBpbnQgdHJ1bXBfbWFya1s0XT17MTAwLDIwMCwzMDAsNDAwfTsKIGludCB0cnVtcF9udW1bMTNdPXsxLDIsMyw0LDUsNiw3LDgsOSwxMCwxMSwxMiwxM307CgpzaHVmZmxlKGRlY2spOwoKcHJpbnRfdHJ1bXAoZGVjayx0cnVtcF9tYXJrLHRydW1wX251bSk7CgogcmV0dXJuIDA7Cn0KCnZvaWQgc2h1ZmZsZShpbnQgZ1s0XVsxM10pewppbnQgYSxiLGMsZCxlLGksaixyOwoKZm9yKGk9MTsgaTw9NTI7IGkrKyl7CgogICAgciA9IHJhbmQoKSUxMDA7IAkKCiAgICByPXIlNTI7CgogICAgYT1pJTEzOwoKICAgIGI9aS8xMzsKCiAgICBmb3Ioaj0xO2o8aTtqKyspewogICA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