#include
#include
using namespace std;
struct ab
{
int map[6][6];
int step;
};
ab ini;
queuestate;
int main()
{
for (int i = 1; i <= 4; i++)
for (int j = 1; j <= 4; j++)
scanf("%d", &ini.map[i][j]);
ini.step = 0;
state.push(ini);
// 这样输出
ab get = state.front();
printf("%d\n", get.step);
for (int i = 1; i <= 4; i++)
{
for (int j = 1; j <= 4; j++)
printf("%d ", ini.map[i][j]);
printf("\n");
}
return 0;
}
运行结果: