搜索
文章平均质量分 57
DreamDraw_Pan
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
洛谷P1101 单词方阵
无脑深搜 剪枝:向一个方向搜索时,如果“yizhong”的长度超过了当前点到边界的距离,则continue#include #define maxn 105 using 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 · 546 阅读 · 0 评论 -
CodevsP1026 逃跑的拉尔夫
广搜+判重,不判重会MLE 三维判重,vis[I][j][k]表示在第(I,j)个点处理第k个方向,注意不要错判 #include #include #include #include #include using 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 · 264 阅读 · 0 评论 -
洛谷P2346 四子连棋
IDDFS+哈希判重 代码怎么这么长#include #include using 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 · 801 阅读 · 0 评论 -
洛谷P1032&NOIP2002 字串变换
IDDFS 做这个题感受到了STL的强大233 注意同一个字符串可能有多处符合变换规则,所以对于同一个变换规则,搜完一处后要继续搜 #include #include #include using 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 · 433 阅读 · 0 评论
分享