Is "who did what" grammatically correct?
Solution 1:
All four are grammatically correct.
The comments are good here, but I wish people would put answers in the answers section because the question remains unanswered even though the OP has the answer(s) in the comments!