The founder of this dynasty introduced the jinshi category to the exam system, and built both the Xuandu Abbey and the Daxingshan Monastery.
The founder of this dynasty introduced the jinshi category to the exam system, and built both the Xuandu Abbey and the Daxingshan Monastery. This dynasty's downfall began with revolts like that of Zhai Rang, who busted granaries to feed the peasants, in order to aid the prophecy of Li Mi. This dynasty's founder promulgated a 500-article legal code which limited harsh punishments like the cangue, and started the "Rule of Avoidance" to prevent officials from ruling their native provinces. This dynasty invaded the Champa kingdom to begin the third domination of Vietnam. It first rose to power by overthrowing the Bei Zhou, or Northern Zhou,and promulgated the Kaihuang legal code, before seeing its downfall at the Battle of Salsu River. This dynasty was founded by Wen-di, who started the project to link the Yangtze and Yellow Rivers with the Grand Canal. For 10 points, name this dynasty that unified China but lasted only37 years before falling to the Tang dynasty. 
The founder of this dynasty introduced the jinshi category to the exam system, and built both the Xuandu Abbey and the Daxingshan Monastery.
Sui Dynasty [or  Sui chao]