UVa 10851 - 2D Hieroglyphs decoder

10851 - 2D Hieroglyphs decoder

 * http://acm.uva.es/p/v108/10851.html

Summary
Given a representation of the each bit in a matrix of points, decode the hidden message.

Explanation
The description in the problem makes it seem harder than it is. The way to look at it is, given a binary matrix of "/" or "\"'s, with "\" representing ones, decode the hidden message.

The matrix is always given with the surrounding frame of "/", strip that out, and reconstruct the ASCII value of the character by its bits. Since the number of rows is always ten, that means there are 8 bytes (perfect for a char!). For example, the first row represents the least significant bit, while the first column (after the frames) represents the first character.

Input
2 /////////////////////////////////////// //\///\/\\/\//\\/\//\/\\/\/\/\\/\/\//\/ ///////\////\/\/\//////\//\////\/\///// /\//\\\\///\\//\\/\\//\//\\//\///\/\\// /\//\\//\///\////\\\//////\//\////\\\// //////\\//////\/\//////\/\/////\/\///// ///\//////\//\///////\//\///\////////// /\\/\\\\\\/\\/\\\\\\\/\\/\\\/\\\\\\\\\/ /////////////////////////////////////// ///////////////////////////////////////

/////////// /\/\/\/\/\/ //\\//\\/// ////\\\\/// ////////\\/ /////////// /\\\\\\\\\/ /\\\\\\\\\/ /////////// ///////////

Output
LA LLUVIA EN SEVILLA ES UNA MARAVILLA abcdefghi