1 /* 2 题意:找出一个0和1组成的数字能整除n 3 DFS:200的范围内不会爆long long,DFS水过~ 4 */ 5 /************************************************ 6 Author :Running_Time 7 Created Time :2015-8-2 14:21:51 8 File Name :POJ_1426.cpp 9 *************************************************/10 11 #include12 #include 13 #include 14 #include 15 #include 16 #include 17 #include 18 #include 19 #include 20 #include 21 #include 22 #include 23 #include
1 /* 2 BFS+同余模定理:mod数组保存,每一位的余数,当前的数字由少一位的数字递推, 3 比如4(100)可以从2(10)递推出,网上的代码太吊,膜拜之 4 详细解释:http://blog.csdn.net/lyy289065406/article/details/6647917 5 */ 6 /************************************************ 7 Author :Running_Time 8 Created Time :2015-8-2 15:14:33 9 File Name :POJ_1426_BFS.cpp10 *************************************************/11 12 #include13 #include 14 #include 15 #include 16 #include 17 #include 18 #include 19 #include 20 #include 21 #include 22 #include 23 #include 24 #include