hiho week 232 register

Ended

Participants:110

Verdict:Accepted
Score:100 / 100
Submitted:2018-12-10 21:30:42

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 "memory.h"
inline void UpdateMax(int &x, int y)
{
    x=x<y?y:x;
}
inline void UpdateMin(int &x, int y)
{
    x=x>y?y:x;
}
int n,m,X[250000],Y[250000],s,t;
char grid[505][505]={0};
char output[505][505];
bool arrive[505][505]={0};
inline void Insert(int x, int y)
{
    if(x>=0&&x<m&&y>=0&&y<n&&grid[y][x]=='1')
    {
        grid[y][x]='0';
        X[t]=x;
        Y[t]=y;
        ++t;
    }
}
int main()
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX