#include <iostream>
#include <stdint.h>
using namespace std;
int main() {
uint64_t x = 123703;
cout << hex << x << dec << endl;
const int K = 11;
unsigned char idx[K+1]; // need one extra for overwrite protection
unsigned char *dst=idx;
for (unsigned char i = 0; i < 50; i++)
{
*dst = i;
dst += x & 1;
x >>= 1;
}
for (int j = 0; j < K; j++)
cout << (int)idx[j] << " ";
cout << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RkaW50Lmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCXVpbnQ2NF90IHggPSAxMjM3MDM7CiAgICBjb3V0IDw8IGhleCA8PCB4IDw8IGRlYyA8PCBlbmRsOwoJY29uc3QgaW50IEsgPSAxMTsKICAgIHVuc2lnbmVkIGNoYXIgaWR4W0srMV07IC8vIG5lZWQgb25lIGV4dHJhIGZvciBvdmVyd3JpdGUgcHJvdGVjdGlvbgogICAgdW5zaWduZWQgY2hhciAqZHN0PWlkeDsKICAgIGZvciAodW5zaWduZWQgY2hhciBpID0gMDsgaSA8IDUwOyBpKyspCiAgICB7CiAgICAgICAgKmRzdCA9IGk7CiAgICAgICAgZHN0ICs9IHggJiAxOwogICAgICAgIHggPj49IDE7CiAgICB9CiAgICBmb3IgKGludCBqID0gMDsgaiA8IEs7IGorKykKICAgICAgICBjb3V0IDw8IChpbnQpaWR4W2pdIDw8ICIgIjsKICAgIGNvdXQgPDwgZW5kbDsKICAgIHJldHVybiAwOwp9