#include #include #include #define __STDC_FORMAT_MACROS #include void printBin(uint64_t n) { int count=0,count1=0; while (++count<=64) { if (n & ((uint64_t)1<<63)) { printf("1 "); ++count1; } else printf("0 "); n <<= 1; } printf(" count1=%d\n",count1); } void balanceSeed() { srand(time(NULL)); int r1[4]= {32,32,32,32}; const int seedNum=4; int hashSeed[seedNum][64]; for (int i=0; i0 && r1[ranVec[1]]>0) { hashSeed[ranVec[0]][j] = 1; r1[ranVec[0]]--; hashSeed[ranVec[1]][j] = 1; r1[ranVec[1]]--; } else if(r1[ranVec[0]]<0 && r1[ranVec[1]]>0) { hashSeed[ranVec[1]][j] = 1; r1[ranVec[1]]--; if(r1[ranVec[2]]>0) { hashSeed[ranVec[2]][j] = 1; r1[ranVec[2]]--; } else hashSeed[ranVec[3]][j] = 1; r1[ranVec[3]]--; } else if(r1[ranVec[0]]>0 && r1[ranVec[1]]<0) { hashSeed[ranVec[0]][j] = 1; r1[ranVec[0]]--; if(r1[ranVec[2]]>0) { hashSeed[ranVec[2]][j] = 1; r1[ranVec[2]]--; } else hashSeed[ranVec[3]][j] = 1; r1[ranVec[3]]--; } else { hashSeed[ranVec[2]][j] = 1; r1[ranVec[2]]--; hashSeed[ranVec[3]][j] = 1; r1[ranVec[3]]--; } } for (int i=0; i