问题

_____ in the queue for half an hour, Tom suddenly realized that he had left his wallet at home. [ ]
A: To wait
B: Have waited
C: Having waited
D: To have waited
B: Have waited
C: Having waited
D: To have waited
正确答案是: