QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#476603 | #5541. Substring Sort | karuna# | AC ✓ | 187ms | 13628kb | C++20 | 2.8kb | 2024-07-13 20:25:09 | 2024-07-13 20:25:09 |
Judging History
answer
#include <bits/stdc++.h>
#define ff first
#define ss second
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int SZ = 101010;
struct perm {
int p[3];
};
perm operator*(perm a, perm b) {
perm c;
for (int i = 0; i < 3; i++) {
c.p[i] = a.p[b.p[i]];
}
return c;
}
int z[3], o[3];
perm operator+(perm a, perm b) {
for (int t = 0; t < 3; t++) z[t] = 3 * a.p[t] + b.p[t];
sort(o, o + 3, [&](int i, int j) { return z[i] < z[j]; });
a.p[o[0]] = 0;
for (int t = 1; t < 3; t++) a.p[o[t]] = a.p[o[t - 1]] + (z[o[t - 1]] != z[o[t]]);
return a;
}
string S[3], T[3];
struct seg {
perm lazy[4 * SZ];
perm tree[4 * SZ];
void apply(int x, perm v) {
lazy[x] = lazy[x] * v;
tree[x] = tree[x] * v;
}
void push(int l, int r, int x) {
if (l != r) {
apply(2 * x, lazy[x]);
apply(2 * x + 1, lazy[x]);
for (int t = 0; t < 3; t++) lazy[x].p[t] = t;
}
}
void init(int l, int r, int x) {
for (int t = 0; t < 3; t++) lazy[x].p[t] = t;
if (l == r) {
sort(o, o + 3, [&](int i, int j) { return S[i][l] < S[j][l]; });
tree[x].p[o[0]] = 0;
for (int t = 1; t < 3; t++) tree[x].p[o[t]] = tree[x].p[o[t - 1]] + (S[o[t - 1]][l] != S[o[t]][l]);
return;
}
int m = (l + r) / 2;
init(l, m, 2 * x);
init(m + 1, r, 2 * x + 1);
tree[x] = tree[2 * x] + tree[2 * x + 1];
}
void update(int a, int b, perm v, int l, int r, int x) {
if (b < l || a > r) return;
if (a <= l && r <= b) {
apply(x, v);
return;
}
push(l, r, x);
int m = (l + r) / 2;
update(a, b, v, l, m, 2 * x);
update(a, b, v, m + 1, r, 2 * x + 1);
tree[x] = tree[2 * x] + tree[2 * x + 1];
}
perm query(int a, int b, int l, int r, int x) {
if (a <= l && r <= b) return tree[x];
push(l, r, x);
int m = (l + r) / 2;
if (b <= m) return query(a, b, l, m, 2 * x);
else if (a > m) return query(a, b, m + 1, r, 2 * x + 1);
else {
return query(a, b, l, m, 2 * x) + query(a, b, m + 1, r, 2 * x + 1);
}
}
void dfs(int l, int r, int x) {
if (l == r) {
for (int t = 0; t < 3; t++) {
T[t] += S[lazy[x].p[t]][l];
}
return;
}
push(l, r, x);
int m = (l + r) / 2;
dfs(l, m, 2 * x);
dfs(m + 1, r, 2 * x + 1);
}
} seg;
int main() {
cin.tie(0); ios_base::sync_with_stdio(0);
int n, q;
cin >> n >> q;
for (int t = 0; t < 3; t++) cin >> S[t];
iota(o, o + 3, 0);
seg.init(0, n - 1, 1);
while (q--) {
int s, e;
cin >> s >> e;
--s; --e;
perm p = seg.query(s, e, 0, n - 1, 1);
perm q;
for (int t = 0; t < 3; t++) q.p[t] = t;
sort(q.p, q.p + 3, [&](int i, int j) { return p.p[i] < p.p[j]; });
seg.update(s, e, q, 0, n - 1, 1);
}
seg.dfs(0, n - 1, 1);
for (int t = 0; t < 3; t++) {
cout << T[t] << '\n';
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 5752kb
input:
5 2 icpca siaja karta 2 4 1 5
output:
iarta kiaja scpca
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 1ms
memory: 5708kb
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: 5680kb
input:
3 1 aba aab aac 1 3
output:
aab aac aba
result:
ok 3 lines
Test #4:
score: 0
Accepted
time: 0ms
memory: 5688kb
input:
1 1 z y x 1 1
output:
x y z
result:
ok 3 lines
Test #5:
score: 0
Accepted
time: 148ms
memory: 13264kb
input:
100000 100000 llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll...
output:
llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll...
result:
ok 3 lines
Test #6:
score: 0
Accepted
time: 152ms
memory: 11944kb
input:
100000 100000 ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttottttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt...
output:
ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttotttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttqtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttkttttttttttttttttttttttttttttttttttttttttttttttt...
result:
ok 3 lines
Test #7:
score: 0
Accepted
time: 183ms
memory: 13168kb
input:
100000 100000 aijpxjjjjcjwjjjjjmjajkjjjjjjoijjjjjjjjjeyjjwujvajjjjjjyjjjoejkhejdjoajjjzjjjjjkjjjjiqjjjjljjbjzjjjjjjepujjjjjejjjjjyjjjjjjjjjjjhjjjjjjjjjhjojejjjitjjjjjjjjjjujzjjrwjhjljjjjjjjjjjjjmjjjjjjjjjjzjjjjzijjjjjjjjjjjhjjjyjjjjjjjjrjjjjjjjjjjdbjjjvjjhjjcsjjrjjuljiejjjjjajkvjokrjhjkjjjjjjtljijjz...
output:
aicjbhjjjcjjjjjjjjjajkjjjjjjovfxjjjjjjjdjcjjjjjjjjnjjjejjjojjfhjzjkoajjdjjjjjjkjjjjijjjjjljjwjjjjjjjjjxjjjczjejjjjaykjjjdjjjjjjhjjjjvcjjjjjjjjjbjzykjjjdjjhtjujzjjzwjhjlocjjjjjjjjjjmnjjhjycjjjzjjjjjhjjjujjjjjjjcjjjyjjjjjjjcrdjjjjjjjjjdpfjrjjjjjjcfjjrjjujjjjjjjmhajkjjodnjjjkjjjjjjapjijjjjjejjljjtoayjj...
result:
ok 3 lines
Test #8:
score: 0
Accepted
time: 155ms
memory: 12292kb
input:
100000 100000 mvvvvvvvvvvvvvvvvvvvvvvvvevvvvvvvvvvvvvvvvvvvvvvvvdvvvvvvvvvvvvvvvvvvvvvvvvpvvvvvvvvvvvvvvvvvvvvvvvvdvvvvvvvvvvvvvvvvvvvvvvvvcvvvvvvvvvvvvvvvvvvvvvvvvkvvvvvvvvvvvvvvvvvvvvvvvvgvvvvvvvvvvvvvvvvvvvvvvvvtvvvvvvvvvvvvvvvvvvvvvvvvtvvvvvvvvvvvvvvvvvvvvvvvvbvvvvvvvvvvvvvvvvvvvvvvvvfvvvvvvvvvv...
output:
mvvvvvvvvvvvvvvvvvvvvvvvvevvvvvvvvvvvvvvvvvvvvvvvvdvvvvvvvvvvvvvvvvvvvvvvvvbvvvvvvvvvvvvvvvvvvvvvvvvdvvvvvvvvvvvvvvvvvvvvvvvvcvvvvvvvvvvvvvvvvvvvvvvvvevvvvvvvvvvvvvvvvvvvvvvvvavvvvvvvvvvvvvvvvvvvvvvvvtvvvvvvvvvvvvvvvvvvvvvvvvgvvvvvvvvvvvvvvvvvvvvvvvvbvvvvvvvvvvvvvvvvvvvvvvvvevvvvvvvvvvvvvvvvvvvvvvvv...
result:
ok 3 lines
Test #9:
score: 0
Accepted
time: 153ms
memory: 13380kb
input:
100000 100000 keeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...
output:
keeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...
result:
ok 3 lines
Test #10:
score: 0
Accepted
time: 143ms
memory: 12200kb
input:
100000 100000 wjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj...
output:
mjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj...
result:
ok 3 lines
Test #11:
score: 0
Accepted
time: 6ms
memory: 12476kb
input:
100000 100000 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc...
output:
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc...
result:
ok 3 lines
Test #12:
score: 0
Accepted
time: 152ms
memory: 12128kb
input:
100000 100000 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq...
output:
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq...
result:
ok 3 lines
Test #13:
score: 0
Accepted
time: 177ms
memory: 12312kb
input:
100000 100000 bccccbacaaaacaaaacabaacccabaabacacccbabcaacbbabbcbcaacbabccbccaaccbcaaabbccbaccbccbbaabcbbcbbabaabbaccabbcacbcabbbaabccbcbbbaccccbbabbacbabaabbbccccaabbbabbacabbcbaacbccababcbaccabccacbacbbaacbaaabaacabacbcccbbacbacbacaabbccabcaaaaabbbccccbaabacaaaacacbabcccaccbbaaaccbaacbbabcacbbaccab...
output:
aaaaaaaaaaaaaaaabaaaaaabaaababcaaacacccbabbabacbabbabaacbabacabbabbabbbbcaabaccacacabaacccaccbababbcccacabaccabaccbaaaccbaabbbbacaacaaaabcaabbacaacccccaabcacacccbccaabcacbcbbaabbcccbbcaccccbaacabccababcbbabaacaabcbaaabaaacabcbcacaabcaabbaaacbabbcbabbcbabcbbabccbbccbbabbcbcaaaaaaabcabacbbbbbbabbabaab...
result:
ok 3 lines
Test #14:
score: 0
Accepted
time: 178ms
memory: 13628kb
input:
100000 100000 bacbabbacabbbcbaccccabcbccbcbacaaabbcacaabaaacaacaccaccbabcbaccabbabccbcccacbccabbcacaacaaabcbbcccccacbabcaacccacabbccacacaccabcbcaaccbcbcbacacacbacaaaaacbcbcaccbacbcacccacacbbabcccaccbcbacbccbcabccabacccabcbbacaaacbbabbaaaaacaacabcaaabbacccbacacacbacbaabbccabaaabaccbacaaaaabcacacacacb...
output:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
result:
ok 3 lines
Test #15:
score: 0
Accepted
time: 0ms
memory: 5692kb
input:
1 1 w w w 1 1
output:
w w w
result:
ok 3 lines
Test #16:
score: 0
Accepted
time: 178ms
memory: 12120kb
input:
100000 100000 hrwrlmxrhlyjibbyhspkrnnsvqowvahkzyurqhyjqpuousezjxotsbkdyuxmoffscrietmpyexgemtkkhfhergdxfjjthyplhysvakfbzoarnitovvdeetpvfcymorejruutwjboeyjvgefqpwupoddtyuqfynecsebasfsskfuwisafcwyjhxjueptownnuqugoqxuiylipyxyilgwhijfpqtkwhmkawbmmeicsxhhtvrblfslgzsxaaodwetqndawnqbtgxcvaobtxokmzagjewgismy...
output:
hrwrldxpmayviawdgrvvknqwjhonauhkzfpssodpmlfoveograuevoidyjilosvxaxesgmihnxgemkpvghrirgdxfjjthnprwfazykfhasfzjudzmrceuypugqsdbnejruudsddbenidxafqxwzpxgtfyvubpincsebapunvemvclcunnlinorgxplnsofypqxcsxavrdlkhhjzykgwsttwiiamhdfybebvddicsshhttbkgfkzglsclaodkjyqndljkbhghecbhrfarrkmzagjewgwjhqrgyxwdjqsolmex...
result:
ok 3 lines
Test #17:
score: 0
Accepted
time: 187ms
memory: 13464kb
input:
100000 100000 sxigpbnutawzekewadxbnkvbwocjfdfmtkqecqlfchesyygyqqzrobsjfkqgyruuotdgggxejzkvekezyjhqilvahkbrgtjccltijrpqpqnjyckhjjyrtkqgoaixczfkxdxzihslpqdazmjdypczbxlxzxrgjyxshyqdbknywltuuxteafyicqseszuaqlnvvsbknacmqdgagdygitmkldnihkpmjfdvhcotzhqeyqivmpwjjytbrdwldkfvhgilewiweauerretsupeudvtoqcrjaioie...
output:
bddgugahkamrekedaogbcdvargaurjfdtcocpygfcvtswbbjaqeoomzvfwegynknwtpgugygkzteeaejvvhanlmuhgqroekkfitzjtqoponedckhjfyftuogopioqzskxwuzndtrpddgmvhdyptcpblxtuqeafxaeyvotkvgjwtuhctisfgsvnlzlwjawqlvssljoncmfwgmjvjkizsklfvshcjmjpdapjsbzhwbivivjpeyxgturolprkovfgimeeivnzyerrgkfulrukwqlqcrbtisxeijbumidvltsfky...
result:
ok 3 lines
Test #18:
score: 0
Accepted
time: 135ms
memory: 12212kb
input:
100000 100000 jjrvgzoqdnqekkrmnknpoowdpicfhxoonddenrnjwblgcakwfmqhtajsigglkezubtonxtwpdeululjzzvavpkwpmzprxujafkhjduoacjpkqfmbibwixucewxuiwgkjrdctyjjslgordypqjcrxvpankaqjcdympwzpwnhghlphjejzrvrgoiubctqixxruerxfjailsqvbmgalwdwcyzwgfykmscvbmxlqwmbjkkczeguxxlilohovateiiyvjrvpvjqdsxdtjtqhuoymbjhakrmgpth...
output:
jjrvdlovdjiepsubnwxnhowdpicfhxumnbdjjdvqwblggcacmihttaxlxemtztptbtogktxmsewxigjsydrhpkwfysfsmeiqeehhftoaijpkqfdbibwixzcesnuiwgkcklpgnblmrgordypqnkdxvpacpmordthmpaakwnenjmahjdjzrvrdtigbsfigxrrdbnugjsvlsqvbkbilhuleydxrfykmjgvbfiufqpnjkkevhxfeklildtkbyeegnyvdcvpvjqcsxgtjyskuopsbyfybvblplnadcgpxmjuedget...
result:
ok 3 lines
Test #19:
score: 0
Accepted
time: 0ms
memory: 5696kb
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: 59ms
memory: 6636kb
input:
27486 40833 svpwowlqqjlhxbzhjmuvnmokyvbicqajvyudwwzmuulnurdsqpdnytnckmgeutlfodaiqdpfqkyxrljplxscbzrqrefjdtipjioalqzycqfqezqpgkmmgqeicrridufyjrvacqvrczzwmnzbpltablhzdjhmdriwkxbfsoowgnnxcxocyhiarvdqsvhgekpoaevjadrohsthzlgtokpxoqfxyrllwzsdhtvkkrwgpiwzspsrnnyfqklqpmamhsrhhjqtlwdchcojpooaqzqilfxdjclzxgun...
output:
sqoqdcivdmldxbzdpwfgdhbuyqvncfamvcumwrebqulkwiagpuafuldxkzbeunldodavymppfcojppylqorynqjqxejomtmpegnleleinbzmpeqpggsmxceacmrssxggvrvacqpdtpzwmxzbpbrtsrfgujhextiwkyoqojokdqdscxcsyhuarmtqsejgeakncqijaylohyapuvhzbkbzmxfdbwllnasevdsukmkgspwzgdqugmbhakpupatrjsmhhrqaleucucojpozaqzqilgkysuczxpvbmrcxnlswpcad...
result:
ok 3 lines
Test #21:
score: 0
Accepted
time: 70ms
memory: 6276kb
input:
16247 43020 gkhfgkozymylzzeupoaavhhyzxqbsduyoepdpmbardxqmkvebrcgvwjggscpaqwrqwjnopuastbysarbiuawyvvdnhsarxixdmdhgjxzsqgcvputskskxtgdkhpricvnqcplzcizexdxicawfutylhvljytttbynhqeypdtvdpqctdxkvmbityeqpdnjrvwxeecjujokdwaxulhospusmzjdqwqpymkfqxsnqngvakgwhignjbrcgjgxalgfbojugfjiarkuttvmgjtuxiknbriuovnlmizp...
output:
gedfgkopahletkwuzaaavhirxouerdeyobpjpmbafdxwmzwpbstzywrzwwcbbqdchbnlopcvgtbyoanpioagypvfnmxuzvuxcmhwvjxzixtyvpuuskmcxtgfkbzrsdawxmpszuilfgdlegpwfunyltdtgytvtbmshmlypptvnpqwkowdvmsblybqpjbsrbfcewcrujihtweoalktbpqqmdkdbwjpybyfdxsiqngeatcwbwvunbrmijoaowthbokwfyjgacruxrjmgiuuxikhbrzuonzwqinpninimokcgsfh...
result:
ok 3 lines
Test #22:
score: 0
Accepted
time: 68ms
memory: 11296kb
input:
41563 43585 hyfoxmsexwutmmxvfzsuxexyvyngsaswzhgravymmponvzxzhymteflmhqmyxkumfzhmkxfhumpgrmuwcuvduxwwxxrztdnodedvbipjibrnwjscdkwwwqvuybocqgtjmzbjcocwwlnysjlyllrwxpaybuhazpbpgqbjvluqaacjktkylcgwucofcptygawolpiuqudfrulysmxaqzjbufatcjuqkhhqouxobitkimnabxgiaehhaciseccthislpjbiihejsndcgcyxezohgtlddkecmeft...
output:
fncicqmexwhcmbkwflsusvpyvynucasynhgrkvyerchnnljzhymyisbwxbxyxheqpgvfodkjlmkbrmugquvduxwfxxgztfzidbgjzvktibrniubjvrxwjqvuyufcpgtwijbjcocwwsjxajlyujuixpvunumjzuobijaciflaaackktoglcgeehowmptygautnpiumnhiktlkcpxhczerjmaezeklieeovqmtnemayjyyjvqiaehiamisexrxwxgljmboihhisnzmgcyxsqohteobwgecmesnwstxjajplegs...
result:
ok 3 lines
Test #23:
score: 0
Accepted
time: 62ms
memory: 11312kb
input:
33194 36811 migurpyumyjthmmhctxrweckuebrkhonoirgbipbgeftnawzqfyijdwyavtzysxhvcusfknonbhlcbjeoywfbaoixsgnyvfrpfvbikheiukvnftmqiqxwopiozonvqqsihqadomsishfdwcuwfafwawtsxlofucmuwhzcsvvsidgehgyeybrudyczejjcoetknjfjnkyjraoxfsimmzjfdwrklmsiggknrrdvntfddpddwgsuchudcgaalbwgmzybievdelradiklprolmvvertzxkctqshw...
output:
mifhjbkcmojehvmgcaiunpckqenanhoxhivkbxpzgjgzaqplqyfklfgyjjnzynxdvlaenkjoobhlybjvoywysyhufognxkenpqturublbnkvfntybiggzoalozmnvnxsihqtaembmshfrwcfdfafhaatbxllquruutyarsxisxdgpufyeggrtrvxzezdtoetxayzchkimraosflimytvkdoruhpdwbhhvcrsevtfddpduwpquzhuucgxademgmsufifvdekrblikloxolmvbczakxohtwrywgpcjknzukzxu...
result:
ok 3 lines
Test #24:
score: 0
Accepted
time: 83ms
memory: 11180kb
input:
49558 49843 cbofhipshjqyaeigtwhfxdfslpvnrepwotsujyvzyxzajiwcmmmzxrxvsvssfhhtqadzlpcchjthwrcxzdpuwezrryakbbvpbijomoxysorgbkytclureigezreytvjsvpapnjpqpzhwtwwsnclpazkmybluftxielnhdukhhvbdxxfvytyuwufhxuxbdqvblzfyessweunyquobdhmgdqzvmzumavzvizulvgcrrvjjugvcatuuueyudztkzwuutazmigguhnqdwiptfuurvmpakuqhgrdt...
output:
abzfefbbmjqheeigtwhatdfnlphwebpworhejyvrzmhajiwcmmmzjpxrjolvfhhfqbsoudweyhhvmiiysjtjwvbrgyaotbonztgoshngqurgfkyyfeucilerzreyddjsvcnxzzymomhxzyhynrabrfkdwclffqaielnhdpaleaxarkovytyqwufhqnnisbpekzfyeexeeunemarfdhmgfyddmsdbavzvizbwtizrruijaqbzatuuuhwxvstlwvehbazmigguhdzdwxqaslurvyjakuqhhkctgcilulziaosy...
result:
ok 3 lines
Test #25:
score: 0
Accepted
time: 84ms
memory: 9428kb
input:
47097 47879 lgfihdebrdscubyblbaxnnshsgevdmpdfzehqxyipfosbddjbwwvosusbcftpriisyvghbgudzwjxczdrqvcewnyeialotookodvgxsfiwklkjymdmltszrwzwiocgfiuomhhzwgjpyiawkztluepsjevloknxgesgwqqonekopnfkuxskwrafenrjvujdzajdfpfnwjwzmtffacgirennllocsedqfhwdoabwevtrlvnerogrpriikiiscdggavxyiczvsizmekwutvvnkxqbzxquqoasxh...
output:
lgfcedebrcewubfuqbawwvyhsznvshxdzletgpxnyissbpvzelehpqisbsfuxrbayevohxwrdnmesczdrrrceqqhsidlrwkokufoghsfhwnlkkyxdmlxttjwzwipbgfiunbhbrwzqwyicsxmbcutpbcyzxowuxgeepxqggnsuoiysgorswufxeckrkcujwzgselgvmgjswmsvxacglewsiqyjvcyrqsrnxldowspgtlzgtksrtrobicltfcehgavxuicavrycmukwuttaxarnmznklqomditelprlwcrnuzw...
result:
ok 3 lines