| UTPC Spring 2026 Open Contest |
|---|
| Finished |
Deep-space explorers on Gliese-581g have recovered multiple ancient alien data cores. Its security protocol uses a folding 64-bit hash to verify user identities.
The hash will take in an unsigned $$$64$$$-bit integer $$$x$$$, that is, an integer in the range $$$0 \le x \lt 2^{64}$$$.
First define $$$$$$ p(x)=\operatorname{rotl}_{64}(Mx+C,23), $$$$$$ where all arithmetic on $$$64$$$-bit integers is performed modulo $$$2^{64}$$$, and $$$$$$ M=\texttt{0x9E3779B97F4A7C15}, \qquad C=\texttt{0xD1B54A32D192ED03}. $$$$$$
Then define the hash $$$$$$ h(x)=\operatorname{lo}_{32}(p(x)) \oplus \operatorname{hi}_{32}(p(x)). $$$$$$
In the formulas above:
You will be given $$$q$$$ test cases in which you will try to break the data core's hash function.
For each test case, you are given a target unsigned $$$32$$$-bit integer $$$t$$$, that is, an integer in the range $$$0 \le t \lt 2^{32}$$$.
Output two distinct unsigned $$$64$$$-bit integers $$$a$$$ and $$$b$$$ such that the hashed values collide with each other on $$$t$$$. In other words, $$$$$$ h(a)=h(b)=t. $$$$$$
Any valid answer will be accepted.
The first line contains a single integer $$$q$$$ $$$(1 \le q \le 2\cdot 10^5)$$$, the number of test cases.
Each of the next $$$q$$$ lines contains one integer $$$t$$$ $$$(0 \le t \lt 2^{32})$$$.
For each test case, print two distinct integers $$$a$$$ and $$$b$$$ $$$(0 \le a,b \lt 2^{64})$$$ such that $$$$$$ h(a)=h(b)=t. $$$$$$
If there are multiple valid answers, print any.
1587262709
8878460273963937783 14508321764111559159
As an example, $$$h(10)=\texttt{0x521ACDE7}=1377488359$$$.
| Name |
|---|


