hiho week 60 register

Ended

Participants:587

Verdict:Accepted
Score:100 / 100
Submitted:2015-08-24 22:08:47

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 <iostream>
#include <string>
#include <algorithm>
#define MAXN 2100
using namespace std;
// 
// c[M][N]
int c[MAXN+1][MAXN+1];
int d[MAXN + 1][MAXN + 1]; // a[1..i]b[1..j]a[i]==b[j]
int main(){
    FILE* stream;
    //freopen_s(&stream, "input.txt", "r", stdin);
    string strA, strB;
    cin >> strA >> strB;
    int M = strA.size();
    int N = strB.size();
    int i, j;
    for (i = 1; i <= M; i++){
        c[i][0] = 0;
        d[i][0] = 0;
    }
    for (j = 1; j < N; j++){
        c[0][j] = 0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX