hiho week 236 register

Ended

Participants:103

Verdict:Accepted
Score:100 / 100
Submitted:2019-01-12 18:32:27

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<string>
#include<cmath>
#include<algorithm>
using namespace std;
const int INF = 100000000;
const int maxn = 1000000+10;
int n,m;
int i,j;
int h,t;
int a[1010][1010],d[1010][1010];
int que[maxn];
bool flag[1010][1010];
int dx[4]={0,0,1,-1};
int dy[4]={1,-1,0,0};
int cx,cy;
bool check(int x,int y)
{
    if (x>=1&&x<=n&&y>=1&&y<=m&&!flag[x][y]) return 1;
    return 0;
}
int main()
{
    scanf("%d%d",&n,&m);
    for (i=1;i<=n;i++)
        for (j=1;j<=m;j++)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX