Which sentence contains an idiom?

A. We desperately tried to solve the problem.
B. We made a last-ditch effort to fix the problem.
C. We tried as hard as we could to fix the problem.
D. We struggled to solve the problem before it was too late.