UVa 509 - RAID!

Summary
The problem asks us to simulate a RAID-5 array of small hard disks. There can be 2-6 disks, 1-64 bits per block, and 1-100 blocks per disk (including parity).

Explanation
Explanation of the ideas behind the solution goes here.

Gotchas

 * Any points one can easily overlook?
 * The correct way to understand ambiguous formulations?

Implementations
Notes/Hints on actual implementation here.

Optimizations
Optimizations here.

Input
5 2 5 E 0001011111 0110111011 1011011111 1110101100 0010010111 3 2 5 E 0001111111 0111111011 xx11011111 3 5 1 O 11111 11xxx x1111 0

Output
Disk set 1 is valid, contents are: 6C7A79EDFC Disk set 2 is invalid. Disk set 3 is valid, contents are: FFC