这个题主要是代码写起来麻烦,dfs。 等状态好了再独立写出。 http://blog.csdn.net/zxy_snow/article/details/6131852 http://blog.csdn.net/zxjcarrot/article/details/8942210