hiho week 68 register

Ended

Participants:264

Verdict:Accepted
Score:100 / 100
Submitted:2015-10-18 10:23: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 <stdlib.h>
#include <math.h>
#define NMAX 210
#define MMAX 210
char mat[NMAX][MMAX];
int pts[NMAX*MMAX][2];
int M,N;
char pmat[12][3];
char ch;void F(int &aa)
{
    aa=0;
    while(ch=getchar(),ch<'0'||ch>'9');
    while(ch>='0'&&ch<='9') {aa=(aa<<3)+(aa<<1)+ch-'0';ch=getchar();}
}
bool ismatch(int x,int y)
{
    bool flag;
    for(int k=0;k<12;k+=3)
    {
        flag=true;
        for(int i=0;i<3;++i)
        {
            for(int j=0;j<3;++j)
            {
                if(mat[x+i][y+j]!=pmat[k+i][j])
                {
                    flag=false;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX