Name: Sunny 2013-05-12 9:23
Letsa get relaxing prog and code a simple routine in a language of your choice.
Letsa see, my back kind of itches, why don't you scrap it?.
It's simple, it's a data structure to data estructures containing bits, the bits that are at 1 are the itching zones, put them at zero. Easy to do with a simple iteration.
But make it more fun.
There's extra points if you scratch first the bigger groups.
Also extra points if itsa fast! As always.
example 3 arrays if 3 bits
1 2 3
0|0|1__0|0|1___0|0|1__0|0|1__0|0|0
1|1|1->0|1|1 ->0|0|1> 0|0|0->0|0|0 It's better than
0|0|0__0|0|0___0|0|0__0|0|0__0|0|0
0|0|1__0|0|1___0|0|1__0|0|1__0|0|0
1|1|1->1|0|1 ->0|0|1> 0|0|0->0|0|0 This
0|0|0__0|0|0___0|0|0__0|0|0__0|0|0
Ie, going from 1 to bordering 1 for best scratching, diagonal movements are not kind of lame, but if you feel like doing it so, well go ahead!
Go go prog! (´・ω・`)
Letsa see, my back kind of itches, why don't you scrap it?.
It's simple, it's a data structure to data estructures containing bits, the bits that are at 1 are the itching zones, put them at zero. Easy to do with a simple iteration.
But make it more fun.
There's extra points if you scratch first the bigger groups.
Also extra points if itsa fast! As always.
example 3 arrays if 3 bits
1 2 3
0|0|1__0|0|1___0|0|1__0|0|1__0|0|0
1|1|1->0|1|1 ->0|0|1> 0|0|0->0|0|0 It's better than
0|0|0__0|0|0___0|0|0__0|0|0__0|0|0
0|0|1__0|0|1___0|0|1__0|0|1__0|0|0
1|1|1->1|0|1 ->0|0|1> 0|0|0->0|0|0 This
0|0|0__0|0|0___0|0|0__0|0|0__0|0|0
Ie, going from 1 to bordering 1 for best scratching, diagonal movements are not kind of lame, but if you feel like doing it so, well go ahead!
Go go prog! (´・ω・`)