#include<cstdio>
#include<cmath>
#include<queue>
#include<vector>
using namespace std;
const int N=100,M=100;
int n,m;
bool map[N][M];
class map
{
private:
bool **p;
int n,m;
inline bool isin(const int x1,const int y1,const int x2,const int y2,const int i,const int j)
{
return (((i>=((x1>x2)?x2:x1))&&(i<=((x1>x2)?x1:x2)))&&((j>=((y1>y2)?y2:y1))&&(j<=((y1>y2)?y1:y2))));
}
struct point
{
static int tar_x,tar_y;
int x,y,b_dis;
int f_dis()
{
return abs(x-tar_x)+abs(y-tar_y);
}
bool operator<(point b)
{
return (b_dis+f_dis())>(b.b_dis+b.f_dis());
}
};
public:
map(const int N,const int M)
{
n=N;
m=M;
p=new bool*[N+1];
for(int i=1;i<=N;i++)
p[i]=new bool[M+1];
}
~map()
{
for(int i=1;i<=n;i++)
delete[] p[i];
delete[] p;
}
void set_obstruction(const int x,const int y)
{
p[x][y]=true;
return;
}
void set_obstruction(const int x1,const int y1,const int x2,const int y2)
{
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
if(isin(x1,y1,x2,y2,i,j))
p[i][j]=true;
return;
}
int get_way(const int x1,const int y1,const int x2,const int y2)
{
priority_queue<point> q;
point::tar_x=x2;
point::tar_y=y2;
point start;
start.x=x1;
start.y=y1;
q.push(start);
}
};
int main()
{
return 0;
}
//我想写一个A*寻路实现,但是这段BFS的优先队列似乎因为结构体的重载运算符跑不了了(555~~),求大佬告知怎么改啊?