| CodEMI 2025 |
|---|
| Finished |
Welcome to the Binary Mirror Maze!
We start with an empty bit string: $$$s_0$$$ = ""
Then, for each integer $$$i \geq 0$$$, construct the next string as follows: $$$s_{i+1} = s_i +$$$ "$$$0$$$" + mirror($$$s_i$$$) Here, mirror(s) means that we first reverse the string s, and then invert each bit (swap every "$$$0$$$" with "$$$1$$$" and every "$$$1$$$" with "$$$0$$$").
For example:
Your task is: Given an integer k, find the k-th character (1-indexed) of the string t.
In the first line you will be given an integer $$$T (1 \le T \le 10^5)$$$ the number of test cases. Each of the next $$$T$$$ following lines you will be given a single integer $$$k(1 \le k \le 10^{18})$$$.
For each integer $$$k$$$ output the $$$k-th$$$ caracter in the infinitely long string $$$t$$$.
5 2 9 6 4 5
0 0 1 0 0
| Name |
|---|


