## 874 - 2D Representations

Moderator: Board moderators

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Contact:

### 874 - 2D Representations

Can anyone explain the run length code of this problem.
I can't figure out how to generate this.
Ami ekhono shopno dekhi...
HomePage

daveon
Experienced poster
Posts: 229
Joined: Tue Aug 31, 2004 2:41 am
Hi,

Code: Select all

0 = black
1 = white

00001111
00001111
00001011
00000101
11110000
11110000
11111111
11111111

starting at the lower left, and moving to the right and up :

0 black nodes,

20 white nodes
1111
11111111
11111111

4 black nodes
11110000
11111111
11111111

4 white nodes
1111
11110000
11111111
11111111

9 black nodes
00000
11110000
11110000
11111111
11111111

1 white node
000001
11110000
11110000
11111111
11111111

1 black node
0000010
11110000
11110000
11111111
11111111

1 white node
00000101
11110000
11110000
11111111
11111111

4 black nodes
0000
00000101
11110000
11110000
11111111
11111111

1 white node
00001
00000101
11110000
11110000
11111111
11111111

1 black node
000010
00000101
11110000
11110000
11111111
11111111

2 white nodes
00001011
00000101
11110000
11110000
11111111
11111111

4 black nodes
0000
00001011
00000101
11110000
11110000
11111111
11111111

4 white nodes
00001111
00001011
00000101
11110000
11110000
11111111
11111111

4 black nodes
0000
00001111
00001011
00000101
11110000
11110000
11111111
11111111

4 white nodes
00001111
00001111
00001011
00000101
11110000
11110000
11111111
11111111

Happy coding!

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm