시간 제한메모리 제한제출정답맞힌 사람정답 비율
0.2 초 1024 MB77411550.000%

문제

The N-hypercube is an directed acyclical graph with 2N nodes tagged with numbers from 0 to 2N – 1 so that there is an arc from node x to node y if and only if x < y and a non-negative integer p exists such that x ^ y = 2p (^ operator stands for bitwise xor) .

Given N, M and K, three positive integers, you are to compute:

  1. The maximum label i of a node belonging to the N-hypercube that has an arc from i to M.
  2. The minimum label j of a node belonging to the N-hypercube that has an arc from M to j.
  3. The number of paths of length K (having K arcs) found in the N-hypercube. Because this number may be quite large, you are to compute the number modulo 100003.

입력

The first line of the input contains three numbers N, M and K, each separated by one space.

출력

The first line of the output must contain a single number, the answer for task a. The second line must contain a single number, the answer for task b. The third line must contain a single number, the answer for task c.

제한

  • 2 ≤ K ≤ N ≤ 100,000
  • 1 ≤ M ≤ 100,000,000
  • For any given number M, there is at least one arc leaving node M and one arc reaching node M.
  • The answer for task c must be computed modulo 100003.
  • ^ operator stands for bitwise xor.

예제 입력 1

4 3 2

예제 출력 1

2
7
48