QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#720361 | #6197. 太阳神的宴会 | NineSuns | 50 | 303ms | 335272kb | C++14 | 2.8kb | 2024-11-07 12:08:29 | 2024-11-07 12:08:30 |
Judging History
answer
#include <bits/stdc++.h>
#include<vector>
#define ll long long
#define pii pair <int, int>
#define fi first
#define se second
#define pb push_back
#define ull unsigned long long
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int N = 2e5+5, M = 1e7+5, mod = 998244353;
int n, k, id[M], f[M], cnt[N];
ll lv[45];
struct node {
int sz, len, fa, ch[27];
}v[M];
vector <int> pr;
int las, tot, o[45];
inline int tr (int p, int k) { return k > v[p].sz ? 0 : k; }
void upd (int k) {
// cout << "INS:" << k << endl;
int p = las, cur = ++tot;
v[cur].sz = v[p].sz+(tr(p, k) == 0); v[cur].len = v[p].len+1;
// cout << "NEW:" << cur << " " << v[cur].sz << " " << "CHECK_FA:" << las << " " << v[las].fa << endl;
// cout << "CHECK:" << v[2].sz << endl ;
las = cur;
while (p && !v[p].ch[tr(p, k)]) {
// cout << p << " " << v[p].sz << " " << v[cur].sz << endl;
if (v[p].sz+(tr(p, k) == 0) < v[cur].sz) {
int nc = ++tot;
v[nc].sz = v[p].sz+(tr(p, k) == 0); v[nc].len = v[p].len+1;
v[cur].fa = nc; cur = nc;
}
v[p].ch[tr(p, k)] = cur;
p = v[p].fa;
}
if (!p) return v[cur].fa = 1, void();
int q = v[p].ch[tr(p, k)];
if (v[q].len == v[p].len+1) return v[cur].fa = q, void();
int cl = ++tot; v[cl] = v[q]; v[cl].sz = v[p].sz+(tr(p, k) == 0); v[cl].len = v[p].len+1; v[q].fa = v[cur].fa = cl;
while (p && v[p].ch[tr(p, k)] == q) v[p].ch[tr(p, k)] = cl, p = v[p].fa;
}
string str;
void solve () {
cin >> n >> k;
lv[0] = 1; for (int i = 1;i < k;i++) lv[i] = lv[i-1]*(k-i)%mod;
ll s = k, ans = 0;
for (int i = 1;i <= n;i++) {
while (tot) {
memset(v[tot].ch, 0, sizeof v[tot].ch);
v[tot].sz = v[tot].len = v[tot].fa = 0;
tot--;
}
las = tot = 1;
pr.clear(); memset(o, 0, sizeof o);
cin >> str;
for (char j : str) {
int x = j-'a';
if (o[x]) {
int id = 0;
for (int p = pr.size()-1;~p;p--) if (pr[p] == x) {
id = p; break;
}
upd(pr.size()-id);
pr.erase(pr.begin()+id); pr.push_back(x);
}
else {
upd(0); pr.push_back(x); o[x] = 1;
}
}
memset(f, 0, tot+1<<3);
for (int j = 0;j <= 26;j++) if (v[1].ch[j]) f[v[1].ch[j]] = s; s = 0;
memset(cnt, 0, str.size()+1<<2);
for (int j = 2;j <= tot;j++) ++cnt[v[j].len];
for (int j = 1;j <= str.size();j++) cnt[j] += cnt[j-1];
for (int j = 2;j <= tot;j++) id[cnt[v[j].len]--] = j;
for (int J = 1;J < tot;J++) {
int j = id[J]; (ans += lv[v[j].sz-1]*f[j]) %= mod;
int ss = 0;
for (int p = 0;p <= 26;p++) if (v[j].ch[p]) (f[v[j].ch[p]] += f[j]) %= mod, ++ss;
if (v[j].ch[0]) (s += f[j]*lv[v[j].sz-1]%mod*(v[j].sz+1-ss)) %= mod;
else (s += f[j]*lv[v[j].sz-1]%mod*(k-ss)) %= mod;
}
}
cout << (ans+mod+1)%mod;
}
signed main () {
int T = 1;
while (T--) solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 2
Accepted
Test #1:
score: 2
Accepted
time: 2ms
memory: 10028kb
input:
1 2 bbbaabbbbbaabaabbababbabbaaabbaaabaaabbabbabbbaaabaababbbaabbbabaaaaabbbbbabbabbbbbabbaababaabbbababbbbabababbaabbbbabbbababbbaabaabbabbbbababaabbbbbabaaaaaabbbbbbbaaaaabbabbbbaaabaaabaababbbababaaaabbababaaabbababaabbbbaabababbbabbabaababbbabaababaaabaaabaaababaaaaabbaaaaabbabaababbababbbbbaaba...
output:
981227
result:
ok 1 number(s): "981227"
Test #2:
score: 2
Accepted
time: 1ms
memory: 10056kb
input:
1 2 abaabbababaaabbbabaaabbaabbbbaaabbbbbbaabbababbabbbbbbaaabbabbaabbbbbaababbaabbabababaaaaabaaabbbbaaaaabaababbbbaaabbabbaabaabaaabbbabaaaababbabbbaabbbaaabbbabbbbaaabbbbbababbababaaaaababbabbbbbbababbaabaaaabaaabaabbabbaabbbabababbbaabababaaaaabbbaaabaabaabbbaababaaabbbbabbbbbabaababbabbbaababab...
output:
981457
result:
ok 1 number(s): "981457"
Test #3:
score: 2
Accepted
time: 1ms
memory: 8104kb
input:
1 2 aaaaaababbbaabaaaabbaababbabaaabbbbbaabbababaaaabaabaabaaaabaababbaababbabbabbbaaaaaaabaabbaaaabaabaaaabaabbbabbaaababbbaaaabbbbababbbaaabbabbbababbbbbbbababbaaaabbbbbabbabbaabaaabaaaabbababbbaabbbbaababbbabbaababaabaaabaaaaaaaabaaabaaababaababbbababababbbbaababababbabbbbabaaaaababbbbabaaabbbabb...
output:
981717
result:
ok 1 number(s): "981717"
Test #4:
score: 2
Accepted
time: 1ms
memory: 8032kb
input:
1 2 abbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
549593
result:
ok 1 number(s): "549593"
Test #5:
score: 2
Accepted
time: 0ms
memory: 10076kb
input:
1 2 babbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
5989
result:
ok 1 number(s): "5989"
Test #6:
score: 2
Accepted
time: 1ms
memory: 10092kb
input:
1 2 baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
3997
result:
ok 1 number(s): "3997"
Test #7:
score: 2
Accepted
time: 1ms
memory: 7980kb
input:
1 2 abbaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaaba...
output:
11949
result:
ok 1 number(s): "11949"
Test #8:
score: 2
Accepted
time: 1ms
memory: 8052kb
input:
1 2 baabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbabbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaabbbbbbabaa...
output:
298323
result:
ok 1 number(s): "298323"
Test #9:
score: 2
Accepted
time: 0ms
memory: 10016kb
input:
1 2 bababbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbbabbba...
output:
11947
result:
ok 1 number(s): "11947"
Subtask #2:
score: 7
Accepted
Dependency #1:
100%
Accepted
Test #10:
score: 7
Accepted
time: 1ms
memory: 10076kb
input:
1 5 badaeeaadaacedaaaabeabcabbcdbeadcabbaeaaabbdeecbdecaeaecceabebcddbdaaabddeadaeebebbcdcaedcacbaccdabeeeccbaebbadbdeabcbcdbccecacbecccadebbbdcacdcabdadaccadbaccbecdcccbbdbaaebeeabbdcbbeaadebecaccdcaeceabeaadbdecbecdbcccceabdaabcbaaeccbdebceeeeddceababaecabadeabaadeaabcbaaaabbcbcabcebdaebcbedcccaea...
output:
59251641
result:
ok 1 number(s): "59251641"
Test #11:
score: 7
Accepted
time: 2ms
memory: 10200kb
input:
1 5 bdbdcdaeaedaecdeccbdcdecaaeeeaeadcbcdbadcdcdeddbdccbdbddadcecbbdabeabbbecdddbacabebdecbacbbcaebdddbbadbccecacaecbebeecadeceaeecbbdecbdeacdecabbecaaedddddcbbecebcaebaeeeedecdcbaaacedaedacaaaaaceeaacedecbdbeacecbbaccdecbecccaeedecdbbecbdcbaababedeecaeeaaacebadbadbddaedcccbdbdeabcbbdbeddbbacdbaaade...
output:
59257546
result:
ok 1 number(s): "59257546"
Test #12:
score: 7
Accepted
time: 0ms
memory: 10140kb
input:
1 5 bbdbedabdeccedeabccabebccbaaeccceadabebabbebcbbbebbdcbadadcdaacdacbdedaeaaedaddcdeeadebcdedcbcabeaccdcbeececdbaadddcdbadcceeecdaebeaebabdbbadaaddededbcdccacbebcebadcdbcbddbacecaadbcaecebebbcdcceabbeebedcbbccdebcdbaaecebdcdeeecaccacbeebaabbcdcabecaddaddcbaaeeaadacababbdedcbecabaabadabedeeeacceddd...
output:
59256626
result:
ok 1 number(s): "59256626"
Test #13:
score: 7
Accepted
time: 0ms
memory: 12480kb
input:
1 5 edacbddddddddddddddddddddddddddddddddddddddddddcdddddddddddddddddddddddddddddddddddddddddddddbdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd...
output:
11796771
result:
ok 1 number(s): "11796771"
Test #14:
score: 7
Accepted
time: 0ms
memory: 8316kb
input:
1 5 abdecaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
43297081
result:
ok 1 number(s): "43297081"
Test #15:
score: 7
Accepted
time: 0ms
memory: 8344kb
input:
1 5 aebdcaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
15014801
result:
ok 1 number(s): "15014801"
Test #16:
score: 7
Accepted
time: 1ms
memory: 10068kb
input:
1 5 ecabddecdacdbdeccacdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacebdecdacebdecdacdbdecdacdbaecdacdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacdbdeceacdbdecdacdbdecdacdbdecdacdbdecdccdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacdbdecdacdbaecdacdbdecdacdbdecdacdbddc...
output:
49679211
result:
ok 1 number(s): "49679211"
Test #17:
score: 7
Accepted
time: 1ms
memory: 8200kb
input:
1 5 ebacdeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeeaeea...
output:
27506986
result:
ok 1 number(s): "27506986"
Test #18:
score: 7
Accepted
time: 1ms
memory: 10072kb
input:
1 5 dbceadaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdaceabecdac...
output:
43950531
result:
ok 1 number(s): "43950531"
Test #19:
score: 7
Accepted
time: 3ms
memory: 12332kb
input:
1 26 ffdczbkzlrnevxxhowxmtgagaveotvbgrhayxfsrqlmocrzkchduecjvobzrxywdsgazytypvkrrqxdacxomcbvuhmnesdokjnniozcfscbenlimgfwwypyhrezpojeggkecyyeopaxprmistdqmntvirniwdgeliokjhctmheqnaslhklzbkiacnocjkwrtmcaklusxwyuwohjptwanouyofqncrmtdzqqvexnncdfxrorxiuvhpgcxwfrkyljehpnjbxwqngwximxhfrcvrzzapkmftgtuhvrdatc...
output:
882426059
result:
ok 1 number(s): "882426059"
Test #20:
score: 7
Accepted
time: 2ms
memory: 10124kb
input:
1 26 emuojkmxgrmwudjwtfpxhgxolynqirqyapyelmsnjqzuqvcxaoqvahvckhepjxsguxhxxnldmoarnmwiyfjcxygxftnbfipxtnuhihgbqgirnlevejfxqlrezeilomrzzkfogyoxhjbaafbnprtjvbvlriunczycqhkdgexgwgespztrwtvkdauhnhhljbzszjvmedekmvlfmcypdpudjpxhyyrramiktudbpjulxsavodfoogcknnommsuqogdauwxblylalmyrgstcoqweiefaquniexecvdkdeqy...
output:
156353466
result:
ok 1 number(s): "156353466"
Test #21:
score: 7
Accepted
time: 3ms
memory: 13032kb
input:
1 26 poyxnmficghjoxsikwykahamerquhetfjlqfvuckdectveczvcafbzgsiufcvkoiwhkxxnunazcolhpddrujbpsjiwlmddbmvhwwdmqpxokguvdwsbbepuwctanpnzdrmndwwkaszptyzomoqttfdactflqmpsguvhbpeozdpbnuiesiyjctdfpxzfrchqfsfvtcdxzkjuegabsdfdbxyfbgoifgvzutpgfgqoztgzqsgbctslaqgvnhihqshhugnvtgzkeepntozvenzxgsveimqztfpjbruiondat...
output:
866443096
result:
ok 1 number(s): "866443096"
Test #22:
score: 7
Accepted
time: 0ms
memory: 11424kb
input:
1 26 aqdhpubwvnejxokrzisfgclmtyrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrjrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrurrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr...
output:
183682092
result:
ok 1 number(s): "183682092"
Test #23:
score: 7
Accepted
time: 0ms
memory: 13176kb
input:
1 26 ivnhpozdtbsrqlckjxgymafuewddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd...
output:
65304226
result:
ok 1 number(s): "65304226"
Test #24:
score: 7
Accepted
time: 0ms
memory: 12264kb
input:
1 26 yutwpfoljxnksdaqmegvhrizcbddddddddddddddddddddddddddddddddddddddddddddqdddddddddddddddudddgddddddddddddddddddddhddwdtdddddddddjdddddddddddddddddddddddddddddddddddddddcdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddrdddddddddddddddddddddmdddddddddddddddddddddddddddddddddddddddd...
output:
558163738
result:
ok 1 number(s): "558163738"
Test #25:
score: 7
Accepted
time: 2ms
memory: 12472kb
input:
1 26 khzuplhdboqareginmstkwjufvcfugzeewcbciugzeewcbcfugznempbckugheewclcfugzeewcbqfugzeeqcbcfugzeewcbcfugzeewcbcfugzdewcbcbugzeewcbcfugzeewcbcfugzeewcbcfugzeowcbcfugzeewcbcfugzeewcbcfugzeewcbcfugzeewcxcfugzeewcbcfugzeewcbcfugzeewcbcfugzecwcbcfugzeewcbcfugzeewcbcfugzcewcbcfugzeewcscfugzeewcfcfugzeewc...
output:
254733399
result:
ok 1 number(s): "254733399"
Test #26:
score: 7
Accepted
time: 0ms
memory: 13276kb
input:
1 26 hciwgbknurqstjdmpezjfvoxayajyoajlwunajyodjkwunajyoajkwunajyoejkwunaoyoajkwunajyoajkwunajydajkwunajyoajkwunajyoajkwunajyoajkwunajyoajkwunajyoajkwunajyoajkwunajyoajkwunajyoajkwunajyoajkwunajyoajkwunajyoajkwufajyoajpwunajyoajkwunajyoajkwunajyoajkwunajyoajkwunajyopjkwunajyoajkwunajyoajkwunajyoajkwu...
output:
31112975
result:
ok 1 number(s): "31112975"
Test #27:
score: 7
Accepted
time: 2ms
memory: 13092kb
input:
1 26 amxhcdorjkpedsulwytifnrbqzcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbebcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc...
output:
546199686
result:
ok 1 number(s): "546199686"
Subtask #3:
score: 11
Accepted
Dependency #2:
100%
Accepted
Test #28:
score: 11
Accepted
time: 11ms
memory: 37332kb
input:
1 5 ccaacbebeeedcdebbcccbbddeddbaceaacccaccbeaaedecadabbbbebbecdebeaacceabdaedccddddcdabecbddccaacbbbbecacdbddedcbbbecaaddccaeeabdadebaeacebebeabbbebbcbaacbeeebbbaacacaaddecdabdbdbbaabeeeddecabbaaceaabcdcabaadaccdcebdedbdbacedbceceaabcaebdaeabbbdbdcaeacdbadecbdcabdbaaebecdcdcdaaceaaecdebcaddebbdacda...
output:
946391716
result:
ok 1 number(s): "946391716"
Test #29:
score: 11
Accepted
time: 20ms
memory: 36352kb
input:
1 5 abdbbebcabedbcaeacedebbcdbbdbeaedadadadcbdeceebcddacccdbccdbbeecaaacdbabeedeeebbdbaebbaaddcabebebbeaacccedbcbaaecadedbaadbaebcbeaecacbbedcbdaadceceaceaeebbacceaebdcdddaaddcbcbaeaedabbdddcedebaeaeeaeddbdbbcbecabbacccdedbcdabbdadcdacaabaddabcbdcebedeaedbbbeebedeccbeaebedbdedbddadadbdaecbdbbcdddbec...
output:
946384621
result:
ok 1 number(s): "946384621"
Test #30:
score: 11
Accepted
time: 11ms
memory: 36400kb
input:
1 5 ccdcebabeaddabebbedcdeeadbecdbaceaeaeebadacaeebddceaebeabbacbaecebaecaeabddadaacdcbdcbedcebdbbbcabaccaacbcbacabbabebdeabbceeacecceacacebdbbacdebdecdadcecabccbdadeaecabeebeabeadecaceccaeeddeacceacddbedadaaeedbedcedbdededaacdecabcaddaabdcccecbbdcadadaebadbebaadaeabdbdbdeebaccdedcecdacccedbeccddabc...
output:
946386796
result:
ok 1 number(s): "946386796"
Test #31:
score: 11
Accepted
time: 31ms
memory: 67724kb
input:
1 5 badecbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
236766527
result:
ok 1 number(s): "236766527"
Test #32:
score: 11
Accepted
time: 26ms
memory: 73620kb
input:
1 5 aecbdaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
574145646
result:
ok 1 number(s): "574145646"
Test #33:
score: 11
Accepted
time: 20ms
memory: 65384kb
input:
1 5 cdebaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...
output:
41724080
result:
ok 1 number(s): "41724080"
Test #34:
score: 11
Accepted
time: 21ms
memory: 47384kb
input:
1 5 bcedaaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaabbddaab...
output:
75617636
result:
ok 1 number(s): "75617636"
Test #35:
score: 11
Accepted
time: 11ms
memory: 51820kb
input:
1 5 dabceeaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceaeceae...
output:
619911141
result:
ok 1 number(s): "619911141"
Test #36:
score: 11
Accepted
time: 24ms
memory: 61924kb
input:
1 5 deacbacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaacaaca...
output:
692933564
result:
ok 1 number(s): "692933564"
Test #37:
score: 11
Accepted
time: 201ms
memory: 221088kb
input:
1 26 qunpuqntsffjftledfixldfkbdqzejaiexlzzuwztbxzoqagxvvzpbxritfgujlmuyakaoaiseezyokuafmsypsbidheeavjpowngouissogwtickichayevjooxmlcpyyaamuzcmtyshctgxeriygqfaifbtbkgombpsxyuynknaavagspkftlvixitrlbtqzswzailoizxngogirrnalqncwwinalkkrpmszqygwatthgoykuzkcbkwcmurvuccydkvnnhtizpmbjeufoeggcyhqjbkryeqqcrsit...
output:
530139481
result:
ok 1 number(s): "530139481"
Test #38:
score: 11
Accepted
time: 208ms
memory: 221120kb
input:
1 26 vitxnczuzgyfnmlexhrlsrrvwzppquxttttpyxekvjwlhjcrrxvypthfjeaxmtnlvbnoyynseihlstklffcxnwfyptvnefdyetpzdiwfbivjwbijnwlpurmlwmxdasbivgljrjfqlqgavtihqfwbfgsdnnbdixrracsigzmucuknftzbgiybcwpwupkzposyhgimnhbiccyippcfcxtzsnqvfsoibfxcmtjrjenqnjhangogbdarkcuzitkmkjpddhoedzyxxqhvkbkcirmqaidumyojhxgqkvwekce...
output:
659530294
result:
ok 1 number(s): "659530294"
Test #39:
score: 11
Accepted
time: 183ms
memory: 224108kb
input:
1 26 rsashkmssglkopxljhirqfcbinpytbhdgiqthjjkfompscgaehawjhrecakwbpwfododdjrlyooyfpprjdgnqfuzsuodayojfsuucnopbjczlgwzhxhwwvrtqkpgjfbbrcegipgwbamavcxqvxwakxhjwzauydtztlgufyqbseznofexeulgrtihaksvmevwlmohsdmspzanlevujgnltwcpboqcsslopjchodqoikjgpackdqfckmsiogrsnropaundteermsyiqpsnrskqcnsthbrhkubcknfihke...
output:
528642258
result:
ok 1 number(s): "528642258"
Test #40:
score: 11
Accepted
time: 271ms
memory: 332808kb
input:
1 26 lkrbhwjfeitxocauyzsdgpqvmnbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
310431038
result:
ok 1 number(s): "310431038"
Test #41:
score: 11
Accepted
time: 206ms
memory: 335272kb
input:
1 26 pqdacwoekliymstfurjzgvxhnbwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww...
output:
253630659
result:
ok 1 number(s): "253630659"
Test #42:
score: 11
Accepted
time: 303ms
memory: 333444kb
input:
1 26 mljidyzbeacoqkrwtfvhnpgxsummmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm...
output:
873005611
result:
ok 1 number(s): "873005611"
Test #43:
score: 11
Accepted
time: 134ms
memory: 243180kb
input:
1 26 wtxdsqyavoerflpcmzghijnkubxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuoyxywnftpuo...
output:
447847770
result:
ok 1 number(s): "447847770"
Test #44:
score: 11
Accepted
time: 226ms
memory: 254680kb
input:
1 26 hiprswjfcnaztqxyumgkovledbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhzbxnomrzxhz...
output:
251989436
result:
ok 1 number(s): "251989436"
Test #45:
score: 11
Accepted
time: 179ms
memory: 253808kb
input:
1 26 gfyqlupniewxrobchdjzamtsvkwvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrvawvgohrlrv...
output:
462496791
result:
ok 1 number(s): "462496791"
Subtask #4:
score: 13
Accepted
Dependency #1:
100%
Accepted
Test #46:
score: 13
Accepted
time: 1ms
memory: 7968kb
input:
2 2 aaababbabaaaabbaababbbaaabbbbbbbaababbbbbbbabbabbabbbbbbababbabbaababbbbbbbabaaaabbbababbbbabaabbaabbaaaaaaabaaababbaabbbabababababaaabbababaaabbaababaabbbaababaaaaaaabbaaababbaaabaabbaaaabaabbabaaabbbbbabaaabababababbaabaabbbabbaabaaabbababbbabaabbbabbbbaababbaabbabbbabababaaabaabbaaabbabababab...
output:
1959299
result:
ok 1 number(s): "1959299"
Test #47:
score: 13
Accepted
time: 0ms
memory: 10064kb
input:
2 2 bbaaababbbbbbbaabaaabbabbabbbbaabbabaaabababaaabbbbbababbbaaaababbabaaabaabbaaaabababaaabaaaaaaabaaabbbaabaaabbabbbabbbbaaaaaabaaabbbabbabbaabbbabaabaaaaabbbabbbabaabbbbbbababbabbabbbbbaaaaaabaabaaaaaabbabaabbaaabbbbabababbabbababbabaabbbabbbabbbbabbbababaabbabbabaaabaabbaaaaaabaabbbbabbbbababab...
output:
2932325
result:
ok 1 number(s): "2932325"
Test #48:
score: 13
Accepted
time: 0ms
memory: 10088kb
input:
2 2 bbbabaaaaabaabaabbaaaabababaabbababbbbbbaaaababbbbbbbbaaaaabbaaababbbaababaaababbabaaabaabbbabbababbabbabababbbbbbabbbbababbbaabbabaaaaababbaaabababbabaabbaaaabaaabaabbaabbabbabaaabbaaaaabbabaaaabaabbbababbabbbaabababbabbbbbbabbbababbbabbaaaaaabababababbaabbbbbaabbaaaabbaaababaaaabaabababaabbaaa...
output:
2932847
result:
ok 1 number(s): "2932847"
Test #49:
score: 13
Accepted
time: 0ms
memory: 7980kb
input:
2 2 baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
998023
result:
ok 1 number(s): "998023"
Test #50:
score: 13
Accepted
time: 0ms
memory: 7956kb
input:
2 2 abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
1026221
result:
ok 1 number(s): "1026221"
Test #51:
score: 13
Accepted
time: 0ms
memory: 10108kb
input:
2 2 baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
1372091
result:
ok 1 number(s): "1372091"
Test #52:
score: 13
Accepted
time: 1ms
memory: 8044kb
input:
2 2 baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
7987
result:
ok 1 number(s): "7987"
Test #53:
score: 13
Accepted
time: 1ms
memory: 7964kb
input:
2 2 baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
364637
result:
ok 1 number(s): "364637"
Test #54:
score: 13
Accepted
time: 1ms
memory: 9952kb
input:
2 2 abaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbbabbaabbbb...
output:
59441
result:
ok 1 number(s): "59441"
Test #55:
score: 13
Accepted
time: 0ms
memory: 8060kb
input:
31 2 ababbabbbabbbbbaababbaaaabbbbabaaaabbabaabaaaabbbabbbabbbbabbbababaaaaabbbaababbabbabaaaabbaaaaabbabbaaabbaaaabbbaabbbbbbaaaababbabaaabaaabaabbbabaabbaaaaabbbaaaabbbbbbaaabbbaabbabaababaaabbabaaaaabbbbbaaabababaaaabbbbaabaabbbbbaabbabbbaababaabbbabbababaaaabbbababbbabbbbaaababaaaabaaaaaaaababaa...
output:
720427737
result:
ok 1 number(s): "720427737"
Test #56:
score: 13
Accepted
time: 0ms
memory: 8016kb
input:
31 2 aababaaaaabaaaabaaabbabbabaabbaaaaabbababbbbababaabbaaabaaaaabbbbabaabbbababaaababaaabaaaabbbaaababaabbbbabaabbabaababbaabaaaaababaabbbbaaababaaaabbbbababbbaaaaabbbbbaabbabbabbbaaabbbabaabaaabaaaabbbbbabbaababbbababbaaaabbaaaaaaababbabbbbbbabbaabbbbababababbbabbbbaaabbbaaaabbabbaaaaabaabaaaaaaa...
output:
571807039
result:
ok 1 number(s): "571807039"
Test #57:
score: 13
Accepted
time: 1ms
memory: 10040kb
input:
31 2 ababbaabbaabbbbaaaabbbbbaaaaabaabaaaaaaaabbbbaabbbbbbbbabaabbabaabbbabbbaaabbbbabaaaaaabbbbbbabbbbbbaababbabbabaaaaaabbaaababbaabbabbbabbbabaaaabaabbabbbbaaabbabbabbaabbabaabbabaaaabaabbabababaabbaaababababbaabaabaaabaaababbaaababaabaabbabbbbbbbbbbbaababaaaabbabbbbababbbbabbaababbbbaabbbaabbaba...
output:
325715314
result:
ok 1 number(s): "325715314"
Test #58:
score: 13
Accepted
time: 1ms
memory: 10060kb
input:
31 2 abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
788272657
result:
ok 1 number(s): "788272657"
Test #59:
score: 13
Accepted
time: 1ms
memory: 10032kb
input:
31 2 abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
830805666
result:
ok 1 number(s): "830805666"
Test #60:
score: 13
Accepted
time: 0ms
memory: 9912kb
input:
31 2 abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
744200473
result:
ok 1 number(s): "744200473"
Test #61:
score: 13
Accepted
time: 1ms
memory: 9940kb
input:
31 2 baabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaa...
output:
351845541
result:
ok 1 number(s): "351845541"
Test #62:
score: 13
Accepted
time: 0ms
memory: 8028kb
input:
31 2 ababaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbabaaaaaabbaba...
output:
400428613
result:
ok 1 number(s): "400428613"
Test #63:
score: 13
Accepted
time: 1ms
memory: 7936kb
input:
31 2 abaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaabaaaaaaaaaaabaaaaa...
output:
328678714
result:
ok 1 number(s): "328678714"
Test #64:
score: 13
Accepted
time: 0ms
memory: 7804kb
input:
1000 2 b b a b a a a b b a b b b b b a b b b b b a b b a a b b b a b a b b a a a a a a b b a b a a a b b b a b a b b a a a a a b a a b b b a b b b a a b b a b a b b b b b b b a b a a a a a b a b b a b a a a b b a a b a b b b a b a a b a b b b b a a b b a a b a a b b b b b a b a b b a a b b b a b a b...
output:
46452553
result:
ok 1 number(s): "46452553"
Subtask #5:
score: 17
Accepted
Dependency #2:
100%
Accepted
Dependency #4:
100%
Accepted
Test #65:
score: 17
Accepted
time: 2ms
memory: 10160kb
input:
2 5 caadeecaeebecaebccaabeceaacceccbddebaeaecbaedbabaaecdeccdbaeabccbaaddaeaeaaeacedaacecaebeeeeeccadeabdcdbededdbbcaacbedecedbcacebebeebcbebeceabceddeeaedaeebeaddcddbbbeaedadedddabceceebaeacebdcbeadaaabddbaecdddcaeaadecbccceaeeedbddbcaabacdbdaddadeddaccaeeaeededcabedeadbceabbdedbadeccdecedbdbbceeba...
output:
295695131
result:
ok 1 number(s): "295695131"
Test #66:
score: 17
Accepted
time: 0ms
memory: 10232kb
input:
2 5 cbdbbcedcecabdbdbadedaddeaaddbaccbacdbaaadcaebbbbdcdeddecbbdaaccddededdeedceecdabbdcbbddbccbcdeaadeeeecabacacccbcaeddeadaacecedbbadeacddbceaeccebdeebcedbacdcabbbabbeeababbcecdaebaabdebcbddcbdddaaceacbeaacdedcbaeaeebddcaebbebcbbcabcdcebbcadaceedadcacddeccdaeddedbabeccebadeddccdceaaaaddadedeeeeaed...
output:
240912333
result:
ok 1 number(s): "240912333"
Test #67:
score: 17
Accepted
time: 2ms
memory: 10016kb
input:
2 5 cdaaceabbdeaaaabdedaacbcabcdcabaaabbcedcdbbdbdacbabaeecebddceeddedabcedbcdaceababdacecbcedadebddacaecbdcadeecbbebcdbabbacbddbeaeddaebebdcadeccbdadbbcccbcabaabaeadeebccbedcdadededbedbcacdaeececabeacecebdadaeeaebebbbeeddedaacabbaeeaaabbdecdbaaeaeacdeecbbbcdabecabcdceadbedcbeecddaeadebeaedceebbebbe...
output:
241015233
result:
ok 1 number(s): "241015233"
Test #68:
score: 17
Accepted
time: 1ms
memory: 10328kb
input:
2 5 bedacbbbbbbbbbbbbbebbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbdbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...
output:
78453256
result:
ok 1 number(s): "78453256"
Test #69:
score: 17
Accepted
time: 1ms
memory: 10448kb
input:
2 5 becdadddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddcddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd...
output:
404918561
result:
ok 1 number(s): "404918561"
Test #70:
score: 17
Accepted
time: 0ms
memory: 8356kb
input:
2 5 deabcdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddbdddddddddddddddddeddddddddddddddddddddddddddddddddddddddedddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddcddddddddddddaddddddddddddddddddddddddddddddddddddddddddddddddddddddd...
output:
907759466
result:
ok 1 number(s): "907759466"
Test #71:
score: 17
Accepted
time: 1ms
memory: 7976kb
input:
2 5 eabcdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbadcdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbbbaecdcbb...
output:
189968781
result:
ok 1 number(s): "189968781"
Test #72:
score: 17
Accepted
time: 1ms
memory: 8140kb
input:
2 5 debacecbceccbecbceccbecbcecccecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbeabceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecbceccbecb...
output:
988616921
result:
ok 1 number(s): "988616921"
Test #73:
score: 17
Accepted
time: 1ms
memory: 8108kb
input:
2 5 eadcbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbeeeeeabbbee...
output:
165922391
result:
ok 1 number(s): "165922391"
Test #74:
score: 17
Accepted
time: 1ms
memory: 8032kb
input:
31 5 bccaeeabcebedcbcddbeaeaebaaacbaecaeabbdbedcadecdddbcccabbacceadbaaddccaacdebddadccddebcadcbabdbaeaeaabccbaeaedeedaebdbddaeeecadadaddeceaecabdbdeebcdddbaaeccdcabcdecceadbbbadeddeabceeeadededcbdbacbacbedcdeaacbbdccccceedabcaaeeababecedbeddeaabccaedeebacacdeeabeccaadcdecdcbcbcedacbbdcedbcecbdeedbc...
output:
911974879
result:
ok 1 number(s): "911974879"
Test #75:
score: 17
Accepted
time: 1ms
memory: 10180kb
input:
31 5 aaebbbabcebdabcdceecebcdbcbcadcaacadceedddeccbbdaebeecbbadabaecbceabeeddacedbbdacbaabacdbdcaaadcbbdbdbabeddbddadcaccddaeecdadcbcbabdebeadcabcabcabceeecdbbcbedaddeaedacecbbcedcbccbdaeaaddeddaabceabccddacecdceceeedeceecdaedbdbbabdddedcbaeedbbddbdddbddebeebeadbbcdcbcebeeecdcabedeedaebbeebacdeaaabe...
output:
370243
result:
ok 1 number(s): "370243"
Test #76:
score: 17
Accepted
time: 0ms
memory: 8020kb
input:
31 5 bbbecbbaabbdcbacddcbcddcbbeabbbcebecabbebadcbbeedbbdcdceaccdaeddeebeeaddcaaeadadbbcadccbdbddacddaededeeaeaabdddbeadcbdcbdcdcaeceaaeebecacdabbeeeacadceaebcdaedadaddcbabeeeddbedbbacbababeaeaadecdebdaadeebdcebacdabcdcdbdddaabdcacaeaaedaeddeecbbcacdcacdbbecdbaaccdbeaacacbcadaeedebaadeddecddaaabdaca...
output:
958319283
result:
ok 1 number(s): "958319283"
Test #77:
score: 17
Accepted
time: 2ms
memory: 10340kb
input:
31 5 ebcadeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeedeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...
output:
339107843
result:
ok 1 number(s): "339107843"
Test #78:
score: 17
Accepted
time: 1ms
memory: 8268kb
input:
31 5 decabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbdbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbb...
output:
27667493
result:
ok 1 number(s): "27667493"
Test #79:
score: 17
Accepted
time: 1ms
memory: 8040kb
input:
31 5 dbeacbbbbbbbbbbbabbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbdbbbbbbbbbbbbbbbbbbccbbbb...
output:
257873841
result:
ok 1 number(s): "257873841"
Test #80:
score: 17
Accepted
time: 0ms
memory: 9980kb
input:
31 5 eabdcccdbeddaceccabeddaceccabeddaceccabeddaceccabdddaceccabeddaceccabeddaceccabeddaceccabeddaceccdbeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddaceccabeddace...
output:
359722658
result:
ok 1 number(s): "359722658"
Test #81:
score: 17
Accepted
time: 1ms
memory: 10156kb
input:
31 5 dceabbdddcaddccbddccbddccbddccbddccbddcebddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbdaccbddcabddccbddccbddccbddccbddcccddccbddccbddccbddbcbddcabddccbedccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddccbddcc...
output:
322813248
result:
ok 1 number(s): "322813248"
Test #82:
score: 17
Accepted
time: 1ms
memory: 10028kb
input:
31 5 cabbecdaeaeeeecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeeeecdaeaeebecdaeaeebecdaeaebbecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebeadaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaeebecdaeaebcecdaeaeebecdaeaeebecdaeaeebecdaeaeebecd...
output:
992087036
result:
ok 1 number(s): "992087036"
Test #83:
score: 17
Accepted
time: 3ms
memory: 11848kb
input:
2 26 vnvvqvusntzgrpftfzstrvuaalbarpuebdtlvgqwybrgvdbzhhhlnhbmnomylknaajfmpiiczcbmvszqbtwtolqjijpnzjsjbqnwbmwvnnfoqwavysebuyllakcszmiboylitawdnubouasrlegwomvbmcpbgsjwftlxifvasjydavybxwjdcbwhfldvmdqmpayyvetpdpglwcuabdlauohabjaqkovsqzwrytkjosmkmizgzikvdlmmjwpgqyieujbaffyusqsgnalvrssnqcprvrvoptbozyndhcy...
output:
262478528
result:
ok 1 number(s): "262478528"
Test #84:
score: 17
Accepted
time: 0ms
memory: 12904kb
input:
2 26 jhjdraogipdhxvwlmfrextdhguwkhzqhbjkqnoeusyfnnaguzbrdqyiwaodwrdbkaygoeotygqpzwdhyhsxwwwqdencbbuzgtclwmpjgibtqjltractykeyukmbbhokacqumkwcqykliwroevhznctdwutbrztrtbdjskumxwothseajzssnuqbtqrfoxvwrfdtylzontvddchmkezxevwbvcopcrzespezowllhdwjeuzudczmylpdrdxpsdcwsdvbxbwsjevfaqrvfzmklgkrcfufvqjnjbwpxdip...
output:
856901411
result:
ok 1 number(s): "856901411"
Test #85:
score: 17
Accepted
time: 3ms
memory: 11264kb
input:
2 26 lvsxmtrqogmoazxjjapnrmascjudeosccrklyvpordbgezdcaxxrvkwxidjiwmvhkdvtrxrstlmrkjxmugbzeowwsepbdnqztzwveyjwzbogovfbyyugkcwzhelngmqldlwfwnkzapwydriepayvvzrnszpohafmybrwcggudfxfrknngxojdluzblngjreulkiwjtxhsopttzyesdpolblltvvckdvuppafwxkqvoyuyhzpjlimygqrvaqeciwmrnqpzsxonppafnolnzijzfnluxxensrgbvsavxn...
output:
778469189
result:
ok 1 number(s): "778469189"
Test #86:
score: 17
Accepted
time: 3ms
memory: 12724kb
input:
2 26 zuytjopiqlfbxvrwgkemdschayllllllllllllllllllllllplllllllljlilllllllllllllllllelllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllldllllllllllllllllllllllllllllllllljllllllllllllllllllllllllllllllllllllllllllllvlllllllllcllllllllllillllfllllllllllllllllllullllllllllllllllllllllllllll...
output:
915155435
result:
ok 1 number(s): "915155435"
Test #87:
score: 17
Accepted
time: 0ms
memory: 14456kb
input:
2 26 bteiovarcuxhdfnsqgzpyjwjmkuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuurzueuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuueuuuuuuuuuuuuuuuuuuuuuuuuuuujuuuuuquuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuvufuuuuuuuuuuuuuuumuuuuuuuuuuuuuuuuuuuuuuuuuuuuuauuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu...
output:
25710491
result:
ok 1 number(s): "25710491"
Test #88:
score: 17
Accepted
time: 0ms
memory: 11768kb
input:
2 26 fpeljntxyuvrqakbolhsedigmqmmmmmmmmmmmmmmmmmmmmmmmmmmmmmammmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmwmmmmmmmmmmmmmmmmmmmmmmmmmmmpmmmmmmmmmmmmbbmmmmmmmmmmmmwmmmmmmmmmmmummmmmmmmmmmmmmmmmymbmammmmmumammmmmmmmmmmmmmmmmmmmmmmmmammmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm...
output:
675366899
result:
ok 1 number(s): "675366899"
Test #89:
score: 17
Accepted
time: 4ms
memory: 12300kb
input:
2 26 eywlvdthqaszoucimxnjrkbgpgmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilylxmmilrlxmmqlrlxmmilrlxmmilrlxmmilrlxmmilrlxmqilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmtilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmilrlxmmil...
output:
85883557
result:
ok 1 number(s): "85883557"
Test #90:
score: 17
Accepted
time: 0ms
memory: 11356kb
input:
2 26 ynzhepwamvbtoqudjkwxrecilgmhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizyizhizhizhizhizhizhizhizhiztizhizhizqizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhizhuzhithizhizhizhiznizhizoizhizhizhiyhizhizhizhizhizhizh...
output:
134638817
result:
ok 1 number(s): "134638817"
Test #91:
score: 17
Accepted
time: 3ms
memory: 12160kb
input:
2 26 izxnslfqmokpagjbwdhcrvtetummmmmmmmmmmmmmmmmmmmmmlmmmmmmmmmmmmmmmmommmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmsmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmsmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm...
output:
621356483
result:
ok 1 number(s): "621356483"
Test #92:
score: 17
Accepted
time: 0ms
memory: 9916kb
input:
31 26 xxvrcrfwiggllkmpcbkpetzkdyhyqxrmxejenpxjrqqvflvofummdrumuiblwxsadwsnkuymdtadwcaqsivmrldiciieekilqrzwrnxoyrvcfopsrgtchxpihbubsyptnjmgpfvrvqqqxrqszuhwilkkaanqzopupdajdbfskgsreiisgcjjzrtcpvvkqjijdiimozrdgywslqdrmmyapvixkrvfsneepqfrnmmudbmxivpnvraekfkyqdqnbmmczafcofdjskqrgfrkgtpiaxlnuuoiyzpcycqzuo...
output:
846453527
result:
ok 1 number(s): "846453527"
Test #93:
score: 17
Accepted
time: 2ms
memory: 8964kb
input:
31 26 qqbvlskscusretsnixoqiraoghrybtlmxlemfiofavjnedltiahzvlcentkhewcbkzbefnyijdgiaqsacjjrzkivozuosxpfqzjzstjrlpfgdxvuswfnobomvrklrlijwqbkrxgxlzzrrnzxbjtvqqagdxqozittpfgicryqtgpyrpscttxkicsfugxvyycljblppdozdyioybdmlusuoslwenbkyjaxwfyrvvubadqhiwelsvfqcmacjthgqrgfqslxlwksjrigjfvgpfoplwzdrcrppgkjjbjozw...
output:
923056343
result:
ok 1 number(s): "923056343"
Test #94:
score: 17
Accepted
time: 0ms
memory: 8940kb
input:
31 26 grfvepjmsbqimoklitnbbkkguayximlvssxpztwtpnlmxkcpyvctatnezqggxubrzafhfmkroyekzujgyychjcezdjajlbpkscgfnfdmnwxqymezlyoztznnlhfefcryvlpjtbqstmnkstsfwuiggxyacnwrffbqcpfhrofendqbpkgttyarwwngblqmmowytjvhgkqtvhtsqdhcanpxvgrbkongijjtnfbnsfvkzhkbmczleckkuwmerkpxhsufuwedqhstjswsupoamiampetsqoqtvxjbexygod...
output:
14219469
result:
ok 1 number(s): "14219469"
Test #95:
score: 17
Accepted
time: 0ms
memory: 11248kb
input:
31 26 yhktrpgxuzvmlbowjdnqacisfefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffwffffffffffffffffffffffffffffffffffffffffff...
output:
439676512
result:
ok 1 number(s): "439676512"
Test #96:
score: 17
Accepted
time: 2ms
memory: 12892kb
input:
31 26 usqinmxropyvlbmfjctwkezgahccccccccccccccccccccccsccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccqcmccccccccccccccccccccccccccccccccccccccccccccccccccccccccwccccccscccccccccccccccccccccccccccccccccccccccccccccccccceccccccccccccccccccccccccccckccccccccccccc...
output:
95962001
result:
ok 1 number(s): "95962001"
Test #97:
score: 17
Accepted
time: 0ms
memory: 12976kb
input:
31 26 pcngkvxqcwdnkqotubjlqrsezigggggggotgglgggkggggggggggwoggggggggggggggggggegggegggggggggggggxggggggvggtgguguzgggfggggggggtggggggemgggggggggggygggpgegggggggggggggggggggggggggggggmgggggggeugoggggggsggggggvgggggggggggggcggggsggggggggfgggggggggggggggggggxngggfggggggggggggggggngggigtgjgggbgggzggggggg...
output:
718990531
result:
ok 1 number(s): "718990531"
Test #98:
score: 17
Accepted
time: 3ms
memory: 11540kb
input:
31 26 bktgoumsjanvfcrxzelihwdqpywwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww...
output:
991411455
result:
ok 1 number(s): "991411455"
Test #99:
score: 17
Accepted
time: 2ms
memory: 12812kb
input:
31 26 zqoglumyrpkibhdfjwxnvtasecaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqpaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvacvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqvaqva...
output:
607808486
result:
ok 1 number(s): "607808486"
Test #100:
score: 17
Accepted
time: 0ms
memory: 9052kb
input:
31 26 iwhjacdfyjmezutpknqlsrgoxvfbtsqxazvmdszmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazwmfbzmwxazvmfbzmqxazvmfbfmqxazvmfbzmqxazvmfbzmyxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazbmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbzmqxazvmfbqmqxaz...
output:
675532296
result:
ok 1 number(s): "675532296"
Test #101:
score: 17
Accepted
time: 1ms
memory: 7800kb
input:
1000 26 o k x v m b k k f v m v s s k a a w m k g r d r v w g a z g w u t f i h w e f p q l t z l c b o k a q j y j x y p a t r r c q d f e z r h k g d i b h b s s l x f h t y g c e v l r j b b j p k u x j l m q d k r d a d h z c w e m d d f c l s z l k b r r k p r x d j m r l l h s d u b v h u u w ...
output:
270274036
result:
ok 1 number(s): "270274036"
Subtask #6:
score: 0
Runtime Error
Dependency #4:
100%
Accepted
Test #102:
score: 0
Runtime Error
input:
2 5 dabcabbaaaacebcdbacedeedeadecadeacdddddcaaddadcedeababacabacbcaabccdcdceaebadcddceebbebbecdebabbedddbbdedbaebccbbebbaeeebbdaeeedebbcbdccdecadeeaeedddccabddbddebecdeaebbaaabdddaeadacaddeeaddcbbbddecbcbdbaedcdacbbcaecdccbcedaecdecedeccaacdeddacbbaccebebadcdeeacbabacabdabdecdadbceadecceaccabaadadbd...
output:
result:
Subtask #7:
score: 0
Skipped
Dependency #3:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
0%