编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#20486 #1111. JM的百万大军 Wrong Answer 35 434 ms 384 K C++ / 693 B 派克钢笔 2019-07-22 17:07:35
显示原始代码
#include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
#include <vector>
#include <cstring>
#include <algorithm>
#include <math.h>
using namespace std;
const int maxn = 5e3 + 5;
int main() {
    char a[maxn], b[maxn];
    scanf("%s %s", a, b);
    int bm = strlen(b), am = strlen(a);
    vector<int> dp(bm + 1, 0);
    for (int i = 0; i < bm; i++) {
        if (b[i] == a[0]) {
            for (int j = i; j < bm; j++) dp[j + 1] = 1;
            break;
        }
    }
    for (int i = 1; i < am; i++) {
        for (int j = bm; j > 0; j--) {
            if (b[j - 1] == a[i]) {
                dp[j] = max(dp[j - 1] + 1, dp[j]);
            } else
                dp[j] = max(dp[j - 1], dp[j]);
        }
    }
    int num = 0;
    for (int j = 0; j <= bm; j++) {
        if (num < dp[j])
            num = dp[j];
    }
    cout << num << endl;
    return 0;
}
子任务 #1
Wrong Answer
得分:35
测试点 #1
Accepted
得分:100
用时:4 ms
内存:228 KiB

输入文件(1.in

abcde
baedc

答案文件(1.out

2

用户输出

2

系统信息

Exited with return code 0
测试点 #2
Wrong Answer
得分:0
用时:4 ms
内存:344 KiB

输入文件(2.in

aaaaa
aaaaba

答案文件(2.out

5

用户输出

4

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #3
Accepted
得分:100
用时:4 ms
内存:352 KiB

输入文件(3.in

aaa
bcdefgh

答案文件(3.out

0

用户输出

0

系统信息

Exited with return code 0
测试点 #4
Accepted
得分:100
用时:4 ms
内存:300 KiB

输入文件(4.in

dddcacdcba
eeddb

答案文件(4.out

3

用户输出

3

系统信息

Exited with return code 0
测试点 #5
Accepted
得分:100
用时:4 ms
内存:348 KiB

输入文件(5.in

ccaababd
dbbcbcecde

答案文件(5.out

3

用户输出

3

系统信息

Exited with return code 0
测试点 #6
Accepted
得分:100
用时:4 ms
内存:352 KiB

输入文件(6.in

ecbcdaa
cadebeabc

答案文件(6.out

3

用户输出

3

系统信息

Exited with return code 0
测试点 #7
Wrong Answer
得分:0
用时:4 ms
内存:348 KiB

输入文件(7.in

deacecbagageegaded
edbdffdeceaggdcagcbaaadddafcaggffccd

答案文件(7.out

11

用户输出

9

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #8
Wrong Answer
得分:0
用时:4 ms
内存:276 KiB

输入文件(8.in

efgeaaebafegbeccaagegdbaebeffceddedggcgbgfcbadbaa
eeeaccedgccdbadcdddbadgegbcgg

答案文件(8.out

20

用户输出

17

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #9
Wrong Answer
得分:0
用时:4 ms
内存:272 KiB

输入文件(9.in

demuugrcndybfnjwgvwlwrqiqtrvxfzigsduhqmmddpfcqpbdgkyysplqyhmdvyvbmiuxdamsxhzkzybmsgazfwfecfkpvpswbgq
<399 bytes omitted>

答案文件(9.out

59

用户输出

55

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #10
Wrong Answer
得分:0
用时:4 ms
内存:276 KiB

输入文件(10.in

kyvovensdzfhqxykfrybwopqdceiqcgqigiazsiojqmkiofyhsssikakpjugbaodmgoxhvhoexthokqqzfravxlpvactxtszifwb
<397 bytes omitted>

答案文件(10.out

71

用户输出

57

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #11
Wrong Answer
得分:0
用时:7 ms
内存:300 KiB

输入文件(11.in

mdchpaerhayeycbivqurhgaleqezyhzjkkasvugqcydzosrmywwfesrnrqpnlvwxhhaxuujkejhbdehkavagnfkpdpydlrqswmws
<3199 bytes omitted>

答案文件(11.out

511

用户输出

381

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #12
Wrong Answer
得分:0
用时:18 ms
内存:384 KiB

输入文件(12.in

ztbvtrwgajtqtgrlqysegacviwtfmvzmeryzutppycwtzqtruonzeeommupqesvccokfpnjwymdltmzephsvqtyfihgcsjcxabgh
<7276 bytes omitted>

答案文件(12.out

1126

用户输出

900

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #13
Wrong Answer
得分:0
用时:61 ms
内存:372 KiB

输入文件(13.in

acccacaacacacbaccbaaacbabcbbcabbacbccabccbcaccbbbbbaabccacbccabccacbacbabaaacabcaaccacaabababbcbccac
<8011 bytes omitted>

答案文件(13.out

2853

用户输出

2586

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #14
Wrong Answer
得分:0
用时:78 ms
内存:376 KiB

输入文件(14.in

aabcdcabdbbcccdbdbabbbadbccbbaddbacaaccbccaddadccbdcabacadbdcabacbdaaaccccacccddacdddbcacbbbdcdcabca
<9904 bytes omitted>

答案文件(14.out

3244

用户输出

2480

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #15
Wrong Answer
得分:0
用时:32 ms
内存:368 KiB

输入文件(15.in

hojjmsbbyzqzkaehdfutywvjxytquujpubozxlrkyxiplxhalxhrqvvclplrzmrzknchfdoduuuqedwsjhfzovwkowaxkoicvmlz
<9904 bytes omitted>

答案文件(15.out

1614

用户输出

982

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #16
Wrong Answer
得分:0
用时:88 ms
内存:372 KiB

输入文件(16.in

abaaabbabaabbbabaabababbbabbbbaababbbabbbabbabababbbbaabaaabaabbabaaabbabaabbaaaaababbabbaabaabaaaba
<8543 bytes omitted>

答案文件(16.out

3492

用户输出

2922

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #17
Accepted
得分:100
用时:22 ms
内存:368 KiB

输入文件(17.in

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
<8663 bytes omitted>

答案文件(17.out

4242

用户输出

4242

系统信息

Exited with return code 0
测试点 #18
Wrong Answer
得分:0
用时:76 ms
内存:372 KiB

输入文件(18.in

rtrrsrrrttttsssstrqttqqqqqsqtrqqqrsrsrrsrttsqtrqtsssrtqtsqtrtssqrqqqqqtttqtqrqtqssqsrrrsqsstqrssrrss
<9419 bytes omitted>

答案文件(18.out

3103

用户输出

2448

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #19
Wrong Answer
得分:0
用时:6 ms
内存:276 KiB

输入文件(19.in

unuiclmoskxycylvvfhjyrdnxaznoymqqmmewpyqomptfzmuidponulanjujlmoycrrquuigmznxvvvwbukzqvuqirguxfnufwqd
<4575 bytes omitted>

答案文件(19.out

363

用户输出

91

Special Judge 信息

Files user_out and answer differ

系统信息

Exited with return code 0
测试点 #20
Accepted
得分:100
用时:6 ms
内存:260 KiB

输入文件(20.in

wrflvpgufyfigfiawgsmglvprybhsdvunmjzysneodbpgmultpyapcgoyjkmyxqnsmskhfluttkxwkwlqsdtjvmdaiquldzaakum
<4905 bytes omitted>

答案文件(20.out

348

用户输出

348

系统信息

Exited with return code 0