시간 제한메모리 제한제출정답맞힌 사람정답 비율
0.6 초 1024 MB111100.000%

문제

Fourier has an image of M × N pixels (M lines, N columns). All the pixels are initially white. Fourier wants to color some pixels in black in order to obtain an amazing image. He considers an image to be amazing if, in any contiguous group of K pixel columns, there exists at least one column containing at least F black pixels.

Fourier is very curious about how many possibilities he has for coloring the image and he asks you to calculate this for him.

입력

The input contains a single line with four integers, M N K F, with the meanings described above.

출력

The output must contain a single integer representing the number of amazing images modulo 1,000,000,007.

제한

  • 1 ≤ K ≤ N
  • 1 ≤ F ≤ M

서브태스크

번호배점제한
110

M × N ≤ 20

220

N × K ≤ 10,000,000

M ≤ 20

330

N ≤ 10,000,000

M ≤ 20

440

N ≤ 1,000,000,000

K ≤ 100

M ≤ 20

예제 입력 1

2 6 2 2

예제 출력 1

217

예제 입력 2

2 6 2 1

예제 출력 2

3105

채점 및 기타 정보

  • 예제는 채점하지 않는다.