#include <iostream>
#include <vector>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <math.h>
#include <limits.h>
#include <set>
#include <memory>
#include <queue>
using namespace std;
struct point{
int x;
int y;
point *parent;
int step;
};
int map[][] = { , , , , , , , , ,
, , , , , , , , ,
, , , , , , , , ,
, , , , , , , , ,
, , , , , , , , ,
, , , , , , , , ,
, , , , , , , , ,
, , , , , , , , ,
, , , , , , , , , };
vector<point> p;
int BFS(point s,point e)
{
queue<point> q;
q.push(s);
while (!q.empty())
{
point start = q.front();
point *s1 = new point; s1->x = start.x; s1->y = start.y; s1->parent = start.parent;
q.pop();
if (start.x == e.x&&start.y == e.y)
{
p.push_back(start);
return start.step;
}
if (map[start.x + ][start.y] != && start.x + <= && start.x + >= )
{
point tmp = { start.x + , start.y, s1, start.step + };
map[start.x + ][start.y] = ;
q.push(tmp);
}
if (map[start.x - ][start.y] != && start.x - <= && start.x - >= )
{
point tmp = { start.x - , start.y, s1, start.step + };
map[start.x - ][start.y] = ;
q.push(tmp);
}
if (map[start.x][start.y + ] != && start.y + <= && start.y + >= )
{
point tmp = { start.x, start.y + , s1, start.step + };
map[start.x][start.y + ] = ;
q.push(tmp);
}
if (map[start.x][start.y - ] != && start.y - <= && start.y - >= )
{
point tmp = { start.x, start.y - , s1, start.step + };
map[start.x][start.y - ] = ;
q.push(tmp);
}
start.step++;
}
}
int main()
{
point s = { , }, e = { , };
BFS(s, e);
char p1[] = "abcd", *p2 = "ABCD", str[] = "xyz";
strcpy(str + , strcat(p1 + , p2 + ));
printf("%s", str);
point *point = &p[];
while (point->parent != NULL)
{
cout << point->x << " " << point->y << endl;
point = point->parent;
}
return ;
}