2013年12月30日 星期一

[UVA] 183 Bit Maps

基本的遞迴題目 小心看懂規則 尤其是output format即可


test case

INPUT
=======
B 0 0
B 16 16
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
B 16 16
0000000011111111
0000000011111111
0000000011111111
0000000011111111
0000000011111111
0000000011111111
0000000011111111
0000000011111111
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
B 16 16
0000000011110000
0000000011110000
0000000011110000
0000000011110000
0000000011111111
0000000011111111
0000000011111111
0000000011111111
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
B 16 16
0000000011110011
0000000011110011
0000000011110000
0000000011110000
0000000011111111
0000000011111111
0000000011111111
0000000011111111
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
B 16 16
0000000011110010
0000000011110011
0000000011110000
0000000011110000
0000000011111111
0000000011111111
0000000011111111
0000000011111111
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
B 1 1
1
B 2 2
0001
B 3 3
001101010
B 4 4
0001110101010101
B 5 5
0010011101110100111110101
B 1 10
1001010101
B 10 1
0100011010
B 2 20
00111011101001101010
11010001010101000010
B 20 2
00111000000010100000
01011111000001010001
D  16  16
0
D  16  16
D0100
D  16  16
D0D101100
D  16  16
D0D1D01001100
D  16  16
D0D1D0D1011001100
D   1   1
1
D   2   2
D0001
D   3   3
DD00101D010
D   4   4
DD0011D0101D0101D0101
D   5   5
DDD0011110D0D0110DD011D101D1101
D   1  10
DDDD100D10DDD101D01
D  10   1
DDDD0100DD10D10
D   2  20
DDDD011DDD011D10DDDD1001DDD010D10DDD10D10DD01D01DDDD010D10D0D10
D  20   2
DDDDD0110DDD0110DDDD01000DDD01D100DD1D10DDD011D01
#


OUTPUT
=======

D   0   0

D  16  16
0
D  16  16
D0100
D  16  16
D0D101100
D  16  16
D0D1D01001100
D  16  16
D0D1D0D1011001100
D   1   1
1
D   2   2
D0001
D   3   3
DD00101D010
D   4   4
DD0011D0101D0101D0101
D   5   5
DDD0011110D0D0110DD011D101D1101
D   1  10
DDDD100D10DDD101D01
D  10   1
DDDD0100DD10D10
D   2  20
DDDD011DDD011D10DDDD1001DDD010D10DDD10D10DD01D01DD
DD010D10D0D10
D  20   2
DDDDD0110DDD0110DDDD01000DDD01D100DD1D10DDD011D01
B  16  16
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
000000
B  16  16
00000000111111110000000011111111000000001111111100
00000011111111000000001111111100000000111111110000
00001111111100000000111111110000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
000000
B  16  16
00000000111100000000000011110000000000001111000000
00000011110000000000001111111100000000111111110000
00001111111100000000111111110000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
000000
B  16  16
00000000111100110000000011110011000000001111000000
00000011110000000000001111111100000000111111110000
00001111111100000000111111110000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
000000
B  16  16
00000000111100100000000011110011000000001111000000
00000011110000000000001111111100000000111111110000
00001111111100000000111111110000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
000000
B   1   1
1
B   2   2
0001
B   3   3
001101010
B   4   4
0001110101010101
B   5   5
0010011101110100111110101
B   1  10
1001010101
B  10   1
0100011010
B   2  20
0011101110100110101011010001010101000010
B  20   2
0011100000001010000001011111000001010001