Logo
(追記) (追記ここまで)

15936번 - Hypercube 다국어

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

문제

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

힌트

출처

Olympiad > Romanian Master of Informatics > Romanian Master of Informatics 2014 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /