아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Farmer

시간 제한1초메모리 제한256 MB

요약
절댓값 차이가 x 이상인 쌍이 정확히 k개가 되도록 10^6 미만의 양의 정수 n개를 구성하고, 불가능하면 -1을 출력한다.
난이도

보통10점 중 6점

유형
수학, 조합론
정답자
아직 제출이 없습니다

문제

You are given three numbers n,kn, k and xx. Construct an array AA with the following properties: 

  •  AA contains exactly nn elements.
  • All elements of AA are positive integers smaller than 10610^6.
  • There are exactly kk pairs of indices (i,j)(i, j) such that: 1≤i<j≤n1 \le i < j \le n and ∣A_i−A_j∣≥x|A\_i - A\_j| \geq x.

입력

Single line of input contains three numbers nn (1≤n≤1000)(1 \leq n \leq 1000), kk (0≤k≤n⋅(n−1)2)(0 \leq k \leq \frac{n\cdot (n-1)}{2}), xx  (2≤x≤1000)(2\leq x \leq 1000).

출력

In single line of output print nn integers, elements of array AA. In case there is no array with needed properties, print −1-1

예제1

  1. 예제 1

    입력
    3 2 5
    
    예상 출력
    1 8 2