UVa 414

Summary of the problem statement goes here.

Explanation
Count the total number of spaces, and the number of spaces on each line. The line with the least amount of spaces determines how the left and right sides will move.

The answer is: {total spaces} - {min space per line} * {number of lines}.

Gotchas

 * The sample input in the problem statement uses "B" to represent spaces, rather than actual spaces.

Implementations
Notes/Hints on actual implementation here.

Optimizations
Optimizations here.

Input
4 XXXX               XXXXX XXX              XXXXXXX XXXXX               XXXX XX                XXXXXX 2 XXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXX 1 XXXXXXXXX             XX 0

Output
4 0 0