|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초 (추가 시간 없음)||512 MB||9||5||5||83.333%|
An r × c grid of squares is to be colored in a checkerboard style. The board will be filled with rectangles made up of the grid squares. The heights and widths of the rectangles will be specified. Black and White are the only two colors of the rectangles. Any two adjacent rectangles that share a side should be colored differently. The top-left rectangle should be Black. Print the checkerboard.
The first line contains four space-separated integers r, c, v and h (1 ≤ v ≤ r ≤ 50, 1 ≤ h ≤ c ≤ 50) where the checkerboard is to have r rows and c columns, with v rectangles vertically and h rectangles horizontally.
Each of the next v lines contain a single positive integer a. The sum of the a values will be exactly r. These are the heights of the v rectangles in each column, in order from top to bottom.
Each of the next h lines contain a single positive integer b. The sum of the b values will be exactly c. These are the widths of the h rectangles in each row, in order from left to right.
Print the described checkerboard, in the form of r strings of length c, one per line. The strings should only contain the characters upper-case B (for a Black square) and upper-case W (for a White square).
6 5 3 2 1 2 3 3 2
BBBWW WWWBB WWWBB BBBWW BBBWW BBBWW
4 4 2 2 1 3 3 1
BBBW WWWB WWWB WWWB