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

8523번 - Dice 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB27161562.500%

문제

Bytie likes playing with his m dice. His dice are not really typical: each of them has n faces with the respective faces containing 1, 2, ..., n pips. Bytie considers different arrangements of the dice in which the numbers of pips on the top of the dice form a sequence that is non-decreasing. Among two such arrangements, the one that has a smaller number of pips at the leftmost position where they differ is considered worse.

Bytie is now enumerating all such arrangements starting from the worst arrangement with 1 pip on the top faces of all the dice. He is willing to reach the k-th arrangement in this sequence. Help him check if he made it correctly.

Write a program that

  • reads the numbers m, n and k
  • writes the k-th sequence in the desired order.

입력

The only line of input contains three positive integers m, n and k (1 ≤ m ≤ 20, 4 ≤ n ≤ 50, 1 ≤ k ≤ 1018).

출력

Your program should output m positive integers: the numbers of pipes on the top faces of the dice in the requested k-th arrangement. You may assume that the input is constructed in such way that this requested arrangement exists.

제한

예제 입력 1

3 4 3

예제 출력 1

1 1 3

힌트

출처

Camp > POI Training Camp > ONTAK 2007 4번

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

출처

대학교 대회

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

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