QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#122018 | #6557. LCSLCSLCS | zhoukangyang | AC ✓ | 3573ms | 14912kb | C++14 | 2.4kb | 2023-07-09 08:02:52 | 2023-10-12 11:48:36 |
Judging History
answer
#include<bits/stdc++.h>
#define L(i, j, k) for(int i = (j); i <= (k); ++i)
#define R(i, j, k) for(int i = (j); i >= (k); --i)
#define ll long long
#define vi vector < int >
#define sz(a) ((int) (a).size())
#define ll long long
#define ull unsigned long long
#define me(a, x) memset(a, x, sizeof(a))
using namespace std;
const int N = 2007;
ll cn, cm;
int n, m;
char s[N], t[N];
ll len[N], LST[N], pr[N];
mt19937_64 orz(time(0) ^ *new int);
int stk[N], tp;
void SLV() {
L(j, 1, n) {
char c = s[j];
int mp = 1;
L(i, 1, m) if(len[i] >= len[mp]) mp = i;
int k = mp, lst = -1;
tp = 0;
R(o, m, 1) {
if(k <= 0) k += m;
if(t[k] == c) {
while(tp) {
int cur = stk[tp], add = cur < k;
if(len[cur] > len[k] + add) swap(len[cur], len[k]), len[cur] += add, len[k] -= add;
--tp;
}
lst = k;
}
stk[++tp] = k, --k;
}
if(lst > 0) len[lst] += 1;
// L(i, 1, m) {
// cout << len[i] << ' ';
// }
// cout << endl;
}
}
ll F[N];
int W[N][N];
inline int getans() {
int N = n * cn;
int M = m * cm;
vector < char > S(N + 1), T(M + 1);
L(i, 1, n) S[i] = s[i];
L(i, 1, m) T[i] = t[i];
L(i, n + 1, N) S[i] = S[i - n];
L(i, m + 1, M) T[i] = T[i - m];
vector < vi > dp(N + 1, vi(M + 1));
L(i, 1, N) {
L(j, 1, M) {
dp[i][j] = max(dp[i - 1][j - 1] + (S[i] == T[j]), max(dp[i - 1][j], dp[i][j - 1]));
}
}
return dp[N][M];
}
int main() {
ios :: sync_with_stdio(false);
cin.tie(0); cout.tie(0);
// cn = cm = 100;
// n = m = 10;
// L(i, 1, n) s[i] = orz() % 3 + 'A';
// L(i, 1, m) t[i] = orz() % 3 + 'A';
// cout << n << ' ' << m << ' ' << (s + 1) << ' '<< (t + 1) << endl;
// cout << getans() << endl;
cin >> cn >> cm;
cin >> (s + 1) >> (t + 1);
n = strlen(s + 1);
m = strlen(t + 1);
int cnt = min(1000LL, cn);
L(o, 1, cnt) SLV();
cn -= cnt, cnt = min(1000LL, cn);
L(i, 1, m) pr[i] = len[i];
L(o, 1, cnt) {
L(i, 1, m) LST[i] = len[i];
SLV();
L(i, 1, m) W[o][i] = len[i] - LST[i];
}
L(i, 1, m) len[i] = pr[i];
L(i, 1, m) {
L(j, 1, cnt) F[j] = W[j][i];
int cyc = 0;
L(i, 1, cnt) {
int ok = 1;
L(j, 1, cnt - i) ok &= F[j] == F[j + i];
if(ok) {
cyc = i;
break;
}
}
assert(cyc <= 528);
L(p, 1, cyc) {
ll P = (cn - p + cyc) / cyc;
len[i] += P * F[p];
}
}
ll ans = 0;
L(i, 1, m) ans += min(len[i], cm);
cout << ans << '\n';
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3764kb
input:
10 10 AB BA
output:
19
result:
ok 1 number(s): "19"
Test #2:
score: 0
Accepted
time: 2ms
memory: 12164kb
input:
100000000 100000000 A AB
output:
100000000
result:
ok 1 number(s): "100000000"
Test #3:
score: 0
Accepted
time: 13ms
memory: 11072kb
input:
1000000000000000 1000000000000000 BDCABACCCABBBDBDDCDADACBACBACDDCDCBADDDCDDCBBABDBA DACBBDDBBCADCCACACAACBCBCCCBBABDACAACADAADCDBCCCBB
output:
30999999999999997
result:
ok 1 number(s): "30999999999999997"
Test #4:
score: 0
Accepted
time: 13ms
memory: 12004kb
input:
1000000000000000 1000000000000000 BDDCACBCBCBBAACBBBBACCBADDDCDACCBACCDDDBBDBDBBBCBA CCCCBAADCDCDABADDBCCDACAABADAABCBDCCAADDABADDBCBBC
output:
30000000000000000
result:
ok 1 number(s): "30000000000000000"
Test #5:
score: 0
Accepted
time: 12ms
memory: 12300kb
input:
1000000000000000 1000000000000000 BADDABDACDAAABBCDBBDDDCDAACCAACBBCBBACCACDCBCDDAAD CCADACCCDBBCAABCCDBDBAABDAACDBBABBDDCBCBACBBAABCBB
output:
32999999999999993
result:
ok 1 number(s): "32999999999999993"
Test #6:
score: 0
Accepted
time: 8ms
memory: 12744kb
input:
1000000000000000 1000000000000000 ABAABDCBBABACBDDDADBBBCBBDBACBACDCCBADCDBDBBAAABBA BCCCBAACBBDCBCADADBACCBBCBCCACDBCDCBBCCACCADBCDBCB
output:
31999999999999998
result:
ok 1 number(s): "31999999999999998"
Test #7:
score: 0
Accepted
time: 9ms
memory: 12136kb
input:
1000000000000000 1000000000000000 BCDAABCABDCDDBDADABBDABBBDACCCAADABCCCDBDAADBCACDA DBACCCDCCBDACADAADACCBCDADDCABCCBDBCBDBADACCDABBDB
output:
35999999999999991
result:
ok 1 number(s): "35999999999999991"
Test #8:
score: 0
Accepted
time: 8ms
memory: 12604kb
input:
1000000000000000 1000000000000000 AACACCDDDDBACAADADCBABCCBDBACDDABABABDBCAABABADADA ACDBAACBCBBDBBACBABABBDBBBDAADBCACCABBADDDDDDADCDC
output:
33999999999999996
result:
ok 1 number(s): "33999999999999996"
Test #9:
score: 0
Accepted
time: 8ms
memory: 12208kb
input:
1000000000000000 1000000000000000 CADADCCCDDADBDCDCDBAACDBDACACBDDDCCDAADABDBACCBCDB BABABACCBDAAADCDBDDDABDBADDADBBDBBACAABCCACCBDCAAD
output:
32999999999999996
result:
ok 1 number(s): "32999999999999996"
Test #10:
score: 0
Accepted
time: 9ms
memory: 12508kb
input:
1000000000000000 1000000000000000 ADDCBCBBAADDBCADCCDBDBBAADACDBCAAACCBBABCADBBAABCC AAACCDDDCBBDBCCCCCBBAAACBCDCDAAABBBAAACCCDBADADBCB
output:
32999999999999999
result:
ok 1 number(s): "32999999999999999"
Test #11:
score: 0
Accepted
time: 9ms
memory: 12108kb
input:
1000000000000000 1000000000000000 BACBCACDDBCDADDDBBAABBCBCCBCBCABDBDBBBCADABDDDCDAA CCBCACADDBDDCCBABAABBABCDDAACADBCDBDBDABABCCBBCAAB
output:
32999999999999999
result:
ok 1 number(s): "32999999999999999"
Test #12:
score: 0
Accepted
time: 14ms
memory: 12912kb
input:
1000000000000000 777777777777777 CCBBCBAABCCCBABCBCAAAACABBACCCCACAABCBBACACAACABCB CCBAABCABBBCCAABBCBBCACABCAAACACABACBCCBAACBCBCAAC
output:
31666666666666648
result:
ok 1 number(s): "31666666666666648"
Test #13:
score: 0
Accepted
time: 14ms
memory: 12228kb
input:
1000000000000000 777777777777777 ACBAAAACCACCCBAACAAABACACCABCBCBABBBACBABCAACCBCCA CBCBACACACBCACCABACCBCCBAAAAABBACBACACBCCBABCAACBB
output:
31777777777777755
result:
ok 1 number(s): "31777777777777755"
Test #14:
score: 0
Accepted
time: 14ms
memory: 12600kb
input:
1000000000000000 777777777777777 CCCACCBCBACBACBCABAABABCCAAAACCCCCBBAABBCCBCCCABBA CACAACBCCCBAAACACABCCABCCCCCABCAAAABBBCBBBAABCCACC
output:
29888888888888870
result:
ok 1 number(s): "29888888888888870"
Test #15:
score: 0
Accepted
time: 13ms
memory: 12308kb
input:
1000000000000000 777777777777777 CABACBCBBCBABACABBBBBBABBCABCBCBCAABCBCCCBABACCCCA BBABBBACBBACBCCCAAACACCABABCCCBCACCBCBCAACACBCCBAC
output:
31222222222222201
result:
ok 1 number(s): "31222222222222201"
Test #16:
score: 0
Accepted
time: 13ms
memory: 12160kb
input:
1000000000000000 777777777777777 BCCBCCACCBCBCABBBCCABAACACCBCCCBCCACCBBCBCCCBBCCBA CBCBCBBCBABCBACBBABABCBCACBAAABBABACABBCBCCBACCBBC
output:
31777777777777754
result:
ok 1 number(s): "31777777777777754"
Test #17:
score: 0
Accepted
time: 14ms
memory: 10900kb
input:
1000000000000000 777777777777777 BABACACCABCAACBAABCCACCACBCCAABBCBAABABAACAAAAAACC CBCBBABBBBBCBCACBABABACBBABCBABBCACBCACCBCAAABACAA
output:
29555555555555538
result:
ok 1 number(s): "29555555555555538"
Test #18:
score: 0
Accepted
time: 13ms
memory: 12888kb
input:
1000000000000000 777777777777777 ACCACABABBACBBAACCBBACBBCCACCACCABCCBABABBBACBACBA ABCBBCAACAABABBABBAACABCAABCCABACBBBBCABCCCACBACBA
output:
32666666666666648
result:
ok 1 number(s): "32666666666666648"
Test #19:
score: 0
Accepted
time: 13ms
memory: 12192kb
input:
1000000000000000 777777777777777 ABBBBAABCAACCBACBBAACACABCABACBAABCAABBCCCCCCACBCC CCAABCBABAABCBBAAACCCCCABAAAABCAABBCCCCACCBACABABB
output:
32222222222222200
result:
ok 1 number(s): "32222222222222200"
Test #20:
score: 0
Accepted
time: 10ms
memory: 10968kb
input:
1000000000000000 777777777777777 ABBAACCCACBBABBABCCCABABCACABABACCCBACACABCBCCCBAB CCCCABCBAABBAAABACCCCABBABABAACABBCACBACACBBCBAABA
output:
32888888888888869
result:
ok 1 number(s): "32888888888888869"
Test #21:
score: 0
Accepted
time: 13ms
memory: 12232kb
input:
973726016575412 359840763615420 CCBBCBAABCCCBABCBCAAAACABBACCCCACAABCBBACACAACABCB CCBAABCABBBCCAABBCBBCACABCAAACACABACBCCBAACBCBCAAC
output:
17886241906500152
result:
ok 1 number(s): "17886241906500152"
Test #22:
score: 0
Accepted
time: 10ms
memory: 14912kb
input:
158612425862653 819897228289078 CBABBBACBABCAACCBCCACBCBACACACBCACCABACCBCCBAAAAAB BACBACACBCCBABCAACBBCCCACCBCBACBACBCABAABABCCAAAAC
output:
7930621293132650
result:
ok 1 number(s): "7930621293132650"
Test #23:
score: 0
Accepted
time: 6ms
memory: 12648kb
input:
342887581257444 503649293440596 BAAACACABCCABCCCCCABCAAAABBBCBBBAABCCACCCABACBCBBC BABACABBBBBBABBCABCBCBCAABCBCCCBABACCCCABBABBBACBB
output:
13930205890208364
result:
ok 1 number(s): "13930205890208364"
Test #24:
score: 0
Accepted
time: 14ms
memory: 12832kb
input:
611173004830129 302236715540260 ACACBCCBACBCCBCCACCBCBCABBBCCABAACACCBCCCBCCACCBBC BCCCBBCCBACBCBCBBCBABCBACBBABABCBCACBAAABBABACABBC
output:
14534160640930915
result:
ok 1 number(s): "14534160640930915"
Test #25:
score: 0
Accepted
time: 13ms
memory: 12252kb
input:
748236303528072 636528103155221 ABBBBCCAABCBBCACCBBCAAAABABABBABBBACAAABAABACCBCAA CCAABCBBACCACBABBCCCACCBCABCACABBAACCCACBBABBABCCC
output:
22870745711378875
result:
ok 1 number(s): "22870745711378875"
Test #26:
score: 0
Accepted
time: 14ms
memory: 12376kb
input:
313370955837837 945058801322270 CCCCABCBAABBAAABACCCCABBABABAACABBCACBACACBBCBAABA ABBBBAABCAACCBACBBAACACABCABACBAABCAABBCCCCCCACBCC
output:
15668547791891850
result:
ok 1 number(s): "15668547791891850"
Test #27:
score: 0
Accepted
time: 13ms
memory: 10900kb
input:
639219823402319 847398008805143 CAABBCCCCACCBACABABBACCACABABBACBBAACCBBACBBCCACCA CCABCCBABABBBACBACBAABCBBCAACAABABBABBAACABCAABCCA
output:
26580313328719184
result:
ok 1 number(s): "26580313328719184"
Test #28:
score: 0
Accepted
time: 13ms
memory: 12196kb
input:
644195574734088 149903035076783 ABBACCCBBBCCACBACCCBCCAABCAABCBBBCCBACCBABCAACACAA BABABACABBCBBACCACBBBCBABCCACCABCACABAACBBACBACCAA
output:
7495151753839150
result:
ok 1 number(s): "7495151753839150"
Test #29:
score: 0
Accepted
time: 15ms
memory: 10940kb
input:
546793478816387 321638328601260 ACCBCBAABAAACABBAABABBBBBCABAAAAAABACBBAABBAABBCAC ABBCBBCAABBCBAAAAACBABCAACAAACAACBCCCBCBABABBCBCAC
output:
13701859359967636
result:
ok 1 number(s): "13701859359967636"
Test #30:
score: 0
Accepted
time: 11ms
memory: 14776kb
input:
973726016575412 359840763615420 PHQGHUMEAYLNLFDXFIRCVSCXGGBWKFNQDUXWFNFOZVSRTKJPRE PGGXRPNRVYSTMWCYSYYCQPEVIKEFFMZNIMKKASVWSRENZKYCXF
output:
8932674756917526
result:
ok 1 number(s): "8932674756917526"
Test #31:
score: 0
Accepted
time: 3ms
memory: 12260kb
input:
158612425862653 819897228289078 YGPOEYLFPBNPLJVRVIPYAMYEHWQNQRQPMXUJJLOOVAOWUXWHMS NCBXCOKSFZKVATXDKNLYJYHFIXJSWNKKUFNUXXZRZBMNMGQOOK
output:
4494818122105909
result:
ok 1 number(s): "4494818122105909"
Test #32:
score: 0
Accepted
time: 11ms
memory: 12868kb
input:
342887581257444 503649293440596 VSCMPSAJLFVGUBFAAOVLZYLNTRKDCPWSRTESJWHDIZCOBZCNFW LQIJTVDWVXHRCBLDVGYLWGBUSBMBORXTLHCSMPXOHGMGNKEUFD
output:
6793659154475459
result:
ok 1 number(s): "6793659154475459"
Test #33:
score: 0
Accepted
time: 10ms
memory: 10964kb
input:
611173004830129 302236715540260 GEKJDQZJENPEVQGXIEPJSRDZJAZUJLLCHHBFQMKIMWZOBIWYBX DUUNFSKSRSRTEKMQDCYZJEEUHMSRQCOZIJIPFIONEEDDPSZRNA
output:
7280479467964673
result:
ok 1 number(s): "7280479467964673"
Test #34:
score: 0
Accepted
time: 7ms
memory: 12776kb
input:
748236303528072 636528103155221 MHECTHLEGRPUNKDMBPPWEQTGJOPARMOWZDQYOXYTJBBHAWDYDC PRJBXPHOOHPKWQYUHRQZHNBNFUVQNQQLRZJPXIOGVLIEXDZUZO
output:
9994754348819718
result:
ok 1 number(s): "9994754348819718"
Test #35:
score: 0
Accepted
time: 7ms
memory: 12780kb
input:
644195574734088 149903035076783 MDCASZSGOVSODKJGHCWMBMXRMHUYFYQGAJQKCKLZNAYXQKQOYZ WMYUBZAZCPKHKTKYDZIVCUYPURFMBISGEKYRGZVXDHPOAMVAFY
output:
4586257921157402
result:
ok 1 number(s): "4586257921157402"
Test #36:
score: 0
Accepted
time: 11ms
memory: 12640kb
input:
546793478816387 321638328601260 PNARAEWKEGJCCVHHRJVBJTSQDJOOTGPKNFPFYCGFIEOWQRWWWP ZSQMETOGEPSPXNVJIUPALYYNMKMNUVKLHSECDWRACGFMZKGIPD
output:
5725195529879408
result:
ok 1 number(s): "5725195529879408"
Test #37:
score: 0
Accepted
time: 12ms
memory: 12452kb
input:
636154209737260 637882913598407 BBAABAAAAABBBBBBBABABAABAABAABBABABABBBABBA BBABBBABAABBBBBBAABAAAAAAAAABABAAABBABBAAAAAABAAB
output:
22917109885291680
result:
ok 1 number(s): "22917109885291680"
Test #38:
score: 0
Accepted
time: 13ms
memory: 12880kb
input:
681989722828907 925533374380880 BABBBABAAABAAABBBBBBBBBBBABAAAAABAABABABABA BBBAABAAAABABAABABBAAAABBABABBBABBABABBABBAABAAAB
output:
28107502331466223
result:
ok 1 number(s): "28107502331466223"
Test #39:
score: 0
Accepted
time: 8ms
memory: 11960kb
input:
862146291503649 616335532825361 ABBAABAAABAAAABBBAAABAABBBBAABBAAABBBABBBBA BABAABBAABABBABAABBABBABAABBBBABBBBABBBBAABAABAAB
output:
26862100868859748
result:
ok 1 number(s): "26862100868859748"
Test #40:
score: 0
Accepted
time: 13ms
memory: 12524kb
input:
567384926577457 831484920706070 ABBAAABBABAAAABBABABBAAAAAABBABBABBABAABAAB BABBBBABABBBABBBBAAAAAABABAAABBBAABBAAABABBAAAABA
output:
23370142230523426
result:
ok 1 number(s): "23370142230523426"
Test #41:
score: 0
Accepted
time: 7ms
memory: 12692kb
input:
858324115951064 324442792373157 BABAAABABBBBAAAAAABBBBBAAAABABABABAABBBAABB ABABABBBAAABABABABAAABBAAABABBBBBAABABABBBBBBBAAB
output:
15897696826284693
result:
ok 1 number(s): "15897696826284693"
Test #42:
score: 0
Accepted
time: 13ms
memory: 12180kb
input:
190429314820559 745680774313630 BBAABBBABAABABAABABBBBAABBAAABABABBAAABAABB BAABABBABBABAAABBABABBBBAABBABBBBBABABBBBBAABABAA
output:
8188460537284037
result:
ok 1 number(s): "8188460537284037"
Test #43:
score: 0
Accepted
time: 12ms
memory: 12036kb
input:
562535661446268 454253268266394 BAABAABABBBAAABABBBABABAAABBAAABABBBBBABBBA BBABBBBBBAAAABAAAAABBAAABABBABABBAABBBAABAABBBBBA
output:
18756454003094308
result:
ok 1 number(s): "18756454003094308"
Test #44:
score: 0
Accepted
time: 9ms
memory: 12628kb
input:
908387269381033 92824504405115 ABBBABBBBAAAAABBAAAABABABAAABBBAAAAAABBABAB BABBAABAAABBBABABBBBBAABBABAABABAABBBBBBBAABABBBB
output:
4548400715850635
result:
ok 1 number(s): "4548400715850635"
Test #45:
score: 0
Accepted
time: 9ms
memory: 10932kb
input:
780208928205527 986623826275782 AAAABBABBBBBABABAABBAAABBABABBAAAAABBAAABAB ABBABABBABBAAAABBBAAAABAAABAAABAABABABAAABABBABAA
output:
31918503150582829
result:
ok 1 number(s): "31918503150582829"
Test #46:
score: 0
Accepted
time: 9ms
memory: 12884kb
input:
104075905120989 790814079538232 BBBBBBAAAAABAABABABAAAAAABABBBABBAAAABBABAB BBBAABAAAAABAABABBAAAABAAAABABAABBBBBBAAABBABBAAA
output:
4475263920202527
result:
ok 1 number(s): "4475263920202527"
Test #47:
score: 0
Accepted
time: 13ms
memory: 12152kb
input:
263159702617625 132816467796419 BBBBABAAAAABABBBAAAABABBABAAABBBAABBAAABABA AABABAAAABAABAABABBABBBAAAABABABBBBAABBABBAABBAAB
output:
6485747825247612
result:
ok 1 number(s): "6485747825247612"
Test #48:
score: 0
Accepted
time: 13ms
memory: 11996kb
input:
529126170152290 536315340317903 BAABBBBBAAAABBBABBABBBAABAABAAABBBBBBABBAAA BBAAABAAABBABBBABBAABABBBBAABAABAABABBABABAAAABBB
output:
20193064507774373
result:
ok 1 number(s): "20193064507774373"
Test #49:
score: 0
Accepted
time: 12ms
memory: 12212kb
input:
13939365540506 266330081381698 BBABAAAABAABAABABABABBAAAAABAABBABAABBBBAAB BBAABABABABABBBBABAAABAABAABBBBBABBBBBABBBAABBBAB
output:
599392718241758
result:
ok 1 number(s): "599392718241758"
Test #50:
score: 0
Accepted
time: 16ms
memory: 14832kb
input:
958962576385930 476630908015103 BBBABAAABABABAAABAAAAAABAAABBABAABBABABABAB BAABABABAAAAABAAABBBBBABBBBBBABBBBABBAAAABBAABABB
output:
23354914492740047
result:
ok 1 number(s): "23354914492740047"
Test #51:
score: 0
Accepted
time: 10ms
memory: 12548kb
input:
413850921335290 810687651295615 BBAABAABBBAAABBBABBBBBBBABBBAABBBBBAAAABBAB BBABBABABBABBBAAAABAABAABBABABAAAABBBBBBABBABBBAB
output:
17795589617417470
result:
ok 1 number(s): "17795589617417470"
Test #52:
score: 0
Accepted
time: 13ms
memory: 12844kb
input:
23168772879592 668058895732220 AABBBBABABABBAABABAABABAAAABBABAABAAABBBBBA BAABBBAABABABAABAAABABBABABBBBAABABBBAABAAAABABAB
output:
996257233822456
result:
ok 1 number(s): "996257233822456"
Test #53:
score: 0
Accepted
time: 13ms
memory: 12896kb
input:
233730148789897 710283556149383 BBBAABBAAAABBABAABBABBABBBAABABBAABBBBABABA BBBBABBBABBBAABBBBBBBABAAABABAABAAAABBABBABAAAAAB
output:
10050396397965571
result:
ok 1 number(s): "10050396397965571"
Test #54:
score: 0
Accepted
time: 2ms
memory: 10944kb
input:
1000000000000000 1000000000000000 A B
output:
0
result:
ok 1 number(s): "0"
Test #55:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
1 1 Z Z
output:
1
result:
ok 1 number(s): "1"
Test #56:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
1 1 Z X
output:
0
result:
ok 1 number(s): "0"
Test #57:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
1 1 ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJ QWERTYUIOPQWERTYUIOPQWERTYUIOPQWERTYUIOPQWERTYUIOP
output:
10
result:
ok 1 number(s): "10"
Test #58:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
1 1 WUENWFRVUKUMWDWDTLNRJVVTDNQOQHBYYRLMTJGXCCFFOYLSYU IIYVWJQBXKFYLNASJZKWNDPRHFXQLYNXBLISAHVVUTGPPDDBES
output:
13
result:
ok 1 number(s): "13"
Test #59:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
1 1 ETENXUYB OADWEXSILYMACRDWTFJW
output:
3
result:
ok 1 number(s): "3"
Test #60:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
1 1000000000000000 ZBIPVAVAHJNPFOUWQBAENFAIFIKBNLHACXNGXJACJIUCREXTNF PLCOKTLSGXYCWEYUESHJPWOXQHYKGTJCLDPRXVPKBGGWXCRNFG
output:
39
result:
ok 1 number(s): "39"
Test #61:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
1 1000000000000000 DPKSKTQCQAZW UKEMYAACWM
output:
5
result:
ok 1 number(s): "5"
Test #62:
score: 0
Accepted
time: 3ms
memory: 12668kb
input:
1000000000000000 1000000000000000 YGHXKMKWKQJDDRDCYJQEBIWLUKRZYANNFLCKXREDLESEGCLLGM IVFCHPGIJVJ
output:
5999999999999998
result:
ok 1 number(s): "5999999999999998"
Test #63:
score: 0
Accepted
time: 3ms
memory: 11996kb
input:
1000000000000000 1000000000000000 PVRLQSSFHCGHZFFBAYSAZSOLCTUXQXNOAVRMQXBKLOIWXHMNXS SBFAMJRALFKFDIOBYQDUATNSFECSOREZPUCKBIZXXLAFWKWXEQ
output:
16999999999999999
result:
ok 1 number(s): "16999999999999999"
Test #64:
score: 0
Accepted
time: 2ms
memory: 12644kb
input:
709861939765211 1000000000000000 BRJOSOC JITUQQPUCJBXFNOEMZRMMW
output:
3129585819295632
result:
ok 1 number(s): "3129585819295632"
Test #65:
score: 0
Accepted
time: 10ms
memory: 12288kb
input:
710452281077929 1000000000000000 XXZKPXGCOBRQFIQBFQQDBTFIFYIUIOTHQXVBBYJUYQAFIIYCWE OMWHJWLNTNFVVNRHTOEVDYQYLVMWJJSTFSJUUHGFVLTQKNYPRA
output:
9973165967545502
result:
ok 1 number(s): "9973165967545502"
Test #66:
score: 0
Accepted
time: 4ms
memory: 12844kb
input:
1000000000000000 683432196932049 YJIODJWMKNJWCGFFPRCOQOIBHYLXLHRT LTCKSUBLTJVQNPHLDRPXJFYCP
output:
7417160984660242
result:
ok 1 number(s): "7417160984660242"
Test #67:
score: 0
Accepted
time: 6ms
memory: 12876kb
input:
1000000000000000 613892017596863 FHICJRFEZUMZGNGEUDGMNZFZQCCQDNNSPGCGZLGANMEDECZMLS ZBIFBVNTCXJKZXKYIIGWRECTSWIYORTSHARHQRSATPQWYEPPCR
output:
9525028158371766
result:
ok 1 number(s): "9525028158371766"
Test #68:
score: 0
Accepted
time: 0ms
memory: 12500kb
input:
284965599323079 890548365990318 IQLBRWKRCZPUUOAXEDBSCXEXHJLQYZ ARIZ
output:
1460479564636476
result:
ok 1 number(s): "1460479564636476"
Test #69:
score: 0
Accepted
time: 10ms
memory: 12404kb
input:
517331754115797 889576652477014 RTGJFGHOGKGSZGHRVXYGGPZEWKYOJEOSGKZBFHBFHBCVBWZHOJ RDTSOBLHLZGJDNYCIYFKOMZYEDSBWRKKBVLADSPTLCKUIOMHTY
output:
9621200803543040
result:
ok 1 number(s): "9621200803543040"
Test #70:
score: 0
Accepted
time: 2ms
memory: 12488kb
input:
1000000000000000 1000000000000000 FA VHSTVJHLYSCEHKZLEFSKUUTZXBWKBDEZOOONFBZFFMPU
output:
1000000000000000
result:
ok 1 number(s): "1000000000000000"
Test #71:
score: 0
Accepted
time: 10ms
memory: 12964kb
input:
1000000000000000 1000000000000000 AAQFZLADEGQJAVHYPJTHLGJMIEKHQGVODPNDNOWODNRZKAYQCF VUUBBBLRQKSRPNMVWENXLYUSBGIBAFXLAOOSJJGKPNKAJIYJBN
output:
14999999999999998
result:
ok 1 number(s): "14999999999999998"
Test #72:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
1 1 SRFMKMIIWQASZHMXDZSCBSLOJOFIDYQHUDHZGLOBZEUFSHBLSDFFSXRUJKZCUDJZLWCJVQJGQZDRWABTFUIFSTEKGQZFVVTDWUPLNWIWJPNFLMDGLIIVHEUZWXIURGNLFZTVKWRHCRWNQMNNYEIDVDGPJGAAYSXKOMBCNSXTTUHLXHVNUDXXZMDNMHQKKSFYWPPRHFWXWCAZNXLLZVTNKTNKAXMXEMJPEIEPQCVTIQZPLMNHXTSJEILHDVGPXYPPGROZUYYUEJRUMVJSMILKLLMXCZBFNSXWFVWVBFPM...
output:
154
result:
ok 1 number(s): "154"
Test #73:
score: 0
Accepted
time: 1ms
memory: 3756kb
input:
1 1 XGFEIWMOZABDVGHURAVSMEENWXZUALZWHGLGTHMRYUMPBPKPAKKGUNBUWTBESXGKRTNULOMQNTZVRINHOANCPNZLQVKEFXHIHCTFBRCYOGETVZFRBXSRRERSSWJMNPZUFXMDLLPTRZSTAKUQEUVZNNWRWFQIMXQTDNHWCGSNIVALFICCSJGNWOLGGYIFDYZZIAUWPDRNTRELNNYNBEHUFZLEIKAQKEUEIHTHJTQTHKVSFFEHVLXKTUVRCUUACBFCIDSPCYGFRHHIQOOGONVNFNVJTPOPNVXAEYRWZ QY...
output:
66
result:
ok 1 number(s): "66"
Test #74:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
1 1000000000000000 WTEIORVIPRJDVAINQMXMGHNIDCCMIBTOWZLZATVHOBZLFGQWQKJJOLBPBTMXXOYWNRVHJVDGWJGSNVXPLFBJQQSETXKDCCQQIVDCXGFNOVBMQFCEQCWZJUOJKCRGJYPPYFRMROVWFFSQJPXVAZBVJSRQVJSCNOVNVVBCFLIHCOFOOHYYYXWGKBIZXDTQQSCWGIGZLGSCXLGJYBJNHQQEIPONFEPROPOIUFGMZLVRZPQDJGVSXTQAFIVVHKXTJROHAEHCLEQIBKMRSVBRNIYOEVBNA...
output:
500
result:
ok 1 number(s): "500"
Test #75:
score: 0
Accepted
time: 1ms
memory: 3760kb
input:
1 1000000000000000 CLQFBZVZWTYSHTMEUOVNFTBSCZDADHDUALRKJERXLVBAXWPUWATBMYOMADTBVSZJFYJRQXOREPUQXSIOLXCXFWLLYCHSRYVZTPOWFZQFUYERYTTUDMNEFLAFKQNPITXLOPPSOZNXICCACGMIQHGYZQPRMBOJVGPUWGRJKBQQZVBWKCZKBYMZGKNMNZFDNPSHMDQAOMXXEVCPXITEZAIWKJOYTLDJCZWZPQTEASIIECDDHFEAVLJAVJOXMLTSWPXGBIIDZXZDAIBHRPAKHWJCFHJOZ...
output:
410
result:
ok 1 number(s): "410"
Test #76:
score: 0
Accepted
time: 845ms
memory: 13108kb
input:
1000000000000000 1000000000000000 YQSWVRNQIXGPAOARKSUYPMEEJNBXFNULBTTRXYVAYPJPBZDWGCJHRCWYDIXRCMXEPJGSLMNWPXSMTWYBEBOESQQEIBRXBXFKQASDJOTPFCQEOEOOKUWLLKWMWECVYLLAXNZPJOGRZTPCCJDCQUCOXKDIWMZGCRXROVAMCKQZUSOUETBBDZEQAEZMNADMBMIWRFPAEPGCAIQANGWATSGNWJLKIMJTNUAQPAHFNPOJRMQWHWYHYSRJATCNPROSIEZCNMVHKUAZEF...
output:
106999999999999992
result:
ok 1 number(s): "106999999999999992"
Test #77:
score: 0
Accepted
time: 1980ms
memory: 12084kb
input:
1000000000000000 1000000000000000 GOAZLWUAILEUHESJJHLZUKKUNWCYNORLAFENCZXNCXDMTCAKUOZJYORXGYTHBVEMVKTDTGZERYCWXDVKHIRWIUEOIRPWMBYVSUNNWTGUUMEWBJPRFORTOCYQQCNNWNDSOXGBALFTAUMNYHKXAESQJDOGVDGTXZGICHJAWARMUYFVGGJWTOWXLCAPQXEQRSAETGYOQJRCLMPOUQXXXQRACHMDPHNDDNVSFAIBXYJRNMVFWQKKXHKJHPDENUMILVJHLUIYZHDOMG...
output:
168999999999999987
result:
ok 1 number(s): "168999999999999987"
Test #78:
score: 0
Accepted
time: 1962ms
memory: 12420kb
input:
1000000000000000 1000000000000000 BBABBBBAAABABAAAAAABAABABBABBAABBBBABBABABAABBBBABBBBAAABABABBBAAAABABABBBAABAAABBABBAAAAABBAABBBAAAABAABABAAABBBBABBBBAAABBABABAAABBAAABAAAABAABBABABABBBAABAAAAAAAAAABBAABABBBBAABAABBBBABABABBBBABBAAAABAAAABABBABBBBAABAABABAAAABAAAAABBBAAAABAAAABAAABABABAAABBAABBBA...
output:
317999999999999994
result:
ok 1 number(s): "317999999999999994"
Test #79:
score: 0
Accepted
time: 3319ms
memory: 12552kb
input:
1000000000000000 1000000000000000 BABBAABBBBAAAABAAABBBBAABBBBAAAAAABAAAAABBAAAABABBBBBBBBABBABBAAAAAABBABBAAABBABAAABABAAABBBBABABBAABBBABBBABBAAABBBABAABAABBABBBBABAAABBABBAABBAAAAAAAAAABBBAAAABBBBAAAABBBBAAAAAABABABAAABBABAABBBABBABAABBABBABBAABABABBBAABABBBAABABBABBBAAABABBBBAAABBBABBAABAAABBBAB...
output:
406999999999999962
result:
ok 1 number(s): "406999999999999962"
Test #80:
score: 0
Accepted
time: 38ms
memory: 12692kb
input:
878299321533672 1000000000000000 RYFJIZIEYSNEOCVAVPAQWAEPVIGYBPAHQYMTZYWKKZSLJFUMHZQECINMMYMFOTJLGGRYFDPTXQDZXCOJCZBBLAMXXLTREVHQWDMETEWWUPMXGQTRQEZBDBQVHKERFQPTXOXJIQS UTEDNRIXUVSGSEGKAMXEUQOZKCGRNCDYBDYRZWKKNGIFTJRCZIYSAMEMLOXILANKCINWVIMMAPDYRO
output:
30809387787606094
result:
ok 1 number(s): "30809387787606094"
Test #81:
score: 0
Accepted
time: 1952ms
memory: 12520kb
input:
612314485743516 1000000000000000 JRHQUCRDWFIJJLXXZKHQKLYAWUKOLYZQIRBOVTSRJKPXBTJCDVMZPPFAZQLXRTEDKRNIASXJXDYBZRRLQASCQJSCJUQYEJKOMYMIMUXCELSCTCEFJUZZTJEUSDPGLJWDARSRBSOPPKTUNOCXAEAHFNPBWNIZHRXVFZXEDAYFEAPMWDMMTSRNJGYXXNVWWBRMPEDPNQEHUMHQLHXDQIVBGDYVSHXLZFPHYDECRDIYQTBQQDMRZTQXZCKRCVBXFWUPQIJVEOKYOTT...
output:
124680706517325664
result:
ok 1 number(s): "124680706517325664"
Test #82:
score: 0
Accepted
time: 1536ms
memory: 12776kb
input:
892824514164379 1000000000000000 AABAABAAAABBBBBBBABBBBABBABBBBAAAABBBBBBBABBAABAABABBAABBAABBBAAABBABBBBBABBBBAAAABBAABABAABBAAABBAABBBBBAABABBBAABBABAAAABBABABBAABAAABBBBBBABBBAAABBABAAABABAABAAAABAAABAAAABAABBAABBAABABABAABBBAAABAAABBAABAABABABBABBAABBABAAAABBBBBAABABABBBABBAAABAABBBBBBAAABAAABBA...
output:
258244289978766323
result:
ok 1 number(s): "258244289978766323"
Test #83:
score: 0
Accepted
time: 3390ms
memory: 12284kb
input:
123867286261370 1000000000000000 BBBBBAAABAAAAAABBAAABBBABBAAAABBAABABBAABAAABABAAAABBBBAABBAABAABBBABBBABBABBBBABAAAABABBBBBBBAAAAABABBAABBBAAAABBBBABBBAAAAAABBABABBAABABBBABBABBAAAABBBBBABBBABABBBBABBBAABBBBBAABABBAABBBBAABBAABBBBBBBAAAAAABAAABABBBAAABAAAABAAABBABABBABABBAAAABBAABBBBABAAAAABABBBAB...
output:
61933643130685000
result:
ok 1 number(s): "61933643130685000"
Test #84:
score: 0
Accepted
time: 41ms
memory: 10816kb
input:
1000000000000000 764115182868089 QANDCKJJPUCSFLIFXEJSQWZOPUFHGTAUOCANEWSEMJHZNRGVFRNEKRXOAEYYFJDNIUYJAMSPZXLCUGWRNWLNFWSUDZIKDHXFAAQWTTMNYAKOXREOJVPUIPMMPBNXXGHZTLOHJOOWXIDWVIZAJENEIXQJDURUQPMBWQKWMHNEOJSNUUTVWXNGMGVHUFWBRCRSHCQEQYXLQQNJVSFFUQKMWSXISUEGGWBKXBFOZPDNCHKRDEPIJGZLIMWWGVZVNUIQWIIEBIVMHCE...
output:
19866994754570314
result:
ok 1 number(s): "19866994754570314"
Test #85:
score: 0
Accepted
time: 1937ms
memory: 12140kb
input:
1000000000000000 476183538985259 RICITCBYQQIQBOKLQTTYNAJBQPFNFIYZPVZCSZHKMKLQDFXQIEYJNHBAIZVBGZQVBGILCGDVRMBXCVZOPBBKEDCOEQXTKWZHMIDXQSBUGAJUWNCYAVKWNCSLZRJWSZFHUHKVZOCMRHNKTDCQIVQKUUKXLISWKZRJCYVGNNCMDFBSKKGIPQAYTWFYRKZYTAMSGUQYJEXDBKRRYPXTSSQUBFFKVLSJDTYMOILIZNDKJKIPWWBDOGZFVDKOTHRZBIDLXTTLEPKSOXP...
output:
110618062535906778
result:
ok 1 number(s): "110618062535906778"
Test #86:
score: 0
Accepted
time: 1642ms
memory: 12664kb
input:
1000000000000000 150672935307308 ABABABABAAAAAABAAABABBAABBBAABAABAAABBBABAAABBAAABBAAAAAABABAAABBABBBAABAAAABABBBBBBABABBBBBBBBBBBABAAAABABBBBABABAABABBABBABBABAABABBBAAABBBBBBABABBAAABBBBBAABBBAAAABABABBBAAABABABBBBABBBAAABBABABAABBBBABAABABABBABABBBBBAABABAAAABABBBAAABBBABBAAAABBAAABBABBBABBAABAA...
output:
66898783276444752
result:
ok 1 number(s): "66898783276444752"
Test #87:
score: 0
Accepted
time: 3245ms
memory: 13272kb
input:
1000000000000000 359773194278922 ABAAABABBBABBAAAABAABAABBBBBBBBBBABBBBAABABBBAAABBBAABABABBBBBBABABAABBBBAAAABABBBBABAABBBAABBBAABBABAABBABAAAAAABBBAAABBBBBABBAABABAABABAAAAAAABBABBBBAAABBBBBAAABAAAABAABABBBABABAAABBBBBABABBAAAAAABAAABABABBBBBBABBBAAAABBABAABBABABABAAAABABAAABBBAABBBBBABABBBABABABA...
output:
179886597139461000
result:
ok 1 number(s): "179886597139461000"
Test #88:
score: 0
Accepted
time: 82ms
memory: 13012kb
input:
21963604011018 838748770205041 WWWVJOFXOGVWUNXTUVKTWNIHFTMXYKNIQHHVOZPTVNTAUHDJLGR HSNLKRWYYQIIEVVSVNEBVDTKEBBRVYYRXRJLYBDSPTGAUMVHDHCLJFPSPMFODLPFFDWQVCRWAFRICENLHKDZFPDYRDALIZXTBIEDKINNMFGDMDMMYKAQNLSQBHGOUHGDZJQBRHISEBFSJZXWKNDYNZUAAZPQRBZWRGWJONXBIQGLAAUEINIYXBSQYQFHZIYZMYCHIQVFUGXKJWCNRCPVYRZHS...
output:
1120143804561918
result:
ok 1 number(s): "1120143804561918"
Test #89:
score: 0
Accepted
time: 1968ms
memory: 12072kb
input:
340048297259706 538214145452218 YCSEKQKZJVRQXZEEEDNPUFKLANZVZKUAZPRGVEQIIJEPOEMQMSLZADQIDDVGCOTXCNEVJGKTETGAJQMFJSRALZYLBRQKPYJUVNWRFKGOZNAXYPSXWTGTGEGHFNAQNOMXDBVLTISEIXYUDKSLHNMDFSBECVLHKXYVVKXDGSAJKYXSAGNLJJCLLZJHCDPWKYVKDFFUQWFIETMXXHRAJOVGLYAPMHHIITGMSMIXZXCZNRCNONESGNRBJJHUIBXXKFEBDBFPKKNCMQPF...
output:
67657871642142499
result:
ok 1 number(s): "67657871642142499"
Test #90:
score: 0
Accepted
time: 524ms
memory: 12136kb
input:
408521356450237 663462232249049 BABAAABAAABAABABABABBABAAAABBBBAAABBABBAAAAABBABABBBBBABABABABAABBABBABAABAABBBABBABBABABABBAAAAAABBABBBBAAAABBAAABAABBABBBBABBBABABBBAAABABBBBBBABAAAABBABABAAABBBAAABABAABAABAABABBBBBAAAAABAABBAABBABABBBBABABBBAB BABABBBABBBAABABBBBBABBABABAAABAAABBAAABBAAAAAAABBAABB...
output:
84757402247911765
result:
ok 1 number(s): "84757402247911765"
Test #91:
score: 0
Accepted
time: 3573ms
memory: 13360kb
input:
223642247520665 476536814565577 BAAABAABABAAAABABBAAAAAABBBABAAAAAABABBABABAABAAAAABBABBAABABABBBBBBAAABBABBAAABBBBABBAABABABBAABAABAAAABBABABBBAAAAAABBBBBBABBBBABBBABABBBBBAAABBAAABAAAAAAABABAAAABAAABABBABABBAAAABABBABAAAAABBABBAAABBABBABBAABBAABAAAABBAAABBBABBAABBAABBBBAABABBABBBAABBABBBAAABAAAAAB...
output:
111821123760332500
result:
ok 1 number(s): "111821123760332500"
Test #92:
score: 0
Accepted
time: 873ms
memory: 11164kb
input:
1000000000000000 1000000000000000 HOPCEQOGKTXZBVKFFTYKFXEPQNEREERCYXKPFALTKSQCKCWLGQBBIHZHPUCPVKLOSSLXKINBYJGGFHSLOJPNFKSNBMPZNVCCFKKYXEVWTYGYHYGSAJYHQDWVZUCGDILMSJNFSZOIDZIQFINPIGQSBXLOLFFLEWJMMJQTQKLQIRNXFHNLKSPECHYACONYPNZKRIBGCSCUVMRIPPUJTRJSZPEAMECYYSNDPUOVXMNVPOORMNHDFXBFYFMLDAWWRKCPEUXKJOBQOS...
output:
107999999999999995
result:
ok 1 number(s): "107999999999999995"
Test #93:
score: 0
Accepted
time: 1978ms
memory: 12068kb
input:
1000000000000000 1000000000000000 EGJTTURESKCLJAITKOVNRLOEDHDHVMVHYUBEZFQMLZTGGEFZDQQBYCJRXDWRNHIKOHILWPFJRUFAEPJETTLITCFVVLTHFOXYERIFLCBPICIDQFEIXGJYHRAMTWLWYEFFWSGNXHTIHFWEENBLDDAAYQBKAQPXMVMNELVVVOJRIXAMWFKZVCKHRVMCSADEGFMTHENAQLBIJRKGPVYFZWRJCGRGUNFRHFMXSYXPXSOHWJVQSQJGDZTDOUNAJGXHYETLTALMOPGRIC...
output:
168999999999999977
result:
ok 1 number(s): "168999999999999977"
Test #94:
score: 0
Accepted
time: 2394ms
memory: 12112kb
input:
1000000000000000 1000000000000000 BBBABBAABAAAABBBAABAAAABBAABABBBAAAAAAAAAABBBBBAABBBBAABBABABBAAAABABAAABAAABBBBAAAABBABAABAAABAAABBABABAAABBBBABBBAABABBBAABABBBAABBBAAAABBBBBAAAAABBABABAAAABBBABABBBBBABAABBABBBAABBBBABAAABAAAABBAAAABBAAABBBBABABAABABAABABBBBAAABABABAAAABBABBBAAABAAAABABAABBBBABBB...
output:
327999999999999985
result:
ok 1 number(s): "327999999999999985"
Test #95:
score: 0
Accepted
time: 3278ms
memory: 12280kb
input:
1000000000000000 1000000000000000 BBAAABABBBBAAABAABABAABBBBAAABBBBBBABAABBBAAAABABBABBBBBABABABAABAAABBABAABABBABBBBAABABBBAAABBBABAAABBAABBBAAABBAABAAABAAAAABBAAABBBAABABABAAAABAAABBBAAAABAABBBBABABBBBAABAAAAAABAAABAABBBBBAAAAABBBABBBBAABBAABBABAAAAAABAAAABBABBABABBBBAAABAABAAABAABBABBABAAAAAAABBA...
output:
412999999999999947
result:
ok 1 number(s): "412999999999999947"
Test #96:
score: 0
Accepted
time: 99ms
memory: 11312kb
input:
1000000000000000 500000000000000 ZCEBSQUYCAEUUFIBYVGDYGLWBPIXKDOHEMMAHZT AVQFKPHDPALXLEJDRGBYJMHBDBHZFNINCUHSLNOAYNLHAKUNYGRLNVSZQAQTVZNNAJVRXFFSZCTORPZDEZHMHDUCUBLQBOLMGHDKNLOUOZPSPTFKFBHFUPKDOKGNXYURZNSFJSSSHZDSPMHDDABSDVTWXMUOHPIZPUFQEAPSYZQFLCLTBAVRFWDELMVTOAFWTHWXFUZHYRIFLOGVZZCMCWDVFTPYRCMFWXR...
output:
26999999999999998
result:
ok 1 number(s): "26999999999999998"
Test #97:
score: 0
Accepted
time: 743ms
memory: 12328kb
input:
1000000000000000 999999999999264 WHFMTXRNOCDNTEWPXDTKLJKMIXBWVBNNLBTUIZJSVGKFCOGKAXKKHZJWIBKUOMLBQCESQPUINPLYRWJSFMMTRPRIQVKZONNTQFTHVWGMJIFJFAVKVSMQQDOBNPARJSNARUFJNYRMZGGOMOGNRYKZLAWUCIJZNRVUAZJMCJJXQGSZFLEJMYRSMJMXJPYXYZDIEBSAELECTEJKUDNZGAXFHEEFCIQPNIBPHNZLBJZAGBKLDADLHDDDYNBKIHBSXGVVEKFKKMAQNOR...
output:
101999999999952893
result:
ok 1 number(s): "101999999999952893"
Test #98:
score: 0
Accepted
time: 1958ms
memory: 12448kb
input:
1000000000000000 999999999999264 ILBEINJQFQFTPJPGCXHXJWJELSLGOXRKQTXRKIXPOWTEPRABUFAZSISXWTGGGMSPHKIAUBYGXAJIWUOWFICPKEAAHQQCUVRXFKTUUXIWEURVFNDWVKYOCANVTWFCMZCOZCIAWTJMEEZIYTBJMGTAHJWRJTCFDWPCNGHDJECMTWYTCUPCTGZFTBORCDPBNGXSOQSADGUBLKPOPKQIDMIZPPDVAZFWVJBOFOLCRKBYZGGVLGEAUNPNQYPYIQMFDLVFZWESPGORMXN...
output:
160999999999935225
result:
ok 1 number(s): "160999999999935225"
Test #99:
score: 0
Accepted
time: 699ms
memory: 12264kb
input:
1000000000000000 1000000000000000 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
output:
0
result:
ok 1 number(s): "0"
Test #100:
score: 0
Accepted
time: 1360ms
memory: 13184kb
input:
1000000000000000 1000000000000000 ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ...
output:
500000000000000000
result:
ok 1 number(s): "500000000000000000"