시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB (추가 메모리 없음)218806946.939%

문제

You had a histogram made of $N$ axis-parallel rectangles sharing a common baseline: the $i$-th rectangle from the left had a width $1$ and an integer height $H_i$.

Sadly, you lost your histogram! Moreover, you even forgot what your histogram looked like — the heights of the rectangles of the histogram. What you remember is the maximum area $A$ of the axis-parallel rectangle inside the histogram, and the fact that $L\le H_i\le R$ for every $H_i$.

Your goal is to recover the histogram by finding any histogram satisfying all the requirements that you remember. As your memory might not be perfect, there may be no histogram satisfying the requirements.

입력

The first and only line contains four space-separated integers, $N$, $A$, $L$, $R$.

출력

If there is no histogram satisfying the requirements, output NO.

Otherwise, output YES in the first line. In the second line, output $N$ integers in a single line, where the $i$-th value is the height $H_i$ of the $i$-th rectangle. If there are multiple answers, print any.

제한

  • $1\le N\le 500\, 000$
  • $0\le A\le 10^{18}$
  • $0\le L\le R\le 10^{18}$

예제 입력 1

6 25 2 10

예제 출력 1

YES
3 7 6 8 5 5

예제 입력 2

1 0 0 1000000000000000000

예제 출력 2

YES
0

예제 입력 3

1 8213912883 0 28318

예제 출력 3

NO

노트

A histogram with heights $3,7,6,8,5,5$ is shown below. The maximum area rectangle inside the histogram has an area of $25$.

출처

University > KAIST > 2022 KAIST 12th ICPC Mock Competition D번