#include <stdio.h>
char split_lookup[] = {
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4
};
int bit_count(unsigned char n) {
return split_lookup[n&0xF] + split_lookup[n>>4];
}
int main(void) {
for (int i = 0 ; i != 256 ; i++) {
int count = 0;
for (int p = 0 ; p != 8 ; p++) {
if (i & (1 << p)) {
count++;
}
}
if (bit_count(i) != count) {
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpjaGFyIHNwbGl0X2xvb2t1cFtdID0gewoJMCwgMSwgMSwgMiwgMSwgMiwgMiwgMywgMSwgMiwgMiwgMywgMiwgMywgMywgNAp9OwoKaW50IGJpdF9jb3VudCh1bnNpZ25lZCBjaGFyIG4pIHsKCXJldHVybiBzcGxpdF9sb29rdXBbbiYweEZdICsgc3BsaXRfbG9va3VwW24+PjRdOwp9CgppbnQgbWFpbih2b2lkKSB7Cgpmb3IgKGludCBpID0gMCA7IGkgIT0gMjU2IDsgaSsrKSB7CiAgICBpbnQgY291bnQgPSAwOwogICAgZm9yIChpbnQgcCA9IDAgOyBwICE9IDggOyBwKyspIHsKICAgICAgICBpZiAoaSAmICgxIDw8IHApKSB7CiAgICAgICAgICAgIGNvdW50Kys7CiAgICAgICAgfQogICAgfQogICAgaWYgKGJpdF9jb3VudChpKSAhPSBjb3VudCkgewogICAgICAgIHByaW50ZigiQmFkOiAlZFxuIiwgaSk7CiAgICB9Cn0KCgoJcmV0dXJuIDA7Cn0K