Algorithm to solve job assignment problem
Instead of putting x, put some very high cost values in those cells.
Then the Hungarian algorithm avoids selecting those cells automatically (if that's possible).