hiho week 31 register

Ended

Participants:313

Verdict:Accepted
Score:100 / 100
Submitted:2015-02-03 20:50: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<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#define N 205
using namespace std;
int n,m,a[N][N],c[N][N],t1,t2;
struct point
{
    int x,y;
    point(int x=0,int y=0):x(x),y(y){}
};
vector<point>va,vb;
bool flag[N][N];
void getV(int i,int j,vector<point>& v,bool f,int &t)
{
    int x,y;
    
    v.clear();
    for (int ii=-1;ii<=1;ii++)
     for (int jj=-1;jj<=1;jj++)
     {
            if (!ii && !jj) continue;
            x=i+ii;
            y=j+jj;
            if (x<0 || x>=n || y<0 || y>=m) continue;
            if (a[x][y]==-1) 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX