hiho week 287 register

Ended

Participants:35

Verdict:Accepted
Score:100 / 100
Submitted:2019-12-30 00:51:41

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 <bits/stdc++.h>
using namespace std;
char T[55][55];
char M[105][805];
int n,m,k;
int h,w;
bool row[55];
bool ok(int x,int y, int p, int q)
{
    //cout <<"------"<<endl;
    int tp = 0, tq = 0, bx = x, by = y, bq = q;
    while(tp < h)
    {
        while(tq < w)
        {
            //cout << x <<' '<<y << ' '<< p <<' '<<q<<endl;
            if(T[x][y] != M[p][q])
            {
                if(x != bx)
                    row[bx]=1;
                return 0;
            }
            q++;
            q %= w;
            y++;
            y %= m;
            tq++;
        }
        q = bq;
        p++;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX