/* ID: mytbk921 LANG: C TASK: hamming */ #include typedef unsigned char u8; static unsigned popcount(unsigned x) { unsigned c = 0; while (x) { if (x&1) c++; x >>= 1; } return c; } static unsigned hamdist(unsigned x, unsigned y) { return popcount(x^y); } u8 s[64]; int N, B, D; int search(int i) { int t, j; if (i==N) return 1; for (t=s[i-1]+1; t<(1<0) fprintf(fout, "\n"); } else { fprintf(fout, " "); } fprintf(fout, "%d", s[i]); } fprintf(fout, "\n"); } fclose(fout); return 0; }