Multiplication
Time limit2sMemory limit512 MB
Given an even n, output n distinct numbers so that after multiplying by a secret odd x mod 2^31, the judge returns half of the products, and you must recover x.
- Level
Hard8 of 10
- Topics
- Math, Number theory, Bit manipulation, Probability
- Solved
- No attempts yet
Problem
This is an interactive problem. The jury has chosen a secret odd number between and inclusive. Your task is to guess it.
The jury gives you an even number . You must output exactly distinct integers between and inclusive. The jury multiplies each of these numbers by and takes the result modulo . Then the jury picks a random subset of these products of size , with every subset equally likely, and returns it to you in random order. After that, you output the correct value of .
In each test, is fixed in advance and does not change.