Language:
Free Online Dictionary|3Dict

临机处宜

Source : CEDICT

to make an emergency decision/to rise to the occasion (idiom)