hiho week 185 register

Ended

Participants:167

Verdict:Accepted
Score:100 / 100
Submitted:2018-01-19 21:34:46

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 <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <queue>
using namespace std;
const int maxn = 200010;
typedef long long ll;
const int inf =0x3f3f3f3f;
int maze[505][505],d[505][505],nn[501],b[505],n,m;
struct node{
    int d,x,y;
    //node (int dd,int xx,int yy):x(xx), y(yy), d(dd) {}
    bool operator < (const node& a) const {
        return d>a.d;
    }
};
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};
int dis(int x,int y,int i){
    if(i==0)return b[y];
    if(i==1)return nn[x];
    if(i==2)return b[y-1];
    return nn[x-1];
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX