Speed up a program to find the minimum Hamming distance
Considering that this is meant to be a puzzle, I'll write my review as a sequence of escalating hints.


Everybody who is suggesting the use of threads or std::vector or matrix libraries is on the wrong track! How do you think error correction is implemented in your CD player or hard disk firmware? No threads or matrix libraries there, I assure you.
Don't simulate the computer; use the computer.
All operations are modulo 2.  The puzzle guarantees k ≤ 16. Under these conditions, you can massively parallelize vector dot products. (Think SIMD or AltiVec, except you don't need SIMD or AltiVec.)
I've added the bitwise tag to this question.


I'll conclude with a remark that you've basically written C code.  The only thing that makes it C++ is your use of iostream.  C++ can be much more expressive than that.