急中生智

Idiom

 * 1) to suddenly come up with a solution in an emergency