hiho week 99 register

Ended

Participants:253

Verdict:Accepted
Score:100 / 100
Submitted:2016-05-27 20:07:32

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <iostream>
using namespace std;
#define LL __int64
#define mod 9973
#define N 100010
int 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;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX