单项选择题

I regret __________ hard at school, or I would have passed the exam.

A.to have not worked
B.having not worked
C.not to have worked
D.not having worked