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; did he realize
C、he had failed; he realized
D、did he fail; did he realize