hiho week 199 register

Ended

Participants:115

Verdict:Accepted
Score:100 / 100
Submitted:2018-04-23 02:21:41

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 <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <algorithm>
#include <map>
#include <queue>
using namespace std;
typedef long long ll;
const int di[4][2]={{-1,0},{1,0},{0,1},{0,-1}};
struct Point{
    int x,y;
    Point(){}
    Point(int a,int b):x(a),y(b){}
    Point go(int i){
        return Point(x+di[i][0],y+di[i][1]);
    }
    bool check(int n,int m){
        return x>=1&&y>=1&&x<=n&&y<=m;
    }
};
int Alength[1005];
int Blength[1005];
int K;
int cross[35][2];
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX