名落孙山

名落孙山 (míng luò sūn shān)
(idiom) to fail in imperial exam