hiho week 203 register

Ended

Participants:117

Verdict:Accepted
Score:100 / 100
Submitted:2018-05-24 23:31:53

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<queue>
#include<cmath>
using namespace std;
typedef struct node {
    int l;
    int r;
    node(int a, int b) { l = a, r = b; }
    node() {}
}node;
int M, S;
int H, W;
char mtr[500][500];
int biao[500][500];
const int moven[8][2] = { {-1,0 },{-1,1},{0, 1} ,{1,1}, {1, 0},{1,-1}, {0, -1},{-1,-1} };
node bfs(node sr,int& minl,int &minr,int& maxl,int &maxr)//0
{
    queue<node>qb;
    qb.push(sr);
    biao[sr.l][sr.r] = 1;
    node de;
    while (!qb.empty())
    {
        node ned=qb.front();
        qb.pop();
        //biao[ned.l][ned.r] = 1;
        minl = min(minl, ned.l);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX