Being one of the four ancient capitals of China, Nanjing has always been a cultural centre attracting intellectuals from all over the country. When did the city serve as the official imperial examination centre?