|
|
|
|
|
by biobot
5533 days ago
|
|
There are at most 2 solutions:
if m XOR d = a then either m+d = a or m+d = a+N. With the combination of m-d = b, you will find m and d. If both of them satisfied ( remember m and d are bounded by 1 and N) then we actually have two solutions. |
|
Sequence is [1, 2, 3, 4, 6, 6, 7, 8, 9, 10] so m = 5 and d = 6
So three different combinations, within N, that obey the two constraints