蓝桥杯 历届试题 九宫重排 (bfs, A*算法)

题目链接c++ 题意:已经很明显了。算法 思路:数组 1. bfs+map标记spa 纯bfs暴力算法,没有太大意义。只能过60%的数据(比赛也只能得这60分)。.net 代码:code #include <bits/stdc++.h> using namespace std; const int maxn=1e6+7; string be,ed; int dx[4]={0,1,0,-1},dy[
相关文章
相关标签/搜索