hiho week 71 register

Ended

Participants:210

Verdict:Accepted
Score:100 / 100
Submitted:2015-11-08 17:51:50

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 <cstring>
#include <algorithm>
using namespace std;
enum {maxn = 1000+3};
char map[maxn][maxn];
struct star{
    int x, y;
};
struct star Const[23][23];
int starNum[24];
char str[100+4][100+4];
 int m, n;
 bool has(int i)
 {
     for (int y = 0; y < n; y++)
        for (int x =0; x< m; x++)
     {
         int k;
         for (k=0; k<starNum[i]; k++)
         {
             int nowX = x + Const[i][k].x;
             int nowY = y + Const[i][k].y;
             if (nowX >= m || nowY >= n || map[nowY][nowX] != '#')
                break;
         }
         if (k == starNum[i])
            return true;
     }
    return false;
 }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX