dfs
YOYCod
君子不器,成己达人
展开
-
hdu~1312(dfs)
http://acm.hdu.edu.cn/showproblem.php?pid=1312原创 2014-11-20 21:15:49 · 481 阅读 · 0 评论 -
hdu~4133(dfs)
StrangeStandard 求反素数 反素数:给一个整数x,对任意1~x中,x的约数个数最多,这个x就是反素数。 题意:求不大于n的最大的反素数,。 因为数据量 2 x 10^9,打表什么的想都不要想,所以,这这一道搜索题。 1.一个反素数的质因子必然是从2开始连续的质数. 2.num=2^x1+3^x2+5^x3+…… 必然有x1>=x2>=x3……原创 2014-12-19 14:53:14 · 430 阅读 · 0 评论 -
poj~1321(简单搜索)
题目链接:棋盘问题 简单的dfs,当初细节错误,贡献了一次wa。 #include int n,m,ans; int num[10]; //标记第i列是否遍历 char seat[10][10]; void dfs(int k,int sign){ for(int i=1;i<=n;++i){原创 2015-08-23 15:40:01 · 483 阅读 · 0 评论 -
hdu~1010(dfs)
Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking.原创 2014-08-20 19:03:11 · 525 阅读 · 0 评论