[Offer收割]编程练习赛19 register

Ended

Participants:405

Verdict:Time Limit Exceeded
Score:90 / 100
Submitted:2017-07-23 12:50:01

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
//
//  main.cpp
//  Hihocoder19-1
//
//  Created by rc on 23/07/2017.
//  Copyright © 2017 Youdao. All rights reserved.
//
#include <iostream>
#include <cstring>
#include <cstdio>
#define MAXN 55
#define MAXH 105
#define MAXW 810
using namespace std;
int n, m, k, h, w;
char mat[MAXN][MAXN];
char photo[MAXH][MAXW];
char fullmat[MAXH+MAXN][MAXW+MAXN];
bool match(int x, int y) {
    for (int i=0; i<h; i++)
        for (int j=0; j<w; j++)
            if (fullmat[x+i][y+j] != photo[i][j])
                return false;
    return true;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX