#include <random>
#include <iostream>
#include <algorithm>
//#include <time.h>
const int N=6;
const int X=10000;
const int C=10000;
void test(::std::vector<int>& c, unsigned int seed, unsigned int (*f)(::std::mt19937&))
{
::std::mt19937 g(seed);
int n[N] ={};
for( int i=0; i < X; ++i )
{
n[ f(g) ]++;
}
int r[N] = {};
for( int i=0; i < N; ++i ) r[i] = i;
::std::sort(r, r+N, [&](int a, int b){ return n[a] > n[b]; });
for( int i=0; i < N; ++i )
{
c[r[i]] += N/2 - i;
}
}
int main(int, char**)
{
// ::std::mt19937 rd(static_cast<unsigned int>(time(NULL)));
::std::random_device rd;
::std::vector<int> c1(N), c2(N);
for( int j=0; j < C; ++j )
{
unsigned int s = rd();
test(c1, s, [](::std::mt19937& g){ return g()%N; });
test(c2, s, [](::std::mt19937& g){ return ::std::uniform_int_distribution<unsigned int>(0, N-1)(g); });
}
for( int i=0; i < N; ++i )
{
::std::cout << i << ": " << c1[i] << ", " << c2[i] << ::std::endl;
}
return 0;
}
CiNpbmNsdWRlIDxyYW5kb20+CiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPGFsZ29yaXRobT4KLy8jaW5jbHVkZSA8dGltZS5oPgoKY29uc3QgaW50IE49NjsKY29uc3QgaW50IFg9MTAwMDA7CmNvbnN0IGludCBDPTEwMDAwOwoKdm9pZCB0ZXN0KDo6c3RkOjp2ZWN0b3I8aW50PiYgYywgdW5zaWduZWQgaW50IHNlZWQsIHVuc2lnbmVkIGludCAoKmYpKDo6c3RkOjptdDE5OTM3JikpCnsKICAgIDo6c3RkOjptdDE5OTM3IGcoc2VlZCk7CiAgICBpbnQgbltOXSA9e307CiAgICBmb3IoIGludCBpPTA7IGkgPCBYOyArK2kgKQogICAgewogICAgICAgIG5bIGYoZykgXSsrOwogICAgfQogICAgaW50IHJbTl0gPSB7fTsKICAgIGZvciggaW50IGk9MDsgaSA8IE47ICsraSApIHJbaV0gPSBpOwogICAgOjpzdGQ6OnNvcnQociwgcitOLCBbJl0oa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