We study a model of dynamic two-stage R&D competition where the competing firms are uncertain about the difficulty of the first stage. Staying in the competition is costly and a firm can also choose whether and when to quit. When a firm solves the first stage, it can choose whether and when to disclose the solution. We find that there exists a unique symmetric equilibrium, in which each firm will disclose the solution of the first stage if it arrives early, withhold the solution if it arrives neither too soon nor too late, and exit the competition if it has not arrived after a sufficiently long time. From a social welfare perspective, a competition is surprisingly not always optimal: in certain scenarios, it is socially more desirable to assign the R&D project to a single firm.