Not until ________ in the college entrance exam ________ that he had wasted much time using his mobile phone to surf the Internet and play games.
A、had he failed; he realized
B、he had failed; he realized
C、he had failed; did he realize
D、did he fail; did he realize