시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 3 | 3 | 3 | 100.000% |
Vera has a grid with H rows and N columns. Rows are numbered 1 to H and columns are numbered 1 to N. Let the cell in the r-th row and c-th column be (r, c). Cells are coloured white or black. A colouring is a pyramid if:
Two pyramids are different if there is a cell that is white in one pyramid and black in the other. Compute the number of different pyramids modulo 109 + 7.
Line 1 contains integers H and N (1 ≤ H, N ≤ 105).
Print one line with one integer, the number of different pyramids modulo 109 + 7.
2 6
7
3 20
487
For the first example, the seven pyramids are:
###### ####.. ####.. #####. #####. #####. #####. ...... .##... ..##.. .#.... ..#... ...#.. ....#.