[Offer收割]编程练习赛4 register

Ended

Participants:899

Verdict:Accepted
Score:100 / 100
Submitted:2016-08-07 14:19:19

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<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<map>
#include<stack>
#include<set>
#include<algorithm>
#include<iomanip>
using namespace std;
int n, m, k, q;
int sx, sy, ex, ey;
int a[510], b[510];
int dist[510][510];
bool water[510][510];
bool mark[510][510];
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
struct point{
    int x, y;
    point(){}
    point(int xx, int yy):x(xx),y(yy){}
};
bool check(int x, int y)
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX