别光说,就发个具体的源码上来看看实现得如何!
burte force is an applicable way, but it takes O(e^n) time.As Yu3Zhon2gFei1Yan4 said we may need some graph algorithm here for a polynomial time soln.
我E文太差了,谁能帮我解释下,谢谢.....