摘要: 又要开始一段搜索的路程了。最近看了这题,在网上看到一个结论,任何一个数倍数都能被不超过两个数字组成,假如一个数n个A%x=b,那么必然有m个A%=b那么此时n个A减去m个B就能够被x整除,那么此时就有了上述的结论,在配合上余数来进行一个搜索,就是把余下的数字作为一个状态来进行广搜。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using std::queue; 7 int const N = 15; 8 int const M = 61000; 9 int cnt[M],father[M],record[M... 阅读全文
posted @ 2013-07-08 23:50 诺小J 阅读(289) 评论(0) 推荐(0) 编辑