Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <stdio.h>#include <string.h>#include <math.h>#include <algorithm>#include <iostream>using namespace std;#define LL __int64#define mod 9973#define N 100010int ma[10][10];int f1[10][10];int f2[10][10];int f3[10][10];struct asd{int x,y;int step;};asd q[N];int head,tail;int dx[8]={-2,-2,-1,-1,1,1,2,2};int dy[8]={1,-1,2,-2,2,-2,1,-1};void bfs1(int x,int y){memset(f1,-1,sizeof(f1));head=0;tail=1;q[head].x=x;q[head].y=y;