![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
文章平均质量分 57
DreamDraw_Pan
这个作者很懒,什么都没留下…
展开
-
洛谷P1101 单词方阵
无脑深搜剪枝:向一个方向搜索时,如果“yizhong”的长度超过了当前点到边界的距离,则continue#include#define maxn 105using namespace std;char G[105][105],ans[105][105];int n,tot=0;void print(int x,int y,int d){ int i,j; if原创 2016-10-28 20:31:01 · 439 阅读 · 0 评论 -
CodevsP1026 逃跑的拉尔夫
广搜+判重,不判重会MLE三维判重,vis[I][j][k]表示在第(I,j)个点处理第k个方向,注意不要错判#include#include#include#include #includeusing namespace std;int r,c,n;char G[52][52];pairstart;const int mx[4]={-1,0,1,0 };con原创 2016-10-28 21:22:45 · 211 阅读 · 0 评论 -
洛谷P2346 四子连棋
IDDFS+哈希判重代码怎么这么长#include#includeusing namespace std;int G[4][4],ax,ay,bx,by;int have[4100000]={0},k;bool hash[4100000]={0},ok=0;const int mx[4]={1,-1,0,0};const int my[4]={0,0,1,-1};bool eq原创 2016-10-28 21:29:16 · 710 阅读 · 0 评论 -
洛谷P1032&NOIP2002 字串变换
IDDFS做这个题感受到了STL的强大233注意同一个字符串可能有多处符合变换规则,所以对于同一个变换规则,搜完一处后要继续搜#include#include#includeusing namespace std;string A,B,A1[7],B1[7];int k,n=1;bool ok=0;bool DFS(int deep){ if(ok)return原创 2016-10-28 21:31:21 · 366 阅读 · 0 评论