시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
0.6 초 | 1024 MB | 1 | 1 | 1 | 100.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 | 10 | M × N ≤ 20 |
2 | 20 | N × K ≤ 10,000,000 M ≤ 20 |
3 | 30 | N ≤ 10,000,000 M ≤ 20 |
4 | 40 | N ≤ 1,000,000,000 K ≤ 100 M ≤ 20 |
2 6 2 2
217
2 6 2 1
3105