Back to problems

Maximum XOR Product

Algorithm · Microsoft · Medium

Maximum XOR Product Medium · Bit Manipulation, Math · Company Tags · Hints For non-negative integers a, b, and n, select an integer x from the range 0 through 2^n - 1. Your goal is to make the value below as large as possible: In this expression, XOR is the bitwise exclusive-or operator. Output the largest achievable product after taking it modulo 1_000_000_007. The input consists of one line containing a, b, and n. Print the resulting maximum product modulo 1000000007.…

Checking your access…