#include <stdio.h>
#include <stdlib.h>
#define N 6
void u(int d[], int n, int k) {
if (k
< N
) printf("%d:%d/%d\n", k
+ 1, d
[k
], n
), u
(d
, n
, k
+ 1); }
void h
(int d
[], int n
) { if (n
>= 0) d
[rand() % N
]++, h
(d
, n
- 1); } void g(int d[], int k) { if (k >= 0) d[k] = 0, g(d, k - 1); }
void f(int n) {
int d[N - 1];
g(d, N - 1);
h(d, n);
u(d, n, 0);
}
#define SEED 31415926
int main() {
f(10);
f(100);
f(1000);
f(10000);
f(100000);
return 0;
}
/* end */
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCiNkZWZpbmUgTiA2CnZvaWQgdShpbnQgZFtdLCBpbnQgbiwgaW50IGspIHsKICBpZiAoayA8IE4pIHByaW50ZigiJWQ6JWQvJWRcbiIsIGsgKyAxLCBkW2tdLCBuKSwgdShkLCBuLCBrICsgMSk7Cn0Kdm9pZCBoKGludCBkW10sIGludCBuKSB7IGlmIChuID49IDApIGRbcmFuZCgpICUgTl0rKywgaChkLCBuIC0gMSk7IH0Kdm9pZCBnKGludCBkW10sIGludCBrKSB7IGlmIChrID49IDApIGRba10gPSAwLCBnKGQsIGsgLSAxKTsgfQp2b2lkIGYoaW50IG4pIHsKICBpbnQgZFtOIC0gMV07CiAgZyhkLCBOIC0gMSk7CiAgaChkLCBuKTsKICB1KGQsIG4sIDApOwogIHB1dGNoYXIoJ1xuJyk7Cn0KCiNkZWZpbmUgU0VFRCAzMTQxNTkyNgppbnQgbWFpbigpIHsKICBzcmFuZChTRUVEKTsKCiAgZigxMCk7CiAgZigxMDApOwogIGYoMTAwMCk7CiAgZigxMDAwMCk7CiAgZigxMDAwMDApOwogIHJldHVybiAwOwp9Ci8qIGVuZCAqLwo=