QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#663907#5541. Substring Sortucup-team3519#AC ✓1800ms4596kbC++173.6kb2024-10-21 18:18:292024-10-21 18:18:29

Judging History

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

  • [2024-10-21 18:18:29]
  • 评测
  • 测评结果:AC
  • 用时:1800ms
  • 内存:4596kb
  • [2024-10-21 18:18:29]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define V vector
#define pb push_back
typedef double db;

const LL mod = 444445555566666677;
const LL base = 23333;
LL mul(LL a, LL b) {
    return (__int128_t)a * b % mod;
}
LL MOD(LL x) {
    if(x >= mod) x -= mod;
    if(x < 0) x += mod;
    return x;
}
int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    const int T = 370;
    int n, q; cin >> n >> q;
    string a, b, c; cin >> a >> b >> c;
    V<V<char>> blka(n / T + 1), blkb(n / T + 1), blkc(n / T + 1);
    V<LL> hsa, hsb, hsc;

    auto cal_hs = [&](const V<char> &v) -> LL {
        LL hs = 0;
        for(auto x : v) {
            hs = MOD(mul(hs, base) + x);
        }
        return hs;
    };

    for(int i = 0; i < n; i++) {
        blka[i / T].pb(a[i]);
        blkb[i / T].pb(b[i]);
        blkc[i / T].pb(c[i]);
    }

    for(auto &v : blka) hsa.pb(cal_hs(v));
    for(auto &v : blkb) hsb.pb(cal_hs(v));
    for(auto &v : blkc) hsc.pb(cal_hs(v));

    auto swap_blk = [&](V<V<char>> &blka, V<V<char>> &blkb, V<LL> &hsa, V<LL> &hsb, int l, int r) -> void {
        if(l / T == r / T) {
            for(int i = l; i <= r; i++) {
                swap(blka[i / T][i % T], blkb[i / T][i % T]);
            }
            hsa[l / T] = cal_hs(blka[l / T]);
            hsb[l / T] = cal_hs(blkb[l / T]);
            return;
        }

        for(int i = l; i < (l / T + 1) * T; i++) {
            swap(blka[i / T][i % T], blkb[i / T][i % T]);
        }
        hsa[l / T] = cal_hs(blka[l / T]);
        hsb[l / T] = cal_hs(blkb[l / T]);

        for(int id = l / T + 1; id < r / T; id++) {
            swap(blka[id], blkb[id]);
            swap(hsa[id], hsb[id]);
        }

        for(int i = r / T * T; i <= r; i++) {
            swap(blka[i / T][i % T], blkb[i / T][i % T]);
        }
        hsa[r / T] = cal_hs(blka[r / T]);
        hsb[r / T] = cal_hs(blkb[r / T]);
    };
    auto greater_blk = [&](V<V<char>> &blka, V<V<char>> &blkb, V<LL> &hsa, V<LL> &hsb, int l, int r) -> bool {
        if(l / T == r / T) {
            for(int i = l; i <= r; i++) {
                if(blka[i / T][i % T] != blkb[i / T][i % T]) {
                    return blka[i / T][i % T] > blkb[i / T][i % T];
                }
            }
            return 0;
        }
        for(int i = l; i < (l / T + 1) * T; i++) if(blka[i / T][i % T] != blkb[i / T][i % T]) {
            return blka[i / T][i % T] > blkb[i / T][i % T];
        }
        for(int id = l / T + 1; id < r / T; id++) {
            if(hsa[id] != hsb[id]) {
                for(int i = id * T; i < (id + 1) * T; i++) if(blka[i / T][i % T] != blkb[i / T][i % T]) {
                    return blka[i / T][i % T] > blkb[i / T][i % T];
                }
            }
        }
        for(int i = r / T * T; i <= r; i++) if(blka[i / T][i % T] != blkb[i / T][i % T]) {
            return blka[i / T][i % T] > blkb[i / T][i % T];
        }
        return 0;
    };

    for(int i = 1; i <= q; i++) {
        int l, r; cin >> l >> r;
        l--, r--;
        if(greater_blk(blka, blkb, hsa, hsb, l, r)) swap_blk(blka, blkb, hsa, hsb, l, r);
        if(greater_blk(blka, blkc, hsa, hsc, l, r)) swap_blk(blka, blkc, hsa, hsc, l, r);
        if(greater_blk(blkb, blkc, hsb, hsc, l, r)) swap_blk(blkb, blkc, hsb, hsc, l, r);
    }

    for(auto v : blka) for(auto c : v) cout << c;
    cout << endl;
    for(auto v : blkb) for(auto c : v) cout << c;
    cout << endl;
    for(auto v : blkc) for(auto c : v) cout << c;
    cout << endl;
}

詳細信息

Test #1:

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

input:

5 2
icpca
siaja
karta
2 4
1 5

output:

iarta
kiaja
scpca

result:

ok 3 lines

Test #2:

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

input:

6 6
aabbcc
bcacab
cbcaba
1 1
2 2
3 3
4 4
5 5
6 6

output:

aaaaaa
bbbbbb
cccccc

result:

ok 3 lines

Test #3:

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

input:

3 1
aba
aab
aac
1 3

output:

aab
aac
aba

result:

ok 3 lines

Test #4:

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

input:

1 1
z
y
x
1 1

output:

x
y
z

result:

ok 3 lines

Test #5:

score: 0
Accepted
time: 224ms
memory: 4376kb

input:

100000 100000
llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll...

output:

llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll...

result:

ok 3 lines

Test #6:

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

input:

100000 100000
ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttottttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt...

output:

ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttotttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttqtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttkttttttttttttttttttttttttttttttttttttttttttttttt...

result:

ok 3 lines

Test #7:

score: 0
Accepted
time: 1800ms
memory: 4576kb

input:

100000 100000
aijpxjjjjcjwjjjjjmjajkjjjjjjoijjjjjjjjjeyjjwujvajjjjjjyjjjoejkhejdjoajjjzjjjjjkjjjjiqjjjjljjbjzjjjjjjepujjjjjejjjjjyjjjjjjjjjjjhjjjjjjjjjhjojejjjitjjjjjjjjjjujzjjrwjhjljjjjjjjjjjjjmjjjjjjjjjjzjjjjzijjjjjjjjjjjhjjjyjjjjjjjjrjjjjjjjjjjdbjjjvjjhjjcsjjrjjuljiejjjjjajkvjokrjhjkjjjjjjtljijjz...

output:

aicjbhjjjcjjjjjjjjjajkjjjjjjovfxjjjjjjjdjcjjjjjjjjnjjjejjjojjfhjzjkoajjdjjjjjjkjjjjijjjjjljjwjjjjjjjjjxjjjczjejjjjaykjjjdjjjjjjhjjjjvcjjjjjjjjjbjzykjjjdjjhtjujzjjzwjhjlocjjjjjjjjjjmnjjhjycjjjzjjjjjhjjjujjjjjjjcjjjyjjjjjjjcrdjjjjjjjjjdpfjrjjjjjjcfjjrjjujjjjjjjmhajkjjodnjjjkjjjjjjapjijjjjjejjljjtoayjj...

result:

ok 3 lines

Test #8:

score: 0
Accepted
time: 17ms
memory: 4292kb

input:

100000 100000
mvvvvvvvvvvvvvvvvvvvvvvvvevvvvvvvvvvvvvvvvvvvvvvvvdvvvvvvvvvvvvvvvvvvvvvvvvpvvvvvvvvvvvvvvvvvvvvvvvvdvvvvvvvvvvvvvvvvvvvvvvvvcvvvvvvvvvvvvvvvvvvvvvvvvkvvvvvvvvvvvvvvvvvvvvvvvvgvvvvvvvvvvvvvvvvvvvvvvvvtvvvvvvvvvvvvvvvvvvvvvvvvtvvvvvvvvvvvvvvvvvvvvvvvvbvvvvvvvvvvvvvvvvvvvvvvvvfvvvvvvvvvv...

output:

mvvvvvvvvvvvvvvvvvvvvvvvvevvvvvvvvvvvvvvvvvvvvvvvvdvvvvvvvvvvvvvvvvvvvvvvvvbvvvvvvvvvvvvvvvvvvvvvvvvdvvvvvvvvvvvvvvvvvvvvvvvvcvvvvvvvvvvvvvvvvvvvvvvvvevvvvvvvvvvvvvvvvvvvvvvvvavvvvvvvvvvvvvvvvvvvvvvvvtvvvvvvvvvvvvvvvvvvvvvvvvgvvvvvvvvvvvvvvvvvvvvvvvvbvvvvvvvvvvvvvvvvvvvvvvvvevvvvvvvvvvvvvvvvvvvvvvvv...

result:

ok 3 lines

Test #9:

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

input:

100000 100000
keeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...

output:

keeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...

result:

ok 3 lines

Test #10:

score: 0
Accepted
time: 112ms
memory: 4376kb

input:

100000 100000
wjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj...

output:

mjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj...

result:

ok 3 lines

Test #11:

score: 0
Accepted
time: 254ms
memory: 4588kb

input:

100000 100000
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc...

output:

cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc...

result:

ok 3 lines

Test #12:

score: 0
Accepted
time: 250ms
memory: 4552kb

input:

100000 100000
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq...

output:

qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq...

result:

ok 3 lines

Test #13:

score: 0
Accepted
time: 1784ms
memory: 4308kb

input:

100000 100000
bccccbacaaaacaaaacabaacccabaabacacccbabcaacbbabbcbcaacbabccbccaaccbcaaabbccbaccbccbbaabcbbcbbabaabbaccabbcacbcabbbaabccbcbbbaccccbbabbacbabaabbbccccaabbbabbacabbcbaacbccababcbaccabccacbacbbaacbaaabaacabacbcccbbacbacbacaabbccabcaaaaabbbccccbaabacaaaacacbabcccaccbbaaaccbaacbbabcacbbaccab...

output:

aaaaaaaaaaaaaaaabaaaaaabaaababcaaacacccbabbabacbabbabaacbabacabbabbabbbbcaabaccacacabaacccaccbababbcccacabaccabaccbaaaccbaabbbbacaacaaaabcaabbacaacccccaabcacacccbccaabcacbcbbaabbcccbbcaccccbaacabccababcbbabaacaabcbaaabaaacabcbcacaabcaabbaaacbabbcbabbcbabcbbabccbbccbbabbcbcaaaaaaabcabacbbbbbbabbabaab...

result:

ok 3 lines

Test #14:

score: 0
Accepted
time: 381ms
memory: 4360kb

input:

100000 100000
bacbabbacabbbcbaccccabcbccbcbacaaabbcacaabaaacaacaccaccbabcbaccabbabccbcccacbccabbcacaacaaabcbbcccccacbabcaacccacabbccacacaccabcbcaaccbcbcbacacacbacaaaaacbcbcaccbacbcacccacacbbabcccaccbcbacbccbcabccabacccabcbbacaaacbbabbaaaaacaacabcaaabbacccbacacacbacbaabbccabaaabaccbacaaaaabcacacacacb...

output:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

result:

ok 3 lines

Test #15:

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

input:

1 1
w
w
w
1 1

output:

w
w
w

result:

ok 3 lines

Test #16:

score: 0
Accepted
time: 1766ms
memory: 4292kb

input:

100000 100000
hrwrlmxrhlyjibbyhspkrnnsvqowvahkzyurqhyjqpuousezjxotsbkdyuxmoffscrietmpyexgemtkkhfhergdxfjjthyplhysvakfbzoarnitovvdeetpvfcymorejruutwjboeyjvgefqpwupoddtyuqfynecsebasfsskfuwisafcwyjhxjueptownnuqugoqxuiylipyxyilgwhijfpqtkwhmkawbmmeicsxhhtvrblfslgzsxaaodwetqndawnqbtgxcvaobtxokmzagjewgismy...

output:

hrwrldxpmayviawdgrvvknqwjhonauhkzfpssodpmlfoveograuevoidyjilosvxaxesgmihnxgemkpvghrirgdxfjjthnprwfazykfhasfzjudzmrceuypugqsdbnejruudsddbenidxafqxwzpxgtfyvubpincsebapunvemvclcunnlinorgxplnsofypqxcsxavrdlkhhjzykgwsttwiiamhdfybebvddicsshhttbkgfkzglsclaodkjyqndljkbhghecbhrfarrkmzagjewgwjhqrgyxwdjqsolmex...

result:

ok 3 lines

Test #17:

score: 0
Accepted
time: 1798ms
memory: 4520kb

input:

100000 100000
sxigpbnutawzekewadxbnkvbwocjfdfmtkqecqlfchesyygyqqzrobsjfkqgyruuotdgggxejzkvekezyjhqilvahkbrgtjccltijrpqpqnjyckhjjyrtkqgoaixczfkxdxzihslpqdazmjdypczbxlxzxrgjyxshyqdbknywltuuxteafyicqseszuaqlnvvsbknacmqdgagdygitmkldnihkpmjfdvhcotzhqeyqivmpwjjytbrdwldkfvhgilewiweauerretsupeudvtoqcrjaioie...

output:

bddgugahkamrekedaogbcdvargaurjfdtcocpygfcvtswbbjaqeoomzvfwegynknwtpgugygkzteeaejvvhanlmuhgqroekkfitzjtqoponedckhjfyftuogopioqzskxwuzndtrpddgmvhdyptcpblxtuqeafxaeyvotkvgjwtuhctisfgsvnlzlwjawqlvssljoncmfwgmjvjkizsklfvshcjmjpdapjsbzhwbivivjpeyxgturolprkovfgimeeivnzyerrgkfulrukwqlqcrbtisxeijbumidvltsfky...

result:

ok 3 lines

Test #18:

score: 0
Accepted
time: 1426ms
memory: 4548kb

input:

100000 100000
jjrvgzoqdnqekkrmnknpoowdpicfhxoonddenrnjwblgcakwfmqhtajsigglkezubtonxtwpdeululjzzvavpkwpmzprxujafkhjduoacjpkqfmbibwixucewxuiwgkjrdctyjjslgordypqjcrxvpankaqjcdympwzpwnhghlphjejzrvrgoiubctqixxruerxfjailsqvbmgalwdwcyzwgfykmscvbmxlqwmbjkkczeguxxlilohovateiiyvjrvpvjqdsxdtjtqhuoymbjhakrmgpth...

output:

jjrvdlovdjiepsubnwxnhowdpicfhxumnbdjjdvqwblggcacmihttaxlxemtztptbtogktxmsewxigjsydrhpkwfysfsmeiqeehhftoaijpkqfdbibwixzcesnuiwgkcklpgnblmrgordypqnkdxvpacpmordthmpaakwnenjmahjdjzrvrdtigbsfigxrrdbnugjsvlsqvbkbilhuleydxrfykmjgvbfiufqpnjkkevhxfeklildtkbyeegnyvdcvpvjqcsxgtjyskuopsbyfybvblplnadcgpxmjuedget...

result:

ok 3 lines

Test #19:

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

input:

4 4
adsz
absd
basc
4 4
3 4
2 4
1 4

output:

aasz
absd
bdsc

result:

ok 3 lines

Test #20:

score: 0
Accepted
time: 704ms
memory: 3820kb

input:

27486 40833
svpwowlqqjlhxbzhjmuvnmokyvbicqajvyudwwzmuulnurdsqpdnytnckmgeutlfodaiqdpfqkyxrljplxscbzrqrefjdtipjioalqzycqfqezqpgkmmgqeicrridufyjrvacqvrczzwmnzbpltablhzdjhmdriwkxbfsoowgnnxcxocyhiarvdqsvhgekpoaevjadrohsthzlgtokpxoqfxyrllwzsdhtvkkrwgpiwzspsrnnyfqklqpmamhsrhhjqtlwdchcojpooaqzqilfxdjclzxgun...

output:

sqoqdcivdmldxbzdpwfgdhbuyqvncfamvcumwrebqulkwiagpuafuldxkzbeunldodavymppfcojppylqorynqjqxejomtmpegnleleinbzmpeqpggsmxceacmrssxggvrvacqpdtpzwmxzbpbrtsrfgujhextiwkyoqojokdqdscxcsyhuarmtqsejgeakncqijaylohyapuvhzbkbzmxfdbwllnasevdsukmkgspwzgdqugmbhakpupatrjsmhhrqaleucucojpozaqzqilgkysuczxpvbmrcxnlswpcad...

result:

ok 3 lines

Test #21:

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

input:

16247 43020
gkhfgkozymylzzeupoaavhhyzxqbsduyoepdpmbardxqmkvebrcgvwjggscpaqwrqwjnopuastbysarbiuawyvvdnhsarxixdmdhgjxzsqgcvputskskxtgdkhpricvnqcplzcizexdxicawfutylhvljytttbynhqeypdtvdpqctdxkvmbityeqpdnjrvwxeecjujokdwaxulhospusmzjdqwqpymkfqxsnqngvakgwhignjbrcgjgxalgfbojugfjiarkuttvmgjtuxiknbriuovnlmizp...

output:

gedfgkopahletkwuzaaavhirxouerdeyobpjpmbafdxwmzwpbstzywrzwwcbbqdchbnlopcvgtbyoanpioagypvfnmxuzvuxcmhwvjxzixtyvpuuskmcxtgfkbzrsdawxmpszuilfgdlegpwfunyltdtgytvtbmshmlypptvnpqwkowdvmsblybqpjbsrbfcewcrujihtweoalktbpqqmdkdbwjpybyfdxsiqngeatcwbwvunbrmijoaowthbokwfyjgacruxrjmgiuuxikhbrzuonzwqinpninimokcgsfh...

result:

ok 3 lines

Test #22:

score: 0
Accepted
time: 763ms
memory: 3928kb

input:

41563 43585
hyfoxmsexwutmmxvfzsuxexyvyngsaswzhgravymmponvzxzhymteflmhqmyxkumfzhmkxfhumpgrmuwcuvduxwwxxrztdnodedvbipjibrnwjscdkwwwqvuybocqgtjmzbjcocwwlnysjlyllrwxpaybuhazpbpgqbjvluqaacjktkylcgwucofcptygawolpiuqudfrulysmxaqzjbufatcjuqkhhqouxobitkimnabxgiaehhaciseccthislpjbiihejsndcgcyxezohgtlddkecmeft...

output:

fncicqmexwhcmbkwflsusvpyvynucasynhgrkvyerchnnljzhymyisbwxbxyxheqpgvfodkjlmkbrmugquvduxwfxxgztfzidbgjzvktibrniubjvrxwjqvuyufcpgtwijbjcocwwsjxajlyujuixpvunumjzuobijaciflaaackktoglcgeehowmptygautnpiumnhiktlkcpxhczerjmaezeklieeovqmtnemayjyyjvqiaehiamisexrxwxgljmboihhisnzmgcyxsqohteobwgecmesnwstxjajplegs...

result:

ok 3 lines

Test #23:

score: 0
Accepted
time: 644ms
memory: 4100kb

input:

33194 36811
migurpyumyjthmmhctxrweckuebrkhonoirgbipbgeftnawzqfyijdwyavtzysxhvcusfknonbhlcbjeoywfbaoixsgnyvfrpfvbikheiukvnftmqiqxwopiozonvqqsihqadomsishfdwcuwfafwawtsxlofucmuwhzcsvvsidgehgyeybrudyczejjcoetknjfjnkyjraoxfsimmzjfdwrklmsiggknrrdvntfddpddwgsuchudcgaalbwgmzybievdelradiklprolmvvertzxkctqshw...

output:

mifhjbkcmojehvmgcaiunpckqenanhoxhivkbxpzgjgzaqplqyfklfgyjjnzynxdvlaenkjoobhlybjvoywysyhufognxkenpqturublbnkvfntybiggzoalozmnvnxsihqtaembmshfrwcfdfafhaatbxllquruutyarsxisxdgpufyeggrtrvxzezdtoetxayzchkimraosflimytvkdoruhpdwbhhvcrsevtfddpduwpquzhuucgxademgmsufifvdekrblikloxolmvbczakxohtwrywgpcjknzukzxu...

result:

ok 3 lines

Test #24:

score: 0
Accepted
time: 874ms
memory: 4180kb

input:

49558 49843
cbofhipshjqyaeigtwhfxdfslpvnrepwotsujyvzyxzajiwcmmmzxrxvsvssfhhtqadzlpcchjthwrcxzdpuwezrryakbbvpbijomoxysorgbkytclureigezreytvjsvpapnjpqpzhwtwwsnclpazkmybluftxielnhdukhhvbdxxfvytyuwufhxuxbdqvblzfyessweunyquobdhmgdqzvmzumavzvizulvgcrrvjjugvcatuuueyudztkzwuutazmigguhnqdwiptfuurvmpakuqhgrdt...

output:

abzfefbbmjqheeigtwhatdfnlphwebpworhejyvrzmhajiwcmmmzjpxrjolvfhhfqbsoudweyhhvmiiysjtjwvbrgyaotbonztgoshngqurgfkyyfeucilerzreyddjsvcnxzzymomhxzyhynrabrfkdwclffqaielnhdpaleaxarkovytyqwufhqnnisbpekzfyeexeeunemarfdhmgfyddmsdbavzvizbwtizrruijaqbzatuuuhwxvstlwvehbazmigguhdzdwxqaslurvyjakuqhhkctgcilulziaosy...

result:

ok 3 lines

Test #25:

score: 0
Accepted
time: 849ms
memory: 3980kb

input:

47097 47879
lgfihdebrdscubyblbaxnnshsgevdmpdfzehqxyipfosbddjbwwvosusbcftpriisyvghbgudzwjxczdrqvcewnyeialotookodvgxsfiwklkjymdmltszrwzwiocgfiuomhhzwgjpyiawkztluepsjevloknxgesgwqqonekopnfkuxskwrafenrjvujdzajdfpfnwjwzmtffacgirennllocsedqfhwdoabwevtrlvnerogrpriikiiscdggavxyiczvsizmekwutvvnkxqbzxquqoasxh...

output:

lgfcedebrcewubfuqbawwvyhsznvshxdzletgpxnyissbpvzelehpqisbsfuxrbayevohxwrdnmesczdrrrceqqhsidlrwkokufoghsfhwnlkkyxdmlxttjwzwipbgfiunbhbrwzqwyicsxmbcutpbcyzxowuxgeepxqggnsuoiysgorswufxeckrkcujwzgselgvmgjswmsvxacglewsiqyjvcyrqsrnxldowspgtlzgtksrtrobicltfcehgavxuicavrycmukwuttaxarnmznklqomditelprlwcrnuzw...

result:

ok 3 lines