QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#188470#7234. Pencil of Wishingucup-team004AC ✓194ms11156kbC++202.4kb2023-09-25 21:10:382023-09-25 21:10:38

Judging History

你现在查看的是最新测评结果

  • [2023-09-25 21:10:38]
  • 评测
  • 测评结果:AC
  • 用时:194ms
  • 内存:11156kb
  • [2023-09-25 21:10:38]
  • 提交

answer

#include <bits/stdc++.h>

using i64 = long long;

constexpr int inf = 1E9;

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    
    std::string a, b;
    std::cin >> a >> b;
    
    int n = a.size(), m = b.size();
    
    std::vector lcp(n + 1, std::vector<int>(m + 1));
    for (int i = n - 1; i >= 0; i--) {
        for (int j = m - 1; j >= 0; j--) {
            lcp[i][j] = a[i] == b[j] ? lcp[i + 1][j + 1] + 1 : 0;
        }
    }
    
    std::vector dp(n + 1, std::vector<int>(m + 1, inf));
    std::vector g(n + 1, std::vector<std::pair<int, int>>(m + 1, {-1, -1}));
    dp[0][0] = 1;
    
    int ans = n;
    int l = 0, r = n;
    int x = 0;
    
    for (int i = 0; i <= n; i++) {
        if (i < n) {
            for (int j = 0; j <= m; j++) {
                dp[i + 1][j] = std::min(dp[i + 1][j], dp[i][j]);
            }
        }
        for (int k = i + 1; k <= n; k++) {
            int nxt = m + 1;
            for (int j = m; j >= 0; j--) {
                if (lcp[i][j] >= k - i) {
                    nxt = j;
                }
                if (dp[i][j] == inf) {
                    continue;
                }
                int v = dp[i][j] + k - i + 1;
                if (i == 0) {
                    v -= 1;
                    if (nxt != 0) {
                        nxt = m + 1;
                    }
                }
                if (k == n) {
                    v -= 1;
                    if (m < n - i || lcp[i][m - n + i] != n - i) {
                        nxt = m + 1;
                    }
                }
                if (nxt > m) {
                    if (v < ans) {
                        ans = v;
                        l = i, r = k;
                        x = j;
                    }
                } else if (dp[k][nxt + k - i] > v) {
                    dp[k][nxt + k - i] = v;
                    g[k][nxt + k - i] = {i, j};
                }
            }
        }
    }
    
    std::string p;
    if (r < n) {
        p += '*';
    }
    while (l >= 0) {
        for (int i = r - 1; i >= l; i--) {
            p += a[i];
        }
        if (l > 0) {
            p += '*';
        }
        while (l > 0 && dp[l][x] == dp[l - 1][x]) {
            l--;
        }
        r = l;
        std::tie(l, x) = g[l][x];
    }
    std::reverse(p.begin(), p.end());
    
    std::cout << p << "\n";
    
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3628kb

input:

aabb
ab

output:

aa*

result:

ok correct

Test #2:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

abaabaaabbbaabbb
abaabbbaabaaabbb

output:

abaaba*

result:

ok correct

Test #3:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

amuletofyendor
amuletofshmendor

output:

*y*

result:

ok correct

Test #4:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

spbau
spbsu

output:

*a*

result:

ok correct

Test #5:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

b
abaabaaaabaababbabba

output:

b

result:

ok correct

Test #6:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

bbaabaaa
babbaabbbbababbaaab

output:

*a

result:

ok correct

Test #7:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

abb
baabababababbbb

output:

a*

result:

ok correct

Test #8:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

baaaaaaa
abaabbbaabbbba

output:

b*

result:

ok correct

Test #9:

score: 0
Accepted
time: 6ms
memory: 4140kb

input:

aaabbababbbabaaaaabababaabaabbbbaaabbabbabbbaaaabaabaaabbbaabbaaaabbabbabaababbaabbbabaabababbabbbbbbababbaaabbababbaababaabbbbbababbaaaabaabbabaababbabbbbaaababbbabbabbaabb
aabbbbbabbbaaababababaaaaabbbababbaaabababbbaabababbaabbaaabaaaabaaababaabaabbabaabaaaabbbaaababaabbbbbbbbaaaaaaaabbaaaaabbaab...

output:

*b

result:

ok correct

Test #10:

score: 0
Accepted
time: 1ms
memory: 4044kb

input:

bbaabaabbaaaabbbbabbaababababbbbababaaaa
abaabbaabbaaabbbaabaababaaaababbbbbbababbbaabbbabbbbbabababaabbababaabbbbbbbbaaababababaaababababbbabaababababaabababbaaaaaaaabbaaabbaabbbbaaabbbbbaaaaaaaaabababaaababbbbabbbbaaabbaaaababbaaababbbaaababaaaaabbbbbabaaabaabababbababababbabbaababbbabbaabbbbbbbab...

output:

b*

result:

ok correct

Test #11:

score: 0
Accepted
time: 16ms
memory: 4704kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaab...

output:

*babbabaabb*babbabaabbaababbab*abaababbaabbabaabb*

result:

ok correct

Test #12:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

aaaaaabbaaayxybbaaaaabbbb
aaaaaabaaaayxybbaaaaaabbb

output:

*bbbb

result:

ok correct

Test #13:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

bbbbaaaaabbyxyaaabbaaaaaa
bbbaaaaaabbyxyaaaabaaaaaa

output:

bbbb*

result:

ok correct

Test #14:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

bbbaabbbabaaabbbaababbabbbabbaaabbbbbaababb
bbbbbabbabbaaabaabbbababbbabaabaabbbbabaaaaabbabbbabababaaabaabbbbaaaaabaaaaabaaaabbbbabbaabababbbbaaaaabbabaaaabbabbbbbbaaaaaabaaaabbaababbbabbbbbaabbbabbabaaaaababaabaabbabbbabbbbbbabbababaabbaaaabbaaabbaabaababababbaabbababbabbaabaabbabbbbaabbaabaabbaba...

output:

*bb

result:

ok correct

Test #15:

score: 0
Accepted
time: 129ms
memory: 9568kb

input:

baabaabaabbbbaaaaabaaababbabbbbbaaaaabbbabaaaabaababaabbbbbabbbbababaabbabbabbbbaaaabbabaaababaabbbaabbbabbabbabaabaaaabbaaabaaaaabaaaabbbbabaabbbaabbaaabbbbabaabaabababaabbbbabaaabbaaaaababaaaababbabababaabbabaaababbaaaaaaaababbbaabaaabababbbbbabbbbbabbbababbbaabbaaabaababbbbabaaaabbbabbbaaababaaba...

output:

b*

result:

ok correct

Test #16:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

abaab
abbab

output:

aba*

result:

ok correct

Test #17:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

abbaababba
abbabaabba

output:

abbaa*

result:

ok correct

Test #18:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

abbabaababbaabbabaab
abbabaabbaababbabaab

output:

*abaaba*

result:

ok correct

Test #19:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

abbabaabbaababbaabbabaababbabaabbaababba
abbabaabbaababbabaababbaabbabaabbaababba

output:

*bbaababbaa*

result:

ok correct

Test #20:

score: 0
Accepted
time: 1ms
memory: 3956kb

input:

abbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaab
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaab

output:

*aabbab*aabbabaabb*

result:

ok correct

Test #21:

score: 0
Accepted
time: 2ms
memory: 3964kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababba
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabb...

output:

*aabbab*aabbabaabb*bbaababbab*

result:

ok correct

Test #22:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

abbab
abaab

output:

abb*

result:

ok correct

Test #23:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

abbabaabba
abbaababba

output:

abbab*

result:

ok correct

Test #24:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

abbabaabbaababbabaab
abbabaababbaabbabaab

output:

*abaabb*

result:

ok correct

Test #25:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

abbabaabbaababbabaababbaabbabaabbaababba
abbabaabbaababbaabbabaababbabaabbaababba

output:

*bbaababbab*

result:

ok correct

Test #26:

score: 0
Accepted
time: 1ms
memory: 3672kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaab
abbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaab

output:

*aabbab*aabbabaaba*

result:

ok correct

Test #27:

score: 0
Accepted
time: 2ms
memory: 3964kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababba
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabb...

output:

*babbabaabb*bbaababbaa*babbaa*

result:

ok correct

Test #28:

score: 0
Accepted
time: 13ms
memory: 4620kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaab...

output:

*aabbabaabbaababbab*abaababbaabbabaaba*aabbabaaba*

result:

ok correct

Test #29:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

c
baccaab

output:

c

result:

ok correct

Test #30:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

cbbaacccaaaacaaabbac
bcbaa

output:

c*

result:

ok correct

Test #31:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

bcabbbbaab
acbb

output:

b*

result:

ok correct

Test #32:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

abbba
abbaaabbbcaacbccbca

output:

*ba

result:

ok correct

Test #33:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

bbba
abbabbacacaccbaacaaa

output:

b*

result:

ok correct

Test #34:

score: 0
Accepted
time: 3ms
memory: 3880kb

input:

babaacbaaacbaccaabcaccbbaccaaabbabbccbbbacababacaccbcaacccbbaacabbcccbcbcbbaabbacccbccbbcbbbabbabcbbcaacacaccabccbcabcbaacccacaaccbaaaccbacaacbbbbcaba
cabaaaacaabbcbacbbccaabacacabcbbabaabcabcbccaabccccbccbcbccaaabcccccacbcaacbcbaaccabbbcbcaaccbabcaaccacabbbccaccccacacbbacaacbbcacbbbbcbaabacabbababa...

output:

b*

result:

ok correct

Test #35:

score: 0
Accepted
time: 98ms
memory: 8348kb

input:

cbcacacbbbbcbbccaabbcccbaaacabcbbabaccbbabbaacccacababaaaabbbbcbcbcccbbcccaccbcccbabcabcbbbcbaacbbbcaccbbbcbbabacccacaaaaabcaaaccaccbbbbcbccabcacaaccaacacccababacaccabcccacbcaabbbbcabacaabacaaaabcaccbabbccabcbcacccbcacaabaacccbcbaccbbabaabcbcbabbbabcbaabababbbcbbcaacabcccccbcababbccabcbcabaacbbbccbb...

output:

c*

result:

ok correct

Test #36:

score: 0
Accepted
time: 123ms
memory: 9036kb

input:

bacbaabcccccabacbaaaabbbcbacbabcabbaccabbccacabbaabcacbccbababbbbacbcbbbcacaabababaccacbacacbaabccabcccbcbcbbacababcacaabcbbbcabbbaaacabaaacaccccbbbaaabacccacbbbbbaabbababbacbcaaacaabcccbbcacccbaacaababcbbbbcbaaccbabbacccaccbbabbbcaaccbbaaabccaabcabbbbaacbccccbaccbabcbcbbcabacacaabcabbcbbbaabaabcbaa...

output:

b*

result:

ok correct

Test #37:

score: 0
Accepted
time: 5ms
memory: 3900kb

input:

bacacabcaaaacbbabbcbbbaccabbbccccccabbbccabbabcabcccabbbbaacccbccaccacaabcaacbcbaababbcabcaccabcaaabbaabaacccaccccbcbabababcabcbbabacbacccbacabaacacbbacccaaccbbcaacccbaacacaccabacbbbccccbcccabbcccabbacbbaaaaccaaabccbbacbaacbcbcacccbaa
aaabbcbbcacaccccccbacacbabcccbbacbbbcacacaccccaaaaaabbbbcbccbbcca...

output:

b*

result:

ok correct

Test #38:

score: 0
Accepted
time: 16ms
memory: 4320kb

input:

aaabacbccabbcbcacaaabababccbabbbacccccbbcbbaaacbabbcaaccabacbbacacaacbcacbbacbacccabcbacaaabbacbccbbabbccaabbbabccabbaabbbbcaccccabaabbbcbacacabbcaaaaaacaccbcabcccaacbaacbccabccbbbbbcabbbbbcbcccbcbaaacccaccccbcbbcbcaaccacbabcaaabacabaacbcbbabbcbcbcbacaaaccaccaccccbacabaababbbcccbbcbabacbbbbbccbbcaac...

output:

*b

result:

ok correct

Test #39:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

lflpycarhnsyy
dsiouaolhlzmpy

output:

l*

result:

ok correct

Test #40:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

ktoph
mepp

output:

k*

result:

ok correct

Test #41:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

gsnjrwbwyyrso
whodehlflazqn

output:

g*

result:

ok correct

Test #42:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

rstjl
j

output:

r*

result:

ok correct

Test #43:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

likiiaihmmmdneaey
kq

output:

l*

result:

ok correct

Test #44:

score: 0
Accepted
time: 14ms
memory: 4436kb

input:

qwaiqvnrejukzzrxckcbxiluoulcdonjpxbnaunwwacsgzwtnxikrsnjesjqtvkhefzzxosmuesorinxoetsqrqztqgkmfiqbbudrszmguofdqakaeqycnljohzgjiuchxevoidrufeaohhcqavibrmavlfxjkuvjavvyooffmldoddesijwasteapqthtllclksecfsqorakqgqmzwhggvcyhfycjmmgbdolqcfeswtuajjejdkihxaiozbaqvowxcidchldrjvthachxcpqdzszacixfvrdafowwusccdf...

output:

q*

result:

ok correct

Test #45:

score: 0
Accepted
time: 7ms
memory: 4144kb

input:

omhuwyukjnwytkqaqeinjoxxsmnmcuneqhdscyaqwchqiteyicrvetqhpmkppnwjzqsgqnhjldzlojfxdranfgkaivwqaxxdkzsyphzhlzcfesbvfbyrkqyjzuhtwbwlxfyttojbtesytfutoevsglvnimdapmwqvdeliqizhapbobctjatcuifjfuaekyijodzqbgzgtfysmzgophxvlrpqagbpoacpvxhwsytsestcibeqyezdpvi
hkelcasxpjysyuauiueibapyqbbnwtlinxryuzmwwckmqyigebhe...

output:

o*

result:

ok correct

Test #46:

score: 0
Accepted
time: 7ms
memory: 3920kb

input:

nqjciwgodkpnbtehhvwlhfzrjajgrvwfzysxtkxrvkinqdncfhpgzvemleajfgctjragnjmllqbbytukmueamclxwqtgpqqpefxtmqccmzmxzdpvllwqiyokuaohilfdepuxzvowcuhhrvexzfzslxxzjtshlgcjynxkzlninjpeyridotayrmlhoczqqokzvjxkwwqmohahtnpihgdbkfgtwaxpzxgovinahhazlemawxqwxswjnvhremqrc
sxlfhwlruoqqztntciugaucppzctrcphctlelmrrwwjbaz...

output:

n*

result:

ok correct

Test #47:

score: 0
Accepted
time: 147ms
memory: 10444kb

input:

tiupunfbiiscxbjfpuegqjwvbouywzvnjcbdiktvumuqqztqfjzqhyuykgooryhdyqtbempubutwovfkaykhagzyeljpdpqqyhhfiimkvexnuoxjblyuznxgzrjkzybpwfrspfiscyunxoembspdzuiviqqtgxihqqhtwrwixogfdvwqugpsqedfdfxrpckwsmxerbthscwyxcsaywnrnfqauowenpaysjnxbtperzmyeivehcrcvbhnlrjzcxuopxguwodyebmitnztvshpnpcdyqpwddrebhbbbbsivkxd...

output:

t*

result:

ok correct

Test #48:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

ejiefhutyzamobntnorglkiqdcei
fzsixfuohiwvvpmglnizuyqpbfnyfefksgpuukpdyoubtftrpwwznwwyxnfktiblqtjmxltijzvyxuhdaxovggpswazsibugtjtszpllotibwwevuoftrbewpyulyogtaqmujsjcxwjjvfipftikjjjkdtxymxlclnbycxoyjwzitwlwaaqcnapiizodxjmiextuscgeorhoauunyvjejnnyqmgfieleugzmckdawbpszmbb

output:

e*

result:

ok correct

Test #49:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

ababab
abbaab

output:

aba*

result:

ok correct

Test #50:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

abbaabbaabba
abbabaababba

output:

abbaa*

result:

ok correct

Test #51:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

abbabaababbabaababbabaab
abbabaabbaababbaabbabaab

output:

*abaaba*

result:

ok correct

Test #52:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

abbabaabbaababbaabbabaabbaababbaabbabaabbaababba
abbabaabbaababbabaababbaabbabaababbabaabbaababba

output:

*bbaababbaa*

result:

ok correct

Test #53:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

abbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaab
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaab

output:

*abaababbaabbabaaba*

result:

ok correct

Test #54:

score: 0
Accepted
time: 4ms
memory: 4272kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababba
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaa...

output:

*aabbab*aabbabaabbaababbaa*babbaa*

result:

ok correct

Test #55:

score: 0
Accepted
time: 27ms
memory: 5564kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabba...

output:

*babbabaabb*babbabaabbaababbabaababbaabbabaaba*aabbabaaba*

result:

ok correct

Test #56:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

abbaab
ababab

output:

abb*

result:

ok correct

Test #57:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

abbabaababba
abbaabbaabba

output:

*bab*

result:

ok correct

Test #58:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

abbabaabbaababbaabbabaab
abbabaababbabaababbabaab

output:

*aabb*

result:

ok correct

Test #59:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

abbabaabbaababbabaababbaabbabaababbabaabbaababba
abbabaabbaababbaabbabaabbaababbaabbabaabbaababba

output:

*babbab*

result:

ok correct

Test #60:

score: 0
Accepted
time: 1ms
memory: 4004kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaab
abbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaab

output:

*aabbabaabb*

result:

ok correct

Test #61:

score: 0
Accepted
time: 4ms
memory: 4060kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababba
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabb...

output:

*babbabaabbaababbab*

result:

ok correct

Test #62:

score: 0
Accepted
time: 26ms
memory: 5376kb

input:

abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabba...

output:

*aabbabaabbaababbabaababbaabbabaabb*

result:

ok correct

Test #63:

score: 0
Accepted
time: 178ms
memory: 10900kb

input:

aabbabbabbaaabbabbaaabaabbabababbabbbbaaabaabbbbaaaaaaaaabbaaabbaababbaabbbabaaabaaaaababaabaaaabbabbbaabbbbbbabbbbbbbbaaabbbbabbabbbaaaaabababbbbaababaaabbababaababaaaaaaabbabaababaaabbbbabbbbbbaaababbaaaaabbabababaaaababbbaaaaaaaaababbbbbaabbbababbbaaaabaaabaabbabbaabababbaabbaababbaaaabbaaabbbbaa...

output:

*abbbabaa*

result:

ok correct

Test #64:

score: 0
Accepted
time: 194ms
memory: 11148kb

input:

baaabaaabbabbabbbbbbbaababbaaaaababbabababbbaaaaaabbabbbbbaabababbbbbbabaaaaaabbbaaabababbaaaabababaabbbabaabaabbbbabbaaaaabbaabbbababbaababbbabbaabbaaaaaabbbababbbaabababaababaabaabbabbbaaababbbbaabbabbbaaaabbabbbabbaaaabbbaaabbaabbbbbbbbaabbbbbaabbaaababaaabbabbbabbbbaabbbbabbababbbaaaabbaabaabbba...

output:

baaabaaa*

result:

ok correct

Test #65:

score: 0
Accepted
time: 144ms
memory: 11156kb

input:

bbbbbbbbabaaaabbababbabaaaaaabbabbabaaaabbbbbababbabbaabaaaaabaaaaaaabbaabbbabbabaaabbaaabaaaaaabaabaababababababbbbaabbbbaaabbbbaaabbbabbabbbbbbaabbbbbbabaabbaaaababbaabbabbbbbabbbaabaabbbabbabbaaabbbabaaabaaabaabbbabbaaaabbbbbbaaaabbabbabbaabaaaabbbbababbaababbbbbbabbaababbbaaabbabaaaaabaaaaaabaaa...

output:

*baaaaabb*

result:

ok correct

Test #66:

score: 0
Accepted
time: 161ms
memory: 10960kb

input:

babababbbbbaabbababbabaababaabbaaaabbbaabaaabbbbbbaaabbabbbbaaaaaabaaaaabbaaaaababbbababbbbaaaaaaaaabbbbaaabbbbaaaaaabbababbbbbbaabababbaaaaabaaabbbaaababababbabbbbbaaabaaabaaaababbabbaabbbbaabaababbabbbbabbbabbbbabbabaaabbbbabaabaaabbabababbbabaabbaaabababbbaaaabbabaaaaaabababaabbabaaabaabbaaabbabb...

output:

*abaaabbab*

result:

ok correct

Test #67:

score: 0
Accepted
time: 140ms
memory: 11008kb

input:

baabbabaabababbabbabaaabbaaaabbbbaaabbabaabaaaaabbbbbbbbaaaabababababaababbaaabaaaaaababbabaaaababaaabbabaaaababbbabbabaaabbbaaabbbbaaaababaaaaabbaaaaaabbaabbbaaaabbbbbbbbbbbabbabbbbbbabaabaabbbaababaaabaaabbaabaabbbbabaabaabbabbbaaaaaabbaaaaaabbaabbbaaaaaaaabaabbabaaabbaabbabaaaaabbabbbabaaabbbabab...

output:

*babababb*

result:

ok correct

Test #68:

score: 0
Accepted
time: 144ms
memory: 10956kb

input:

bbbabaababaaaabbbabbaababababababbaabaaabbbabbbaabaaaababaaabaabbaaaabaabbbaaaaaaaaaaabbbbabaababaabaaabaaababaaababaabbababbabbaaabbbabbbabbbabbbaaabbbabaaabbaaaabbbbbbaaaaabbbbbabaaaabbababaabbabababaabaaababbbbbabababbaabbbbbabbbaabbaaaabbbbbbbaabaaaabaabbbbaabbaaaabaabbaababbaabbbbababaababaabbb...

output:

*baaabbbbba*

result:

ok correct

Test #69:

score: 0
Accepted
time: 155ms
memory: 11040kb

input:

baabbbaaabbbaaaabaabbaaabaaabbbaababbbabbbabbbbababaaabaabaaaaaaaaaaababbbaabbabbbbbbbaababbaabbbabbabbbbababbaabaabbabaabbaaaabaaaaabbaaaaaabbaabaabbabbabbababaaabaabbbbaaaaabaabbaaabaaaabababbbaabbbaaaaabaabbbbabaaababaaabbaabaabaaabaabbbabaaaaaabaaaaabbaaaaabbbbaabaaaaabbbaabaabbbaabbaaaaaaaabbba...

output:

*bbbabbaab*

result:

ok correct

Test #70:

score: 0
Accepted
time: 183ms
memory: 11116kb

input:

bbaaaabaaababbbabbaaaaabbbaabababaabbaaaabaabbbaabbbabbaabaabaabbbbabaabaabbbaabababaaaabaaaaaaabbaabababbaaabbbaaaabbbbbabbaaabaabbaaaabbbbabbaabaabbbaaabbaaaababbbbabbbaababbabbaaaababaabbbabaabbaaaaabaaabbbbbbaabaabbbababbabbbabbbbaaabbbaabaababbabababbbbbabbbaaababaababbbaaabbbbbbaababaabbaaabab...

output:

*abaabbbba*

result:

ok correct

Test #71:

score: 0
Accepted
time: 158ms
memory: 10988kb

input:

bbbaaabbaaaabbbaababbaababaaabbaabbbbaababbbabbaaaabaababaabababaaaabbabaaaaabbabbabaababbaabaaaabbbaababbbbabbbbbaababababaababaaabbababababbbbaaabaabbaababbabbaabbaaabaabaabbabaaabbbaababaaaaaababbaaabbbaababaaabbbbababbbbababaababbabababbabaaaabaaababaabababbbabbbbbbbbaabaaabbbaabaaabbbabbababbbb...

output:

*bbbababbb*

result:

ok correct

Test #72:

score: 0
Accepted
time: 156ms
memory: 10916kb

input:

bbbaababbbabaabaabbbababababbbbaaababaababbbbaaaaabababaabbaabbbbbabbbabbababaababaaabbbaabaaabbbbaaabbbabbabbbbaababbaaaaabbbabaaaabbbbabaaabbbbabbbbaaabbabaababbaabbbabaabababaaaaabababaaababbbabbbaaaaabbabbbbbabbbbaabbbbaaabbaaaabbbbbbabababbbbaaaababaaaabaaaaabbabababbbabbabbbabababaaabaaaaabbaa...

output:

*aaaabbaaa*

result:

ok correct

Test #73:

score: 0
Accepted
time: 154ms
memory: 10920kb

input:

cbabaaabaabbabacaacaaabcabcbcacaabbbcbbcbaaabcacacccbaccacbbcbbcabbcbbcaaabbcbbacbabcccaabcaababcbaabcbcacbcbbaacaabababaccbccacabaabccccacccacbacbcbacabccabcabcabcaacbaabaacaaaaccccccccaabaaccaacaabbacbcbaaacaccacabbcabbbaacbbbcabaccbcbcbabaaaacbabbacaaaacaacacabbcbbcaaabbbccaacbaaccccabccbabaabcbc...

output:

*abbaca*

result:

ok correct

Test #74:

score: 0
Accepted
time: 151ms
memory: 10992kb

input:

caacccccabcccccaabccbbcbacbbaaaaababbacbcaccabbbbcabcabccbccccbbbbbcbabaaaccccbaaccaaaccabcbcbcbaabcacbbcbbcabacabcccacbcaacccabaabbbcbcabccabaccbabbbbccaaaabaaaaabccccabbacabccbcabcaabbcbacbcbabcbcbaaaacbbaaccccbaabbbbbaabcaccbabccbbababbbaacbaaabbcbcbbbbcacabcaabbbccaabaacccccacaababcbabbccacaaaac...

output:

*cabbaa*

result:

ok correct

Test #75:

score: 0
Accepted
time: 149ms
memory: 11024kb

input:

cabbabaababbbabbbbbcabbaabcabbaacbcbbaabaacabbbbbcbcbcacbcbcbcacbcccaaccccaabaaabcabaabaaacbacccacbcaaaabcbbccaacababccbaaaacbaccabcabacabbbbccbacccabbbbbbaccabbcacabbbabcccbbcccbbabbccbcccaaabcabaabcccacaaaacaabbbcacccbcbbccacbaacaaccbcccccbaabaabbaaaccbbababbbbacaaaccacaccccbcbaaccaccbcbaacccbcacc...

output:

*acacb*

result:

ok correct

Test #76:

score: 0
Accepted
time: 148ms
memory: 11116kb

input:

aaaccbbcbcccaabccbacbaacbbccccaacbcbacbaaacbccbcbbcaccbacbcabbcabcaaccaccbbbabcbccabaaabaacabaccbcacaaaabcacbabbbcbaababcbcbcacbccbbcbacbbaccaaabaaaaaacababbcccbcabccbabcbbcbbaccabacaaabacabbbacacccaabccbcbbaaacbabbbcbbbbbacbaacaccabbabcbbbbbabccbbbbccacaaaaacbabaccabababaccacabbaacaacabbcbacbbbcabc...

output:

*cbbcab*

result:

ok correct

Test #77:

score: 0
Accepted
time: 147ms
memory: 10960kb

input:

bbccabbaaacaabccbbcabaabacacccbcbcacacbbabcaabbcbbbabacbbccbcbbacbbbccbbbaaaacbababbbbacbabbcccaaacaacaaabababbacabccacbabccacaabbbbcbcacbcaaabaabbabccbccbacbbcccaabababbbcbccccbbaacaacbababcaaacbbcabaaacbabcccbbbccbcccaaaaacabcaaaaaccaaabacbbcbcbababcbabbaabaabbabbabaabbabcaaacabcbbcbacbbcbacababcc...

output:

*cbccbc*

result:

ok correct

Test #78:

score: 0
Accepted
time: 149ms
memory: 11052kb

input:

lpttdhethqqjsrubvpdqeovuoplraehsetbotseeccifeigbhnvuevaebtbdsprgjoqcsffsfhfarsinftmposbqrdckmvnmjaecapcpsmrpcdaifaonvcqocctnnsblmrrcdqkoielilvjfcehjulaiiqqnjqvfggtkifvmgdvaieejlhfmfqsbaoancnqkgsclbbonggedmsiqrsuaehifupvhdrkgnutviqaptfndvbueomvvfaddagpqcfqdveaelalfinvdpdrlrumcsdoqhikjafqlhnhraniugohn...

output:

*sd*

result:

ok correct

Test #79:

score: 0
Accepted
time: 146ms
memory: 11116kb

input:

oritciiecdskatgrbgfktnwtcnkbgokhvtjdnsvskfhsuhdaliempcinwhgqhltimclbvorwgpjdsdfspldiurhkrlwtsuohjpcsfhpohatgpqnkaonhftitshupwoklnhvgjamhdfhkbjtomjkbfqbmffgmtgspfnumgdfbuglicskmlcefeuaqmlobsgtgkgmhuieshisrbgifurucoqivthhogdjskdfcjpwiieernhmcdrgsrlapsiucqjuehucqlrimhwumjvqiwfovovegttgqovabdqbodfqjcqdm...

output:

*vwo*

result:

ok correct

Test #80:

score: 0
Accepted
time: 144ms
memory: 11048kb

input:

updqlfbekkkdanokirpipkpsnwgngbpeurgklrbjiqajpbkeifvouucscddhairrabwessumieqpcthmvitvcwrabaterhfgfrwsuenxutntexhofpktvssjabsaksxwfhcbmmjhkhujktxwevrtixhbkcnhswkwwfxmhgfpnoitqqtpuvjkxhfldhhglwukdrqxanlfbsvpbfhpcnitioivhufabxxwqvkofwadcbaislpqtprkfrmrcvkjsnbnjpigheagnvulxrxgkjbtdmvujwcoqtmedcgcfuhsemos...

output:

*asm*

result:

ok correct

Test #81:

score: 0
Accepted
time: 147ms
memory: 11112kb

input:

qvmxredpqwnnijojyaooivkyhlakakxcknvuyyokyjmxdcrdcfxjtscayyakvcuxproyhhkcutvvdebbmqgfyvfkmhcimudfhnmqtjkjgwxmnepdmmsreotldpunphyemtgbuigpstrvwyxspenfsnsqvyqrtfassiulcmctdpjlytqkiyypagstoqwmdocvofywwpmotkeakcrlmtbwwbfqcvjnkdtbmgwkrvnawfaqngijytjryufyftrreslvjacrxwcfpskperradbpsqcoanajpwpxinunejseqdanf...

output:

*ckx*

result:

ok correct

Test #82:

score: 0
Accepted
time: 141ms
memory: 10896kb

input:

brleofcmbhtgyjhaoqqmdtzyyakmidnbqnsisunzorvahityskealvozpjrlcyuzsnezbueqnbcjsxjobuiqjiebzeeayxtwxqowjiubyfvytrazgatudhfshhuunqkgmpoxjueebvaitdincjxthsqcvqwsjxldttmvdcxxksygghpfvwhrahtfxqxtljbfnuujoamdqicjkrwlneudalkuuyibrhmlbyjmbusehslqlfbmihvxarkaxkpxlrovmaurmwuwcxzgdsjylduqdpzgqvgzyhkieryzjgafsxry...

output:

*lm*

result:

ok correct

Test #83:

score: 0
Accepted
time: 34ms
memory: 7088kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok correct

Test #84:

score: 0
Accepted
time: 34ms
memory: 7092kb

input:

abaaacbbcbbbcabbcbaabbaabcbaccaaacaaccbbcbbaaacaccaabccccabbbcabccbbcccbcbbbbcababbbbaaaaacbbacbbcbabacbbccaabbcabbabacaaacccbacbaccbcbbbbabbbbbabbbbacbbbcaaabbbbbccabbcccbbcaabacaacabababacabcaaabaabcccbacbcbbaabcababbcbacbbcbccabbcaccacaacaaccacbbaccccbcbcabcabcaabbbbacbbaaacbcbaabccabbabcababbbcb...

output:

abaaacbbcbbbcabbcbaabbaabcbaccaaacaaccbbcbbaaacaccaabccccabbbcabccbbcccbcbbbbcababbbbaaaaacbbacbbcbabacbbccaabbcabbabacaaacccbacbaccbcbbbbabbbbbabbbbacbbbcaaabbbbbccabbcccbbcaabacaacabababacabcaaabaabcccbacbcbbaabcababbcbacbbcbccabbcaccacaacaaccacbbaccccbcbcabcabcaabbbbacbbaaacbcbaabccabbabcababbbcb...

result:

ok correct

Test #85:

score: 0
Accepted
time: 30ms
memory: 7012kb

input:

caccabacbaaaabacbacbabbaccbaabaaabbcbbbbbccbaaacbaacaabcbcaabbbbacbaccbacaabbcbabcabcabbbacacccccbbaacacaabbcaaabacbabbcacccabaccacaacabacccabbbaacbbcbababccaaccccccbaacacbbababacacbbbcccaaccbbbbabcbabcaabcacbbccbbcacccacaabcbaaccabccbaaacaacccccbbccbcaccaccaccbacbaccbcbabacaccbcaaabcbccbbbacabbaabb...

output:

caccabacbaaaabacbacbabbaccbaabaaabbcbbbbbccbaaacbaacaabcbcaabbbbacbaccbacaabbcbabcabcabbbacacccccbbaacacaabbcaaabacbabbcacccabaccacaacabacccabbbaacbbcbababccaaccccccbaacacbbababacacbbbcccaaccbbbbabcbabcaabcacbbccbbcacccacaabcbaaccabccbaaacaacccccbbccbcaccaccaccbacbaccbcbabacaccbcaaabcbccbbbacabbaabb...

result:

ok correct

Test #86:

score: 0
Accepted
time: 34ms
memory: 7076kb

input:

bbacaaacacabccaabbccbaacababbbaaaaabacabcbabababbaacbbbccabbaabaaabcccbbbcccbbbccbabcabcbcbabccbbcacaaacaacccabbbcaabbcaabbbcabcccaccbacccabbabccabaacaaaabbbcbcaabaaabcaababbacbbaaccaccbbbbbccccccbacabbbaaccaacaccabbcabcabbbaacccbbccaaccababacababbaaccaabaacbaccbcbccbcaacbcaaaababbbbcabaabcaabaccbab...

output:

bbacaaacacabccaabbccbaacababbbaaaaabacabcbabababbaacbbbccabbaabaaabcccbbbcccbbbccbabcabcbcbabccbbcacaaacaacccabbbcaabbcaabbbcabcccaccbacccabbabccabaacaaaabbbcbcaabaaabcaababbacbbaaccaccbbbbbccccccbacabbbaaccaacaccabbcabcabbbaacccbbccaaccababacababbaaccaabaacbaccbcbccbcaacbcaaaababbbbcabaabcaabaccbab...

result:

ok correct

Test #87:

score: 0
Accepted
time: 34ms
memory: 7152kb

input:

cbaacbacbbcccaacccccbacaacacccbccbcbbacabacaaaccbbaaacabbbbabcbbacaccccaccbbaccaabcbbcbcaabbbacbcaccaaacbabaccbabacababcaaacacabacbacccccbbbacacacbabbccbacabcbacaccacbcabbcaccabcccacaccbababbbabcaabacacacccbcbaacabcbcacbcbbbcacacccbbcaccabbacccccbaabaccbcbcbbabaaccbbccababaabbcbcccbaccacabaabaaaacbb...

output:

cbaacbacbbcccaacccccbacaacacccbccbcbbacabacaaaccbbaaacabbbbabcbbacaccccaccbbaccaabcbbcbcaabbbacbcaccaaacbabaccbabacababcaaacacabacbacccccbbbacacacbabbccbacabcbacaccacbcabbcaccabcccacaccbababbbabcaabacacacccbcbaacabcbcacbcbbbcacacccbbcaccabbacccccbaabaccbcbcbbabaaccbbccababaabbcbcccbaccacabaabaaaacbb...

result:

ok correct

Test #88:

score: 0
Accepted
time: 34ms
memory: 7084kb

input:

oqpeeurbbpugsvnnntpibqqktcsqhnuhmtcijvklgmutcurhmgkabcfjttbchvhjsgkuboodccerabgbjrljcrhbccjcjvevilrtkarrdgfoflistdlbquernscrjobtenftkqumdqtpbgqtiuegpkvooqukrhnqddbvsikqqccnnmjusldpikmmdfqnmrjqfbosvikndoftickaveckumoctfadfaolbdsddndtmhquhiuvuljhfuivmbvfgklpnuesatecndqbrukvfpirqlvrksraaqbcpphcrgthlouu...

output:

oqpeeurbbpugsvnnntpibqqktcsqhnuhmtcijvklgmutcurhmgkabcfjttbchvhjsgkuboodccerabgbjrljcrhbccjcjvevilrtkarrdgfoflistdlbquernscrjobtenftkqumdqtpbgqtiuegpkvooqukrhnqddbvsikqqccnnmjusldpikmmdfqnmrjqfbosvikndoftickaveckumoctfadfaolbdsddndtmhquhiuvuljhfuivmbvfgklpnuesatecndqbrukvfpirqlvrksraaqbcpphcrgthlouu...

result:

ok correct

Test #89:

score: 0
Accepted
time: 34ms
memory: 6940kb

input:

beebqjfbomrwfregviikpjvmjkdedowbugroutqkajqqfluveqtatqmknvsuhsvsklcboguqdbjalqmpsjlspurkkfhdkabncmlgfcfkapvcmmiiauewsjrrjmjiqtbektwhoojibdqeiocmodcrbndcmltnajfudldthmacipjtwaaequdlemrmphraucwsjpeulnnhbfkivpbtedthicqbjlevsgflkhpsefonqoclgfauostebqjkcglmcfemqitilhmujkatuuluuosdaewawnntslahctrilwiipdal...

output:

beebqjfbomrwfregviikpjvmjkdedowbugroutqkajqqfluveqtatqmknvsuhsvsklcboguqdbjalqmpsjlspurkkfhdkabncmlgfcfkapvcmmiiauewsjrrjmjiqtbektwhoojibdqeiocmodcrbndcmltnajfudldthmacipjtwaaequdlemrmphraucwsjpeulnnhbfkivpbtedthicqbjlevsgflkhpsefonqoclgfauostebqjkcglmcfemqitilhmujkatuuluuosdaewawnntslahctrilwiipdal...

result:

ok correct

Test #90:

score: 0
Accepted
time: 30ms
memory: 7152kb

input:

gdotvmmbeechgqfbtrlbhpegvbsusuhxlgvnqgqackqupttlhbpkppnqctrlpuoogqwlmbhrhekclgmessxkcttgatovcolpkoojxlgjoxtvfdwjqbatvqtebfmwvncmudjllxhtdwxrtqmvfkfstippdxqcomhuwvcvfkpelgukhiseoblekbulrdgfpjhagnfsrgdpqdeuwhdlgjnduoxcivrkuxmwxchitrvaqrdttjnfspqewlcldlohtttswgmrgnkuhdokutlpuwxdevspoxawgxbwnghlxixoxnqx...

output:

gdotvmmbeechgqfbtrlbhpegvbsusuhxlgvnqgqackqupttlhbpkppnqctrlpuoogqwlmbhrhekclgmessxkcttgatovcolpkoojxlgjoxtvfdwjqbatvqtebfmwvncmudjllxhtdwxrtqmvfkfstippdxqcomhuwvcvfkpelgukhiseoblekbulrdgfpjhagnfsrgdpqdeuwhdlgjnduoxcivrkuxmwxchitrvaqrdttjnfspqewlcldlohtttswgmrgnkuhdokutlpuwxdevspoxawgxbwnghlxixoxnqx...

result:

ok correct

Test #91:

score: 0
Accepted
time: 34ms
memory: 7032kb

input:

vqsplnrrpygmgkcaysijveybkaqeuewlmmxgmosgyyiwumldhnfbkinmiftgfllljkinqjqfumialwnuuxxlduswtegrcnjedxshpqnmctiqhmytlqchpjeditklxvttsbsvtqltnkvkutynxunrgelrrxixhrqklwfxojjlsieilwnmaojveaafcculkfqrfnlqvoecudldhtyxyultjbqfcbjrruieltwgqkoqgrgjeyovaklhncarpcywrqqqmhxbojktkmbmqxwkngpglfmgsjjttfehcbdeyecdmqid...

output:

vqsplnrrpygmgkcaysijveybkaqeuewlmmxgmosgyyiwumldhnfbkinmiftgfllljkinqjqfumialwnuuxxlduswtegrcnjedxshpqnmctiqhmytlqchpjeditklxvttsbsvtqltnkvkutynxunrgelrrxixhrqklwfxojjlsieilwnmaojveaafcculkfqrfnlqvoecudldhtyxyultjbqfcbjrruieltwgqkoqgrgjeyovaklhncarpcywrqqqmhxbojktkmbmqxwkngpglfmgsjjttfehcbdeyecdmqid...

result:

ok correct

Test #92:

score: 0
Accepted
time: 31ms
memory: 6940kb

input:

lfnlppeoabfwytscfhmduuooxnexvggdjvelizuofgzxqrjtgyqcxutfhdlkhmpbpikdtnaaywxdpjftuvmupiinnouyborqhmlkmuphmrxbfqvrfeupjfaodaqatoxxkcdoxyimghfnwltyvdlppypfobihzdcemhfwiorftmbtupvdbhvkmffsysccbhuuuhllmmvzdhdebzzgdymovjpazzehvjtwvbfszodcauzejbzqzgvsyyugwdhjdosagbsnkyztzgmpxudgkzwzsuwkfpnxgyejqmbqrvfzsujf...

output:

lfnlppeoabfwytscfhmduuooxnexvggdjvelizuofgzxqrjtgyqcxutfhdlkhmpbpikdtnaaywxdpjftuvmupiinnouyborqhmlkmuphmrxbfqvrfeupjfaodaqatoxxkcdoxyimghfnwltyvdlppypfobihzdcemhfwiorftmbtupvdbhvkmffsysccbhuuuhllmmvzdhdebzzgdymovjpazzehvjtwvbfszodcauzejbzqzgvsyyugwdhjdosagbsnkyztzgmpxudgkzwzsuwkfpnxgyejqmbqrvfzsujf...

result:

ok correct

Test #93:

score: 0
Accepted
time: 144ms
memory: 11048kb

input:

bbbabaababaaaabbbabbaababababababbaabaaabbbabbbaabaaaababaaabaabbaaaabaabbbaaaaaaaaaaabbbbabaababaabaaabaaababaaababaabbababbabbaaabbbabbbabbbabbbaaabbbabaaabbaaaabbbbbbaaaaabbbbbabaaaabbababaabbabababaabaaababbbbbabababbaabbbbbabbbaabbaaaabbbbbbbaabaaaabaabbbbaabbaaaabaabbaababbaabbbbababaababaabbb...

output:

*aababbab*

result:

ok correct

Test #94:

score: 0
Accepted
time: 174ms
memory: 10932kb

input:

baabbbaaabbbaaaabaabbaaabaaabbbaababbbabbbabbbbababaaabaabaaaaaaaaaaababbbaabbabbbbbbbaababbaabbbabbabbbbababbaabaabbabaabbaaaabaaaaabbaaaaaabbaabaabbabbabbababaaabaabbbbaaaaabaabbaaabaaaabababbbaabbbaaaaabaabbbbabaaababaaabbaabaabaaabaabbbabaaaaaabaaaaabbaaaaabbbbaabaaaaabbbaabaabbbaabbaaaaaaaabbba...

output:

*bbbabbbba*

result:

ok correct

Test #95:

score: 0
Accepted
time: 167ms
memory: 10976kb

input:

bbaaaabaaababbbabbaaaaabbbaabababaabbaaaabaabbbaabbbabbaabaabaabbbbabaabaabbbaabababaaaabaaaaaaabbaabababbaaabbbaaaabbbbbabbaaabaabbaaaabbbbabbaabaabbbaaabbaaaababbbbabbbaababbabbaaaababaabbbabaabbaaaaabaaabbbbbbaabaabbbababbabbbabbbbaaabbbaabaababbabababbbbbabbbaaababaababbbaaabbbbbbaababaabbaaabab...

output:

*bbbbabaab*

result:

ok correct

Test #96:

score: 0
Accepted
time: 156ms
memory: 11080kb

input:

bbbaaabbaaaabbbaababbaababaaabbaabbbbaababbbabbaaaabaababaabababaaaabbabaaaaabbabbabaababbaabaaaabbbaababbbbabbbbbaababababaababaaabbababababbbbaaabaabbaababbabbaabbaaabaabaabbabaaabbbaababaaaaaababbaaabbbaababaaabbbbababbbbababaababbabababbabaaaabaaababaabababbbabbbbbbbbaabaaabbbaabaaabbbabbababbbb...

output:

*bbbababbb*

result:

ok correct

Test #97:

score: 0
Accepted
time: 159ms
memory: 11152kb

input:

bbbaababbbabaabaabbbababababbbbaaababaababbbbaaaaabababaabbaabbbbbabbbabbababaababaaabbbaabaaabbbbaaabbbabbabbbbaababbaaaaabbbabaaaabbbbabaaabbbbabbbbaaabbabaababbaabbbabaabababaaaaabababaaababbbabbbaaaaabbabbbbbabbbbaabbbbaaabbaaaabbbbbbabababbbbaaaababaaaabaaaaabbabababbbabbabbbabababaaabaaaaabbaa...

output:

*aabbabab*

result:

ok correct

Test #98:

score: 0
Accepted
time: 176ms
memory: 11044kb

input:

cbabaaabaabbabacaacaaabcabcbcacaabbbcbbcbaaabcacacccbaccacbbcbbcabbcbbcaaabbcbbacbabcccaabcaababcbaabcbcacbcbbaacaabababaccbccacabaabccccacccacbacbcbacabccabcabcabcaacbaabaacaaaaccccccccaabaaccaacaabbacbcbaaacaccacabbcabbbaacbbbcabaccbcbcbabaaaacbabbacaaaacaacacabbcbbcaaabbbccaacbaaccccabccbabaabcbc...

output:

*acaccc*

result:

ok correct

Test #99:

score: 0
Accepted
time: 153ms
memory: 10928kb

input:

caacccccabcccccaabccbbcbacbbaaaaababbacbcaccabbbbcabcabccbccccbbbbbcbabaaaccccbaaccaaaccabcbcbcbaabcacbbcbbcabacabcccacbcaacccabaabbbcbcabccabaccbabbbbccaaaabaaaaabccccabbacabccbcabcaabbcbacbcbabcbcbaaaacbbaaccccbaabbbbbaabcaccbabccbbababbbaacbaaabbcbcbbbbcacabcaabbbccaabaacccccacaababcbabbccacaaaac...

output:

*cbccb*

result:

ok correct

Test #100:

score: 0
Accepted
time: 153ms
memory: 11148kb

input:

cabbabaababbbabbbbbcabbaabcabbaacbcbbaabaacabbbbbcbcbcacbcbcbcacbcccaaccccaabaaabcabaabaaacbacccacbcaaaabcbbccaacababccbaaaacbaccabcabacabbbbccbacccabbbbbbaccabbcacabbbabcccbbcccbbabbccbcccaaabcabaabcccacaaaacaabbbcacccbcbbccacbaacaaccbcccccbaabaabbaaaccbbababbbbacaaaccacaccccbcbaaccaccbcbaacccbcacc...

output:

*caaac*

result:

ok correct

Test #101:

score: 0
Accepted
time: 153ms
memory: 11052kb

input:

aaaccbbcbcccaabccbacbaacbbccccaacbcbacbaaacbccbcbbcaccbacbcabbcabcaaccaccbbbabcbccabaaabaacabaccbcacaaaabcacbabbbcbaababcbcbcacbccbbcbacbbaccaaabaaaaaacababbcccbcabccbabcbbcbbaccabacaaabacabbbacacccaabccbcbbaaacbabbbcbbbbbacbaacaccabbabcbbbbbabccbbbbccacaaaaacbabaccabababaccacabbaacaacabbcbacbbbcabc...

output:

*cbbcab*

result:

ok correct

Test #102:

score: 0
Accepted
time: 144ms
memory: 10916kb

input:

bbccabbaaacaabccbbcabaabacacccbcbcacacbbabcaabbcbbbabacbbccbcbbacbbbccbbbaaaacbababbbbacbabbcccaaacaacaaabababbacabccacbabccacaabbbbcbcacbcaaabaabbabccbccbacbbcccaabababbbcbccccbbaacaacbababcaaacbbcabaaacbabcccbbbccbcccaaaaacabcaaaaaccaaabacbbcbcbababcbabbaabaabbabbabaabbabcaaacabcbbcbacbbcbacababcc...

output:

*cbccac*

result:

ok correct

Test #103:

score: 0
Accepted
time: 150ms
memory: 11100kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

*baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab*

result:

ok correct

Test #104:

score: 0
Accepted
time: 168ms
memory: 10988kb

input:

aaaaaaaaababaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaabaabaaaaaaaaaaaaaaaaaabaaaaaaaa...

output:

*aabaa*baaaaaaaaab*

result:

ok correct

Test #105:

score: 0
Accepted
time: 150ms
memory: 11032kb

input:

aabaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaabaaaaaababaaaaaaaaaaaaaaaaaaabaabaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaaabaaaaaaaaaabaaaaaaaaaaaaaaaaaabaaababaaaaaaaabaaaaaaaaaaaaaaaababaaaaaaaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaababaaaaaaaaaaaaaaaaaabaabaaaaaaaaabaaaaaaaaa...

output:

*aaaaaaababaa*

result:

ok correct

Test #106:

score: 0
Accepted
time: 143ms
memory: 11152kb

input:

abaabaaaaaaaaaaaaaabaaaaaaaaaabaabaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaabaabaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaabaaabaaaaaaaaaaaaaaaaaabaaaaaaaaaaa...

output:

*baaaaabaaaaaaaa*

result:

ok correct

Test #107:

score: 0
Accepted
time: 145ms
memory: 11152kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

*bc*c*c*

result:

ok correct

Test #108:

score: 0
Accepted
time: 139ms
memory: 11032kb

input:

aaaaaaaaaaaaaaaaaaaaaajaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaacaaiaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaajaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaafaadaaaaaaaaaaiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaiaaaaagaaaeaaaaaaiaaaaaaaaaaaaabaaaaahaaaaaiaaaaaaiacaaaaaaaaaaaa...

output:

*daj*e*

result:

ok correct

Test #109:

score: 0
Accepted
time: 147ms
memory: 10912kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaacaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaacaaaaaaaaaaaaaaaaaabaaaaaa...

output:

*b*b*ad*

result:

ok correct

Test #110:

score: 0
Accepted
time: 139ms
memory: 11152kb

input:

aahaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaakaaaaaaaaaaaaaaaacabaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaga...

output:

*j*j*d*

result:

ok correct

Test #111:

score: 0
Accepted
time: 141ms
memory: 10964kb

input:

aaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaabaaaaaaaaaaaaadaaagaaaaaaaaaaaaaaaaaaaagaaaagaaaacaaaaabaaaaaaaaaaaaaaabaaaaadaaaaaaaaaaaaaaaaaeaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaaaaaaaaaaaaaaaaafafaaaaaaeaaaaaaaaaeaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaeaabaaaaaaaaaaagaaaaaaaaaaaaadaaaaaaaaaaaa...

output:

*faaaaaaaaaag*

result:

ok correct

Test #112:

score: 0
Accepted
time: 178ms
memory: 11108kb

input:

aeaaaaaaaaaaaaaaaafaaaaacaaaaaaaaaaaaaaafaaaaaaaaaaaaeaaaaafaaaaaaaaaaaaaaaaaaaaaaeaacaaaaaaaaaaagcaaacaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaceaaaaaaaaaaaaaaaaaaaaaagaaaaaagaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaeaaaadaaaadaaaaaaaaaaaaaaacaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaadfaaaaaadadaaaaaaaaaaaaa...

output:

*cd*

result:

ok correct

Test #113:

score: 0
Accepted
time: 175ms
memory: 10900kb

input:

aaaaaaaaaaaaaaaaaagcaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaeeaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaagfaaaaaaaaaaaaaaaaaabaaeaaaaaaaaaaaaaaaacaaaaaaaaaaafaaaaeaaaaaaaaafaaaaafaaaaaacaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaadabaaaaaaaadaaaaaaaaaaagaaaaaaaaaaaaaaaabdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaagaaaaaaaaaagaaag...

output:

*f*gf*

result:

ok correct

Test #114:

score: 0
Accepted
time: 145ms
memory: 10964kb

input:

aaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaabaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaa...

output:

*c*c*b*b*c*b*b*c*

result:

ok correct

Test #115:

score: 0
Accepted
time: 173ms
memory: 11044kb

input:

aaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaabaaaaa...

output:

*caaaaaaaaaaaac*

result:

ok correct

Test #116:

score: 0
Accepted
time: 159ms
memory: 11040kb

input:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaadbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaacaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaddaaaaaaaaabaaaaaaa...

output:

*dd*d*baac*

result:

ok correct

Test #117:

score: 0
Accepted
time: 149ms
memory: 10900kb

input:

aaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafeaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaacaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaafaeafaaaaaaaaeaaaaaafaaaaaaaaaaaaaaafaaaaaaa...

output:

*eaf*d*dc*

result:

ok correct