hiho week 199 register

Ended

Participants:115

Verdict:Accepted
Score:100 / 100
Submitted:2018-04-22 10:01:11

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 <string.h>
#include <string>
#include <algorithm>
#include <set>
#include <iostream>
#include <map>
#include <queue>
using namespace std;
#define INT_MAX 2147483647
map<int,int> xaxis,yaxis;
int Alength[1005];
int Blength[1005];
int colLength[105];
int rowLength[105];
long long dis[105][105];
bool walk[105][105];
const int di[4][2]={{-1,0},{1,0},{0,1},{0,-1}};
int K;
int cross[35][2];
struct MyPoint{
    int x,y;
    MyPoint(){}
    MyPoint(int xa,int yb):x(xa),y(yb){}
    MyPoint GoGo(int i){
        return MyPoint(x+di[i][0],y+di[i][1]);
    }
    bool check(int n,int m){
        return x>=1&&x<=n&&y>=1&&y<=m;
    }
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX