Good Samples | 프로그래밍의 벗 PivotOJ
PivotOJ

Good Samples

시간 제한: 1000ms메모리 제한: 1024MB출처: CCC 2022 SeniorBOJ 24574

문제

You are composing music for the Cool Clarinet Competition (CCC). You have been instructed to make a piece of music with exactly N notes. A note is represented as a positive integer, indicating the pitch of the note.

We call a non-empty sequence of consecutive notes in the piece a sample. For instance, (3, 4, 2), (1, 2, 3, 4, 2) and (4) are samples of 1, 2, 3, 4, 2. Note that (1, 3) is not a sample of 1, 2, 3, 4, 2. We call two samples different if they start or end at a different position in the piece.

We call a sample good if no two notes in the sample have the same pitch.

The clarinet players are picky in two ways. First, they will not play any note with pitch higher than M. Second, they want a piece with exactly K good samples.

Can you construct a piece to satisfy the clarinet players?

입력

The first and only line of input will contain 3 space-separated integers, N, M and K.

출력

If there is a piece of music that satisfies the given constraints, output N integers between 1 and M, representing the pitches of the notes of the piece of music. If there is more than one such piece of music, any such piece of music may be outputted.

Otherwise, output −1.

예제

예제 1

입력
3 2 5
출력
1 2 1

예제 2

입력
5 5 14
출력
1 5 3 2 1

예제 3

입력
5 5 50
출력
-1
코드를 제출하려면 로그인하세요.