搜索,最短路都可以
#include<stdio.h>
#include<string.h>
#include<queue>
#define inf 0x3fffffff
using namespace std;
int map[65][65];
int sx,sy,ex,ey;
int dis[10][10],link[10][10];
char str[8][3]={"D","R","U","L","RD","LU","LD","RU"};
int dir[8][2]={1,0,0,1,-1,0,0,-1,1,1,-1,-1,1,-1,-1,1};
struct node
{
int x,y,w;
friend bool operator < (node a, node b)
{
return a.w>b.w;
}
}cur,next;
int judge(int x,int y)
{
if(x>=1&&x<......
阅读全文