QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#424993#944. Cubewordjames1BadCreeper84 401ms12184kbC++171.4kb2024-05-29 20:36:482024-05-29 20:36:48

Judging History

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

  • [2024-05-29 20:36:48]
  • 评测
  • 测评结果:84
  • 用时:401ms
  • 内存:12184kb
  • [2024-05-29 20:36:48]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std; 
typedef long long i64; 
const int P = 998244353; 
const int N = 2e5 + 5; 

inline int trans(char c) {
    if (c >= 'a' && c <= 'z') return c - 'a'; 
    if (c >= 'A' && c <= 'Z') return c - 'A' + 26; 
    return c + 52; 
}

int n, cnt[15]; 
i64 g[15][62][62], f[62][62][62]; 
string s[N]; 

int main(void) {
    ios::sync_with_stdio(0); cin.tie(0); 
    cin >> n; 
    for (int i = 1; i <= n; ++i) 
        cin >> s[i], s[i + n] = s[i], reverse(s[i].begin(), s[i].end()); 
    n *= 2; 
    sort(s + 1, s + n + 1); 
    n = unique(s + 1, s + n + 1) - s - 1; 
    for (int i = 1; i <= n; ++i) {
        ++cnt[s[i].size()]; 
        ++g[s[i].size()][trans(s[i][0])][trans(s[i].back())]; 
    }
    i64 ans = 0; 
    for (int len = 3; len <= 10; ++len) if (cnt[len]) {
        memset(f, 0, sizeof f); 
        for (int i = 0; i < 62; ++i) for (int x = 0; x < 62; ++x) if (g[len][i][x]) for (int y = 0; y < 62; ++y) if (g[len][i][y]) for (int z = 0; z < 62; ++z)
            f[x][y][z] = (f[x][y][z] + g[len][i][x] * g[len][i][y] % P * g[len][i][z]) % P; 
        for (int i = 0; i < 62; ++i) for (int x = 0; x < 62; ++x) for (int y = 0; y < 62; ++y) if (f[i][x][y]) for (int z = 0; z < 62; ++z)
            ans = (ans + f[x][y][z] * f[i][x][y] % P * f[i][y][z] % P * f[i][x][z]) % P; 
    }
    cout << ans << "\n"; 

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 21
Accepted

Test #1:

score: 21
Accepted
time: 61ms
memory: 11740kb

input:

100000
aaa
aaaa
aaaaa
aaaaaacb
aaaaabfdab
aaaaacaeba
aaaaacbec
aaaaacc
aaaaacdde
aaaaad
aaaaaef
aaaaafe
aaaab
aaaaba
aaaabac
aaaabcab
aaaabdcab
aaaabddec
aaaabeabd
aaaabeeacc
aaaac
aaaacaafee
aaaacabec
aaaacad
aaaacb
aaaacbcbba
aaaacbddbe
aaaacc
aaaacdda
aaaacdf
aaaacecdca
aaaacfceed
aaaacfdef
aaaad...

output:

966519702

result:

ok 1 number(s): "966519702"

Test #2:

score: 0
Accepted
time: 62ms
memory: 11820kb

input:

99999
aaa
aaaa
aaaaa
aaaaaad
aaaaabcee
aaaaabecdc
aaaaabecf
aaaaacdfcc
aaaaad
aaaaadab
aaaaaecaab
aaaaaee
aaaaafafd
aaaaafccf
aaaab
aaaaba
aaaabad
aaaabada
aaaabc
aaaabcaecb
aaaabd
aaaabdfb
aaaabede
aaaabefedb
aaaabfeaa
aaaabffddb
aaaac
aaaacbbcc
aaaacbec
aaaaccb
aaaaccbfee
aaaaccde
aaaacceb
aaaacd
...

output:

884966963

result:

ok 1 number(s): "884966963"

Test #3:

score: 0
Accepted
time: 64ms
memory: 11828kb

input:

99998
aaa
aaaa
aaaaa
aaaaaaa
aaaaaae
aaaaac
aaaaaccb
aaaaadb
aaaaadcbd
aaaaafedd
aaaaaff
aaaab
aaaabadd
aaaabbeb
aaaabc
aaaabceca
aaaabcf
aaaabd
aaaabdce
aaaabe
aaaabf
aaaabfab
aaaabfad
aaaabfeffb
aaaac
aaaacaecbb
aaaacb
aaaacbdb
aaaacda
aaaacdd
aaaacdddaf
aaaace
aaaacecde
aaaacfeff
aaaacffe
aaaad
a...

output:

519865738

result:

ok 1 number(s): "519865738"

Test #4:

score: 0
Accepted
time: 64ms
memory: 11836kb

input:

99997
aaa
aaaa
aaaaa
aaaaaa
aaaaaac
aaaaaaed
aaaaab
aaaaac
aaaaad
aaaaadbdf
aaaaaf
aaaaafc
aaaaafe
aaaaaffebf
aaaab
aaaaba
aaaababaa
aaaababdca
aaaabacbcb
aaaabae
aaaabaeec
aaaabc
aaaabdb
aaaabddeab
aaaabfe
aaaac
aaaacbafdf
aaaacbfbcb
aaaaccfe
aaaacd
aaaacdfb
aaaacecfaa
aaaaceeea
aaaacfbaf
aaaacffb
...

output:

440905828

result:

ok 1 number(s): "440905828"

Test #5:

score: 0
Accepted
time: 62ms
memory: 11748kb

input:

99996
aaa
aaaa
aaaaa
aaaaaaea
aaaaab
aaaaabaf
aaaaabcb
aaaaac
aaaaacbcce
aaaaadb
aaaaadf
aaaaaeaf
aaaaaeb
aaaaaef
aaaaaefd
aaaaafeee
aaaab
aaaabaacca
aaaabb
aaaabbdd
aaaabc
aaaabcc
aaaabcdb
aaaabcdbbb
aaaabcdf
aaaabce
aaaabde
aaaabdefb
aaaac
aaaacaee
aaaacafa
aaaacb
aaaacbb
aaaaccebfc
aaaacd
aaaacdf...

output:

606830795

result:

ok 1 number(s): "606830795"

Test #6:

score: 0
Accepted
time: 65ms
memory: 11756kb

input:

99995
aaa
aaaa
aaaaa
aaaaaaa
aaaaaaabcf
aaaaaaaccf
aaaaaaafb
aaaaaad
aaaaaaf
aaaaab
aaaaabecfc
aaaaac
aaaaacbc
aaaaacc
aaaaaceee
aaaaacffc
aaaaad
aaaaadfccf
aaaaaec
aaaaaee
aaaaaefaec
aaaab
aaaabaffab
aaaabbaadc
aaaabbd
aaaabbed
aaaabdcebd
aaaabeacf
aaaabedfc
aaaabfcd
aaaabfe
aaaac
aaaaca
aaaacaf
aa...

output:

293744889

result:

ok 1 number(s): "293744889"

Test #7:

score: 0
Accepted
time: 56ms
memory: 11964kb

input:

99994
aaa
aaaa
aaaaa
aaaaaa
aaaaaaab
aaaaaabdd
aaaaacbfb
aaaaacfeef
aaaaadab
aaaaae
aaaaaeaf
aaaaaf
aaaaafac
aaaab
aaaababdb
aaaabb
aaaabbadf
aaaabbec
aaaabccc
aaaabde
aaaabdffbf
aaaabefdfa
aaaabff
aaaabffdf
aaaac
aaaacaf
aaaacafed
aaaacbeccd
aaaaccbbb
aaaacd
aaaacdba
aaaacddafb
aaaacdf
aaaacdfdc
aa...

output:

745454877

result:

ok 1 number(s): "745454877"

Test #8:

score: 0
Accepted
time: 61ms
memory: 11840kb

input:

99993
aaa
aaaa
aaaaaa
aaaaaaa
aaaaaabdf
aaaaabbee
aaaaac
aaaaaccfaf
aaaaadbece
aaaaafa
aaaaafacb
aaaab
aaaabadda
aaaabb
aaaabbacd
aaaabbea
aaaabcddb
aaaabdbff
aaaabfb
aaaabfee
aaaac
aaaaca
aaaacbbc
aaaacbecb
aaaacc
aaaaccbbec
aaaaccc
aaaacdcb
aaaacddd
aaaacdfcba
aaaaceae
aaaacecdfe
aaaacfc
aaaad
aaa...

output:

429068770

result:

ok 1 number(s): "429068770"

Test #9:

score: 0
Accepted
time: 62ms
memory: 11888kb

input:

99992
aaa
aaaa
aaaaa
aaaaaaccb
aaaaaacdef
aaaaaadfd
aaaaaafd
aaaaab
aaaaabd
aaaaabeee
aaaaacda
aaaaacf
aaaaad
aaaaadbca
aaaaaeed
aaaaafccfb
aaaab
aaaababb
aaaabaddb
aaaabafadc
aaaabbb
aaaabbd
aaaabcd
aaaabce
aaaabf
aaaabfa
aaaabfbf
aaaabfcac
aaaabfd
aaaabfde
aaaabff
aaaabffdc
aaaac
aaaaca
aaaacae
aa...

output:

289771162

result:

ok 1 number(s): "289771162"

Test #10:

score: 0
Accepted
time: 65ms
memory: 11840kb

input:

99991
aaa
aaaa
aaaaa
aaaaaaad
aaaaac
aaaaacecbf
aaaaacfa
aaaaadcdc
aaaaae
aaaab
aaaabafafe
aaaabee
aaaabeeb
aaaabf
aaaabfdcc
aaaacaeffe
aaaacc
aaaaccab
aaaacded
aaaace
aaaacea
aaaaceaad
aaaaceaecc
aaaacfeb
aaaacff
aaaad
aaaada
aaaadaf
aaaadba
aaaadbfe
aaaadc
aaaadcf
aaaadd
aaaaddae
aaaaddcf
aaaade
a...

output:

875542265

result:

ok 1 number(s): "875542265"

Test #11:

score: 0
Accepted
time: 56ms
memory: 11876kb

input:

99990
aaa
aaaa
aaaaa
aaaaaba
aaaaabdcd
aaaaac
aaaaacbfcf
aaaaada
aaaaaed
aaaaaeeec
aaaaafdc
aaaaaffadc
aaaab
aaaabaddd
aaaabceeeb
aaaabda
aaaabf
aaaabfaffe
aaaabfedcd
aaaac
aaaaca
aaaacab
aaaacabdfc
aaaacaf
aaaacbaea
aaaacbb
aaaacccbf
aaaaccecaf
aaaacdf
aaaacede
aaaaceebea
aaaaceeddd
aaaacfba
aaaad
...

output:

236060052

result:

ok 1 number(s): "236060052"

Test #12:

score: 0
Accepted
time: 64ms
memory: 12184kb

input:

99989
aaa
aaaa
aaaaa
aaaaaadfdd
aaaaabee
aaaaac
aaaaacbb
aaaaaed
aaaaaedbe
aaaaafae
aaaab
aaaababfa
aaaabacb
aaaabbcefd
aaaabc
aaaabccebb
aaaabeaea
aaaabeb
aaaabeca
aaaabed
aaaabedb
aaaabfaba
aaaabfbdb
aaaabfd
aaaabfdf
aaaabffeb
aaaac
aaaaca
aaaacad
aaaaccacbc
aaaaccafaa
aaaaccb
aaaacdccc
aaaacdff
a...

output:

382736648

result:

ok 1 number(s): "382736648"

Test #13:

score: 0
Accepted
time: 63ms
memory: 12092kb

input:

99988
aaa
aaaa
aaaaa
aaaaaacc
aaaaaaeef
aaaaab
aaaaabfbdc
aaaaabfdb
aaaaaccdca
aaaaacfbc
aaaaadf
aaaaaede
aaaaaf
aaaaafdbcd
aaaaafea
aaaab
aaaabbae
aaaabbbda
aaaabbd
aaaabbec
aaaabc
aaaabcacc
aaaabcaeca
aaaabce
aaaabdbae
aaaabdbb
aaaabee
aaaabfead
aaaabfeefb
aaaac
aaaacb
aaaacbbe
aaaacccfaa
aaaaccd
...

output:

778837075

result:

ok 1 number(s): "778837075"

Test #14:

score: 0
Accepted
time: 66ms
memory: 12116kb

input:

99987
aaa
aaaa
aaaaa
aaaaaabe
aaaaaacbbc
aaaaaacecf
aaaaaadc
aaaaaaeffd
aaaaab
aaaaabf
aaaaacab
aaaaaccbaf
aaaaacd
aaaaacdeca
aaaaacec
aaaaaceda
aaaaacf
aaaaadc
aaaaadefe
aaaaae
aaaaaeaab
aaaaafabe
aaaaafaf
aaaaafddad
aaaaaffccd
aaaab
aaaabafb
aaaabdbca
aaaabdebe
aaaabecca
aaaabfba
aaaabfbb
aaaabfbd...

output:

265167705

result:

ok 1 number(s): "265167705"

Test #15:

score: 0
Accepted
time: 64ms
memory: 12136kb

input:

99986
aaa
aaaa
aaaaa
aaaaaa
aaaaaaafc
aaaaaabcfa
aaaaaabdbb
aaaaaabfd
aaaaaadd
aaaaaadf
aaaaab
aaaaabbba
aaaaabcc
aaaaacebdd
aaaaad
aaaaaddbcb
aaaaaf
aaaaafa
aaaaafaaba
aaaaafea
aaaab
aaaababdc
aaaababfc
aaaabaccbe
aaaabb
aaaabbcb
aaaabbfecf
aaaabdad
aaaabe
aaaabecea
aaaabeddc
aaaabfdbec
aaaac
aaaac...

output:

376583661

result:

ok 1 number(s): "376583661"

Test #16:

score: 0
Accepted
time: 65ms
memory: 11764kb

input:

99985
aaa
aaaa
aaaaa
aaaaaa
aaaaaadaed
aaaaaae
aaaaabbdb
aaaaac
aaaaadadba
aaaaaeb
aaaaaefdd
aaaaafd
aaaaafe
aaaaaffde
aaaab
aaaababbda
aaaabace
aaaabaf
aaaabbfcf
aaaabcefad
aaaabdacfb
aaaabdef
aaaabe
aaaabeab
aaaabfd
aaaabfdbf
aaaac
aaaacbbef
aaaacc
aaaacd
aaaacdae
aaaacdfea
aaaace
aaaacec
aaaacfbf...

output:

546456611

result:

ok 1 number(s): "546456611"

Test #17:

score: 0
Accepted
time: 57ms
memory: 11768kb

input:

99984
aaa
aaaa
aaaaaaca
aaaaaaecf
aaaaabdde
aaaaabfc
aaaaacaefc
aaaaacbfed
aaaaacf
aaaaadcec
aaaaadeabf
aaaaafdee
aaaab
aaaabafecf
aaaabbe
aaaabdbde
aaaabebac
aaaabfe
aaaabffa
aaaac
aaaacbbdb
aaaacbe
aaaaccead
aaaacdaace
aaaacdaf
aaaacee
aaaacfa
aaaacfeae
aaaad
aaaada
aaaadaddbb
aaaadb
aaaadba
aaaad...

output:

82579691

result:

ok 1 number(s): "82579691"

Test #18:

score: 0
Accepted
time: 60ms
memory: 11932kb

input:

99983
aaa
aaaa
aaaaa
aaaaaab
aaaaac
aaaaaca
aaaaacbdd
aaaaad
aaaaadf
aaaaae
aaaaaeedbb
aaaaaf
aaaaafd
aaaaafda
aaaaba
aaaabaccb
aaaabada
aaaabafba
aaaabb
aaaabbb
aaaabcbf
aaaabcc
aaaabccea
aaaabceec
aaaabd
aaaabdaeaf
aaaabe
aaaabead
aaaabeafc
aaaabefc
aaaabefda
aaaabfdce
aaaaca
aaaacabfd
aaaacbaaf
a...

output:

843794331

result:

ok 1 number(s): "843794331"

Test #19:

score: 0
Accepted
time: 65ms
memory: 11888kb

input:

99982
aaa
aaaa
aaaaa
aaaaaa
aaaaabfcd
aaaaac
aaaaacc
aaaaacccde
aaaaae
aaaaaea
aaaaaeaa
aaaaaebce
aaaaaec
aaaaaf
aaaab
aaaabaa
aaaabac
aaaabae
aaaabbc
aaaabbdf
aaaabbf
aaaabc
aaaabddaf
aaaabdef
aaaabfdcc
aaaabfea
aaaabff
aaaac
aaaacab
aaaacb
aaaacbfe
aaaacc
aaaacca
aaaaccabe
aaaacd
aaaacdaefe
aaaacd...

output:

73145981

result:

ok 1 number(s): "73145981"

Test #20:

score: 0
Accepted
time: 64ms
memory: 11796kb

input:

99981
aaa
aaaa
aaaaa
aaaaaa
aaaaaaac
aaaaaba
aaaaacd
aaaaadf
aaaaaef
aaaaafae
aaaaaffd
aaaab
aaaabbaca
aaaabbedb
aaaabc
aaaabcc
aaaabccd
aaaabddd
aaaabebbca
aaaabebbe
aaaabebbea
aaaabec
aaaabece
aaaabedade
aaaabeee
aaaabfcba
aaaac
aaaacaacbc
aaaacbbeda
aaaacbe
aaaacbfbd
aaaacdd
aaaaceeaa
aaaacf
aaaa...

output:

328200997

result:

ok 1 number(s): "328200997"

Test #21:

score: 0
Accepted
time: 60ms
memory: 11764kb

input:

99980
aaa
aaaa
aaaaa
aaaaaa
aaaaaaa
aaaaab
aaaaabb
aaaaac
aaaaacfcab
aaaaaddd
aaaaadfa
aaaaaedfcc
aaaaaf
aaaab
aaaabaa
aaaabab
aaaabb
aaaabbd
aaaabbfcb
aaaabc
aaaabcaccd
aaaabd
aaaabdacd
aaaabde
aaaabeec
aaaac
aaaacabeff
aaaacadb
aaaacba
aaaacbc
aaaacbcbc
aaaacbd
aaaaceceef
aaaacf
aaaacfb
aaaacfcdec...

output:

975997785

result:

ok 1 number(s): "975997785"

Subtask #2:

score: 29
Accepted

Dependency #1:

100%
Accepted

Test #22:

score: 29
Accepted
time: 69ms
memory: 11940kb

input:

100000
aaa
aaaa
aaaadfnl
aaab
aaabf
aaabgbohpg
aaac
aaadhgjebb
aaadjfc
aaaeigcc
aaaekhec
aaafgb
aaaggn
aaagifb
aaahmjhb
aaaj
aaajokcjd
aaakaiojjl
aaakb
aaalgb
aaalpkf
aaam
aaamehmil
aaane
aaanmo
aaaobb
aaaogddkfh
aaap
aaapifl
aab
aaba
aabakfm
aabcb
aabcbhb
aabembjed
aabf
aabfmoppgf
aabh
aabhkj
aabhl...

output:

79035388

result:

ok 1 number(s): "79035388"

Test #23:

score: 0
Accepted
time: 69ms
memory: 11864kb

input:

99999
aaa
aaabdh
aaablohf
aaacfk
aaacghba
aaaeb
aaaegajda
aaaekcadaa
aaaenk
aaah
aaahakeg
aaajdnj
aaalijda
aaaog
aaapbjco
aaappo
aab
aabdhnenj
aabdmh
aabe
aabegib
aabegn
aabepf
aabfbmdgj
aabg
aabgcan
aabi
aabiblkg
aabip
aabjjf
aablmkocob
aablokne
aabmmpop
aabmpfloil
aabplllfb
aac
aacafn
aacaneggj
aa...

output:

329231054

result:

ok 1 number(s): "329231054"

Test #24:

score: 0
Accepted
time: 73ms
memory: 11812kb

input:

99998
aaa
aaaaen
aaaam
aaab
aaacekneo
aaad
aaadpceei
aaaeak
aaaebgo
aaaeipj
aaaejh
aaaenbnkjl
aaafjjkl
aaagjofbdd
aaahbjfabn
aaahojaf
aaajglh
aaakfhp
aaako
aaalifgce
aaangcjh
aab
aabaja
aabb
aabbn
aabbp
aabfpb
aabg
aabghjcmhl
aabhdgc
aabhgfcjka
aabiogng
aabj
aabjdm
aabjikjp
aabk
aabldjhaib
aabm
aabm...

output:

680075672

result:

ok 1 number(s): "680075672"

Test #25:

score: 0
Accepted
time: 73ms
memory: 11872kb

input:

99997
aaa
aaaaabioi
aaaaeba
aaaaggh
aaabidpgja
aaabldadp
aaaddojl
aaadfknb
aaaeejeidd
aaaelkfma
aaaf
aaafccc
aaagaaj
aaagmhefa
aaahg
aaaiddlkpk
aaaiepe
aaaiifphhc
aaaj
aaajjcea
aaakfop
aaakmkmfpg
aaaldda
aaalfnnald
aaalg
aaamamdi
aaamgainnd
aaan
aaanlfjk
aaanmh
aaaongkppj
aaap
aaaphagn
aab
aabacfi
a...

output:

179927059

result:

ok 1 number(s): "179927059"

Test #26:

score: 0
Accepted
time: 69ms
memory: 11816kb

input:

99996
aaa
aaaaeipam
aaaajo
aaabb
aaaebpicpi
aaaeica
aaafocddm
aaahedddoj
aaaidbjmll
aaaiofick
aaajhcod
aaajopidmc
aaakhifjp
aaalalpmh
aaaldnk
aaalfpj
aaamacj
aaamcepgc
aaaniogaab
aab
aababik
aabcbamppg
aabcidom
aabclpa
aabd
aabeogdajh
aabfgc
aabgaoighc
aabgdg
aabgmnhod
aabi
aabk
aabkce
aabkfebdjn
aa...

output:

654954751

result:

ok 1 number(s): "654954751"

Test #27:

score: 0
Accepted
time: 65ms
memory: 11872kb

input:

99995
aaa
aaaaafhhh
aaaai
aaaapg
aaabdhgpl
aaabfibgb
aaach
aaacll
aaadaioba
aaadhkbkd
aaaedh
aaaeo
aaagcfji
aaagfgnoi
aaagnnil
aaahdo
aaahjbjj
aaahlepko
aaahpin
aaahpmkakc
aaajgkik
aaakagii
aaakjof
aaaoa
aaaoihm
aaaond
aaaoph
aaapeno
aab
aaba
aabahmk
aabbpf
aabcbekcl
aabcgl
aabchhgfk
aabfelo
aabfmfd...

output:

902435619

result:

ok 1 number(s): "902435619"

Test #28:

score: 0
Accepted
time: 72ms
memory: 11884kb

input:

99994
aaa
aaaaajgl
aaabclkj
aaabcnndo
aaablhdge
aaabp
aaachca
aaadpkgi
aaaeffeejg
aaaeo
aaafpd
aaagina
aaagjag
aaagnion
aaah
aaahillnnj
aaahnjfelj
aaaiblodcp
aaaj
aaakjiok
aaamogpc
aaanakpgfj
aaanefpeai
aaaondac
aab
aabcgn
aabcncfc
aabdnlpi
aabe
aabecckem
aabeefjm
aabeilddh
aabfhk
aabfpfp
aabhccij
a...

output:

662320487

result:

ok 1 number(s): "662320487"

Test #29:

score: 0
Accepted
time: 64ms
memory: 11876kb

input:

99993
aaa
aaac
aaacn
aaaejehk
aaafgpighb
aaagnbd
aaahmipjpe
aaaiik
aaaijei
aaaikkamai
aaakfchmg
aaakjnak
aaan
aaaokmfoc
aaap
aaapfeggnj
aab
aaba
aabafap
aabalae
aabbdag
aabbleddmd
aabdemg
aabf
aabgkjgc
aabgnboh
aabhggn
aabifac
aabk
aabklkm
aablbl
aablc
aabloajce
aabm
aabmc
aabmipmad
aabnfmld
aabnpcf...

output:

21324870

result:

ok 1 number(s): "21324870"

Test #30:

score: 0
Accepted
time: 71ms
memory: 11868kb

input:

99992
aaa
aaaaee
aaaagcag
aaaah
aaac
aaaciij
aaad
aaadlhoacc
aaaehlhae
aaaek
aaafapo
aaafe
aaahmippb
aaahobkfo
aaaiajcll
aaaing
aaajbkop
aaajebll
aaaloobon
aaampmmdlm
aaao
aab
aabbmfid
aabc
aabebcdcc
aabedhdama
aabekcok
aabhcgih
aabhmieilf
aabic
aabildfgik
aabjlalbnl
aabk
aabkf
aablg
aablojngjb
aabm...

output:

298518050

result:

ok 1 number(s): "298518050"

Test #31:

score: 0
Accepted
time: 68ms
memory: 11996kb

input:

99991
aaa
aaaajfd
aaabo
aaacnnpapc
aaacpngcb
aaadfcfian
aaaekfipmb
aaaelpnok
aaaf
aaafgekfh
aaagkkge
aaagpkkjom
aaah
aaahlj
aaai
aaaj
aaajfjog
aaakglbb
aaalaifmp
aaalh
aaalple
aaamelmd
aaamkbj
aaanfnh
aaaofemfbd
aab
aaba
aabaaghf
aababd
aabaogfmk
aabbammpfh
aabbdhkcfn
aabboeee
aabcgbo
aabckdog
aabea...

output:

738149247

result:

ok 1 number(s): "738149247"

Test #32:

score: 0
Accepted
time: 74ms
memory: 11940kb

input:

99990
aaa
aaaa
aaaalanik
aaaamplbl
aaabpagbd
aaabpllhg
aaac
aaaca
aaache
aaacijipfo
aaaemcpo
aaaglp
aaaig
aaajipmhm
aaajmphncp
aaakfnhcne
aaakkgoa
aaaknjbhng
aaalbm
aaamelpjec
aaamkbfmke
aaamocok
aaan
aaaodocjef
aaaoech
aaapgape
aaaphofg
aaapoimfhh
aab
aabaglbj
aabaoglp
aabbab
aabbgnjnh
aabbngfn
aab...

output:

311868864

result:

ok 1 number(s): "311868864"

Test #33:

score: 0
Accepted
time: 68ms
memory: 11924kb

input:

99989
aaa
aaaadn
aaade
aaafcgpipg
aaafhmpkbc
aaafka
aaagc
aaaifne
aaaj
aaakakblda
aaalhakph
aaallop
aaalmef
aaamofij
aaanacaf
aaao
aaaofccog
aaaoniecjh
aaapdc
aaapgpigm
aab
aabbpibl
aabchb
aabcoe
aabda
aabdagiei
aabe
aabep
aabfnjgf
aabgkfhfpc
aabgoljee
aabgonmeeb
aabhdlbnej
aabhldkkcc
aabhofce
aabik...

output:

359590216

result:

ok 1 number(s): "359590216"

Test #34:

score: 0
Accepted
time: 73ms
memory: 11812kb

input:

99988
aaa
aaaaklbcne
aaadlp
aaadnmfc
aaagfkpikc
aaahgkpm
aaahocbc
aaai
aaaijpchl
aaaka
aaakco
aaakhm
aaal
aaam
aaamog
aaan
aaanhnfegi
aaapggbdab
aab
aaba
aabancjjf
aabbimggc
aabblieicg
aabblm
aabdcig
aabdpkacp
aabeeglba
aabfcllbhk
aabfpco
aabgfbf
aabh
aabhh
aabibik
aabjdagpdh
aabjhaogf
aabjlo
aabkmc...

output:

910605341

result:

ok 1 number(s): "910605341"

Test #35:

score: 0
Accepted
time: 74ms
memory: 11804kb

input:

99987
aaa
aaaanjahgo
aaabe
aaac
aaadck
aaadhcpgf
aaadponl
aaaedeemf
aaaegnaf
aaah
aaahbaf
aaaiacl
aaajafkjeb
aaajji
aaajmm
aaalpbilod
aaan
aaapdeb
aaapeinge
aaapmh
aab
aabaflgcg
aabaindmnp
aabapkkofj
aabbhn
aabcm
aabdhnjcn
aabdlila
aabedhmhin
aabeh
aabfl
aabhl
aabimgil
aabjnpjg
aabjpaeid
aabk
aabl
a...

output:

240424831

result:

ok 1 number(s): "240424831"

Test #36:

score: 0
Accepted
time: 68ms
memory: 11928kb

input:

99986
aaa
aaaaekmbcg
aaaafia
aaaapn
aaac
aaacdkbp
aaackfikfe
aaaeo
aaagamjadc
aaagepnkb
aaagiab
aaagoon
aaah
aaaia
aaaihcpkm
aaaiiaac
aaaiob
aaajlobbf
aaakjdlde
aaaknaa
aaal
aaall
aaallj
aaaloaapfa
aaam
aaamhka
aaanhcg
aaao
aaapl
aabal
aabalj
aabapl
aabcacmljm
aabcicfgec
aabcpcdfha
aabejc
aabffgf
aa...

output:

331433634

result:

ok 1 number(s): "331433634"

Test #37:

score: 0
Accepted
time: 68ms
memory: 11872kb

input:

99985
aaaae
aaaahdb
aaaamap
aaabeid
aaabm
aaaccji
aaadlfgcb
aaaeejm
aaafaken
aaafjf
aaafpaecb
aaahm
aaaiolkj
aaaj
aaajag
aaajangcbf
aaal
aaalc
aaamaknpno
aaan
aaanbpdo
aaanpf
aaaol
aaaopcgbij
aaapa
aaapfjcdgh
aaapli
aab
aaba
aabbhcd
aabbkfafb
aabcj
aaben
aabf
aabfffkl
aabhnjii
aabibegf
aabifho
aabjh...

output:

764432302

result:

ok 1 number(s): "764432302"

Test #38:

score: 0
Accepted
time: 65ms
memory: 11932kb

input:

99984
aaa
aaaa
aaaahcknpc
aaaak
aaaamaiam
aaaamfgcml
aaabekf
aaac
aaaceabd
aaacigoc
aaadnbhic
aaaef
aaafbe
aaag
aaahcfldom
aaajfmp
aaakoe
aaalnma
aaamp
aaanan
aaanhjbk
aaao
aaapgfn
aaapmapfgi
aab
aabaj
aabbahbldo
aabcief
aabdgjk
aabdpfeea
aabe
aabei
aabelcj
aabem
aabeomfjl
aabffeggci
aabfklim
aabjjl...

output:

81244694

result:

ok 1 number(s): "81244694"

Test #39:

score: 0
Accepted
time: 70ms
memory: 11868kb

input:

99983
aaa
aaaaocm
aaab
aaabl
aaacin
aaacl
aaaclin
aaadeecgm
aaademmomc
aaadlje
aaaed
aaafikfl
aaagbjblfg
aaaghi
aaaghnbjd
aaagjfie
aaagmfdnke
aaahdnc
aaahm
aaaihkfbbk
aaajl
aaajn
aaakeaaem
aaakedjap
aaakgac
aaanfn
aaanjpoph
aaanob
aaaokcae
aabab
aababcc
aabaeem
aabaf
aabamccbi
aabbcbp
aabbhl
aabbiog...

output:

720412661

result:

ok 1 number(s): "720412661"

Test #40:

score: 0
Accepted
time: 75ms
memory: 11804kb

input:

99982
aaa
aaaalamb
aaab
aaabekjfa
aaabfl
aaabgg
aaadbdl
aaadoc
aaadpgjf
aaaf
aaafdcpj
aaafhop
aaag
aaagi
aaahgljpd
aaai
aaaj
aaajbb
aaajeg
aaakjfha
aaalg
aaalpp
aaamemlb
aaamgl
aaanbild
aaaocko
aaaoipfb
aaapg
aaapmncb
aaapofbebm
aab
aaba
aabafn
aabahe
aabao
aabbhe
aabblmf
aabcill
aabd
aabdbig
aabdck...

output:

562341742

result:

ok 1 number(s): "562341742"

Test #41:

score: 0
Accepted
time: 70ms
memory: 11884kb

input:

99981
aaa
aaaa
aaaaidbfkf
aaaaigmcnk
aaaao
aaabchnkbf
aaaca
aaacehkoid
aaadnjb
aaaefg
aaaencim
aaaf
aaafdkm
aaah
aaahigogjh
aaahn
aaahngnclm
aaainlde
aaaknkmhij
aaamfkbpda
aaamkhoded
aaanjikh
aaaoekllji
aaapdaoine
aaapgoich
aab
aabblh
aabddclb
aabddgdc
aabepjg
aabgcoldf
aabghhmkl
aabgnbh
aabgpjfed
a...

output:

517952580

result:

ok 1 number(s): "517952580"

Test #42:

score: 0
Accepted
time: 67ms
memory: 11872kb

input:

99980
aaa
aaaakodoae
aaadfegko
aaadfekg
aaadlk
aaadoobmom
aaae
aaaebica
aaaggkb
aaah
aaahadfe
aaajlhnh
aaakooc
aaal
aaaldg
aaalec
aaalhohj
aaali
aaaljape
aaamdfloln
aaamfnho
aaamjmmbh
aaammmpcc
aaanhfb
aaanj
aaanjaj
aaaogcdgp
aaap
aaapbpi
aaapkhfjll
aaapkih
aab
aabad
aabbbj
aabbodoaik
aabbpikh
aabcb...

output:

17075492

result:

ok 1 number(s): "17075492"

Subtask #3:

score: 34
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #43:

score: 34
Accepted
time: 143ms
memory: 11912kb

input:

100000
AAAAOp
AAALkO
AAAaek
AAAo
AAB
AABIPDEDlE
AABJK
AABKck
AACBaBdfAf
AACPKonI
AADFgindcL
AADaFggPmB
AADamAhdl
AAE
AAEFlfkfcN
AAFBHjK
AAFClf
AAFOGeH
AAFbBJ
AAFhJc
AAFnFmB
AAGN
AAGgGioiG
AAH
AAHDHb
AAHeIjic
AAI
AAIHdLa
AAImDja
AAJBejD
AAJHjC
AAKOG
AAKc
AAL
AALHanIghO
AALJK
AALPnGOOCD
AALp
AAMF
AAN
...

output:

897194690

result:

ok 1 number(s): "897194690"

Test #44:

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

input:

99999
AAAAoppb
AAAPdLeAdB
AAAmaP
AABB
AABFDa
AABGGpfBfd
AAC
AACKG
AACd
AAD
AADDIiCbFP
AAEGKoChhD
AAEIgjHK
AAEP
AAGJnm
AAIGJJp
AAIH
AAIcneG
AAIelpPMEf
AAIiG
AAJAdFN
AAJCg
AAJOk
AAJcGF
AAJeiOJl
AAJhlKdlo
AAKfCha
AAKfenbHA
AAKgHEbO
AAKiGaIBBo
AAL
AALO
AALOkOl
AALedK
AALfhknnIp
AALoGhp
AAMJcJ
AAMO
AAMPF...

output:

273555599

result:

ok 1 number(s): "273555599"

Test #45:

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

input:

99998
AAA
AABAlnoAJ
AABBffCde
AABLFLiCj
AACEbm
AACFjd
AACM
AACNAdo
AACOnlDg
AAD
AADEgoCAo
AADd
AADecMOhL
AADhhpl
AADkMk
AAEBef
AAEEhfmbOP
AAEJKoLCE
AAEOfGkdK
AAFKlDl
AAFPANILk
AAFbOL
AAFe
AAFiNnmb
AAFpgaJ
AAGpE
AAHCMG
AAIFEkAK
AAIHGpPL
AAIhihJHn
AAIkd
AAJCGCO
AAJJK
AAJek
AAJhNgCkiH
AAK
AAKGFo
AAKaOl...

output:

886806378

result:

ok 1 number(s): "886806378"

Test #46:

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

input:

99997
AAAAnCec
AAACbLjFOo
AAAcmPM
AAAdJKDA
AAAhobji
AAAlmfmDAI
AAB
AABDFdc
AADoMhbaO
AAEhGolIP
AAEpgBlK
AAFIpeAmn
AAFJ
AAFjgHioJB
AAGFECgB
AAHmja
AAIFAJALIE
AAIHgBHk
AAINhEN
AAIbNFiHpi
AAJCEC
AAKKP
AALcMJ
AAM
AAMFfGgEk
AAMOPECb
AAMbK
AAMd
AANf
AANfl
AAOIGHcD
AAOgkcaBGC
AAOldd
AAPPphBb
AAa
AAaBO
AAao...

output:

570626020

result:

ok 1 number(s): "570626020"

Test #47:

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

input:

99996
AAA
AAADnFpMK
AAAMdHAPf
AAAolNP
AAB
AABK
AABKmfM
AABblPH
AABbpcJ
AAC
AACG
AACGjeBE
AACHbmN
AACc
AADMJ
AADMMGi
AADNgJ
AADPAGBImD
AADlHeD
AAEiECK
AAFGLfHeO
AAFHOlE
AAFJkhN
AAFiL
AAG
AAGANBN
AAGk
AAIeaAn
AAJDJDn
AAJei
AAJpGoeE
AAKIcd
AAKKC
AALH
AALOplo
AALPPNK
AALpbi
AAMPM
AAMfGLc
AANF
AANFBncCe
...

output:

218645051

result:

ok 1 number(s): "218645051"

Test #48:

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

input:

99995
AABEgodog
AABbaGcAMK
AABdbdcceD
AACJ
AACkgmi
AADgpiJje
AADkmcBk
AAEPAnbP
AAEcCL
AAEfGFM
AAFHjeo
AAG
AAGadjanje
AAGppGoBng
AAH
AAHafeifP
AAHfElIF
AAHmdKfPaG
AAIOlde
AAIPkPNE
AAIlhFAHd
AAJEf
AAJKObmPL
AAJfkmkk
AAK
AAKJhJ
AAKKlGPh
AAKPAMi
AAKbiPMolC
AAKnKO
AAKocJp
AALAMJjEaH
AALJLeloc
AALLIbLN
AA...

output:

562606635

result:

ok 1 number(s): "562606635"

Test #49:

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

input:

99994
AAAACjo
AAAcI
AAAifMHE
AAAnkB
AABHMN
AABdoJMCPo
AABh
AABkiaEfEo
AACJb
AACdEjh
AADOhfFK
AADojhfLh
AAE
AAEGpo
AAEKPIAc
AAENADm
AAF
AAFFbaoNfc
AAFah
AAFcOBOF
AAFpFIOLG
AAGO
AAGifeO
AAGljM
AAHgbf
AAHib
AAIBO
AAIFngb
AAIMCPE
AAIe
AAIiEK
AAJ
AAJOedB
AAKeADJM
AALBCO
AALNHinDcJ
AALbFO
AALoMip
AAMELfCm...

output:

173687122

result:

ok 1 number(s): "173687122"

Test #50:

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

input:

99993
AAAeNOm
AAAjO
AAB
AABknI
AACClmEb
AACIPGPHJc
AACof
AADklB
AADkpF
AADpKJBnN
AAE
AAEDkfh
AAFBIdhJC
AAFOIn
AAFnKOeEln
AAGJEEnH
AAHJHEJc
AAHilG
AAI
AAIAbL
AAIBMDJ
AAIi
AAIn
AAIp
AAJGpoPDkc
AAJK
AAJbpAgLM
AALDB
AALP
AALopa
AAMEpfAE
AAMLkHlohF
AAMja
AAMmelF
AAMohK
AANEML
AANG
AANJBKM
AAOKAC
AAOj
AAa...

output:

469483777

result:

ok 1 number(s): "469483777"

Test #51:

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

input:

99992
AAAAjdo
AABP
AABa
AACLbC
AACPhl
AACcp
AACjmB
AADIahb
AADMOiIn
AADanoim
AADneoLc
AAE
AAEAMd
AAEh
AAEiiJGGmG
AAElLa
AAFM
AAG
AAGGkI
AAGd
AAHCkbKIn
AAHJbFdiG
AAHLDbKlI
AAHbPJAGg
AAI
AAIMbEp
AAIoHhaeI
AAJOKL
AAJcjbHi
AAJhjmfF
AAJjA
AAKE
AAKLN
AAKecfd
AAKlkpeBbe
AALJkC
AAMFjJkjmC
AAMLbiEE
AANLD
AAN...

output:

906466336

result:

ok 1 number(s): "906466336"

Test #52:

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

input:

99991
AAA
AAAFgNIj
AAAJAe
AAAphK
AABHCPmCFL
AABjhfGHaL
AACPMe
AACdnejeg
AAD
AADIA
AADgPE
AAE
AAECa
AAEF
AAEFDHOL
AAENhNFfj
AAEPbPlN
AAFP
AAFeG
AAGIk
AAGeOm
AAGgemkNC
AAGkbhnJ
AAH
AAHDACKEJi
AAHEpGdDIO
AAHKAJmn
AAHjFkcoG
AAIFfdfabo
AAIcOfGJ
AAJ
AAJEDicCPH
AAJdpKkccm
AAK
AAKALknlm
AAKKgMLIB
AAL
AALAgg...

output:

607181291

result:

ok 1 number(s): "607181291"

Test #53:

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

input:

99990
AAADAhF
AAANgEl
AAApFgOjb
AABABIKEmM
AABAk
AABJMCpiPk
AABbdHleF
AABpNOHk
AACoekDNNN
AADBldM
AADGAijE
AADMADoh
AADjoJK
AADnciFD
AAE
AAEI
AAFGnmeOG
AAFNlMgce
AAFkEpPD
AAGBMgO
AAGECpEJj
AAGFaihpl
AAGmdMPGg
AAHKOpd
AAHgpKChf
AAI
AAIIenIm
AAIPjh
AAIfgPfKEI
AAIm
AAJDb
AAJhAIJ
AAJn
AAKFfjfkpN
AAKjpl
...

output:

114802953

result:

ok 1 number(s): "114802953"

Test #54:

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

input:

99989
AAA
AABEpAfhi
AABKOJ
AABaPKgpKH
AABpJAK
AACCJGo
AACNj
AACoNpO
AADKDcEI
AADamnK
AADhkKi
AAEEcgbin
AAEJ
AAEL
AAG
AAGJ
AAHBHGoGnp
AAHdhP
AAIC
AAIkI
AAIp
AAJF
AAJeLbJecm
AAJjLN
AAJmkoIa
AAJn
AAJoOMCd
AAJpjKAg
AAK
AAKIP
AAKPn
AAKaaJc
AAKp
AAL
AAMMBL
AAMPchGcj
AAN
AANJOLEHFb
AANLd
AANkdJDg
AAO
AAOlk...

output:

88466783

result:

ok 1 number(s): "88466783"

Test #55:

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

input:

99988
AAAB
AAAa
AAB
AABGENNk
AABfLg
AAC
AACACm
AACBmmJI
AACbpo
AACgMb
AACpN
AAD
AADBlHndOH
AADGIblJH
AADIm
AAEEjJOB
AAELnLGGH
AAEOdiBfl
AAEklCKe
AAFD
AAFG
AAFKCDom
AAFf
AAGGonBocE
AAGgipNdp
AAH
AAHJjhf
AAHafj
AAHd
AAJK
AAJpACegM
AAKgOmdD
AAL
AAMPL
AAMnMNoB
AAMoh
AAN
AAOD
AAOG
AAOlppbM
AAPGLhfBbp
AAP...

output:

216884355

result:

ok 1 number(s): "216884355"

Test #56:

score: 0
Accepted
time: 137ms
memory: 11976kb

input:

99987
AAAHo
AAAgNGmA
AAAmDdiCkf
AAB
AABDam
AABao
AABm
AABmaD
AACmm
AAEKJGnAhd
AAENHEbNL
AAEPlBBF
AAG
AAGNJIB
AAGNKlHCJ
AAHN
AAHOGEk
AAHcIgLb
AAHiJdC
AAI
AAILhBLHEg
AAIlO
AAJPHiInkF
AAJj
AAKDdD
AAMAHp
AAN
AANCp
AANEjaolGG
AANFjJIKFd
AANg
AAOImDKg
AAONIFKl
AAPGc
AAPLj
AAPP
AAa
AAaLCN
AAbAM
AAbNhC
AAc
...

output:

195235477

result:

ok 1 number(s): "195235477"

Test #57:

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

input:

99986
AAA
AAAI
AAAdHjGeA
AAB
AABCcpmehD
AABCm
AABpLEcG
AACAh
AACFGoGh
AACKPoFFP
AACNo
AACnc
AAD
AADHa
AADbmkbjhE
AAE
AAEljGgo
AAEn
AAEnOJaGp
AAF
AAFBKjJk
AAFNNA
AAG
AAGccknCAC
AAGknJImK
AAH
AAHCG
AAIaIgJG
AAIpMdg
AAJ
AAJgJEOmnA
AAJhLfMnk
AAKeon
AALB
AALCdEH
AALFAI
AALJbnl
AALNdC
AALh
AALjiMo
AALpJOm...

output:

659184196

result:

ok 1 number(s): "659184196"

Test #58:

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

input:

99985
AAA
AAAJE
AAAJpbmG
AAAhkpBhj
AAB
AABJBglP
AABNjF
AABc
AABpPiDEB
AACMH
AACP
AACPlCg
AACiGkkna
AACpC
AADHFDGkO
AADMapN
AADNm
AADmMl
AAE
AAFdmiiIn
AAGHepPj
AAGIJe
AAGKGOIpe
AAGpMGjDHB
AAHHJcm
AAHeo
AAJDipDnh
AAJFA
AAJONPaDP
AAJPaA
AAJckbM
AAJpDeb
AALa
AAM
AAMAfNhcIc
AAMFkfgmcd
AAMcbBA
AAMdKfA
AAN...

output:

407591000

result:

ok 1 number(s): "407591000"

Test #59:

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

input:

99984
AAA
AAACcblG
AAAgAb
AAAliJFG
AABgenMgOL
AABoP
AACcKNB
AACdjCFmG
AAChLC
AADInb
AADKI
AADcAfgFO
AADoL
AAEEoNlIJc
AAEKlc
AAEMdIEo
AAEPC
AAEd
AAEkHpmhFl
AAFbFJFPLD
AAG
AAGHD
AAGnjFNjb
AAHm
AAI
AAIAebkhb
AAIHNdk
AAIKH
AAImOPOAae
AAJLbNPjE
AAJcda
AAJdjkPal
AAK
AAL
AALP
AAM
AAMM
AAMPEPLkIB
AAN
AANfBa...

output:

177680271

result:

ok 1 number(s): "177680271"

Test #60:

score: 0
Accepted
time: 142ms
memory: 11964kb

input:

99983
AAB
AABf
AABlnokgMH
AABoDo
AACEF
AACHKA
AACNF
AAClgJJo
AACm
AADAhdMOE
AADMneDK
AAEbPmIc
AAFBLle
AAG
AAGELBei
AAGFPH
AAGHBBfhH
AAGP
AAGaoOJ
AAGb
AAGomogL
AAHfCHkhi
AAIGE
AAIMIn
AAIOElPm
AAJFMGeDEF
AAJe
AAKIJoEC
AALKA
AALmGbPedJ
AAM
AAMAmaaHCj
AAMHGaiO
AAMHaKfhMJ
AAMO
AAMb
AAMp
AANfaidFG
AANhejJ...

output:

852492541

result:

ok 1 number(s): "852492541"

Test #61:

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

input:

99982
AAAHn
AAALH
AAAN
AAAOnCpOP
AAAoMfMpb
AAB
AABdob
AAC
AACAFg
AACcmo
AACeCBGhH
AACgOAF
AADPB
AADkcC
AAECpGnjHo
AAEJ
AAGABmlnNF
AAGAKEMNNE
AAGCLm
AAGNhckmKN
AAGaKn
AAHGnj
AAHJM
AAIaAP
AAIifgAdFo
AAJLBCf
AAKAd
AAKCA
AAKCl
AAKeNc
AAKjKijH
AAL
AALDj
AALeB
AALk
AALpFLBggk
AAMFHPED
AAMM
AAMMObH
AAMlCNm...

output:

830859029

result:

ok 1 number(s): "830859029"

Test #62:

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

input:

99981
AAAA
AAAO
AAAh
AABJ
AABdieoKc
AAC
AACGd
AACg
AAChEKlkH
AACl
AAD
AADApnnPG
AADC
AADKbf
AADigiPGi
AADndLa
AAFED
AAFFeCDoA
AAFhAEAehD
AAGOF
AAGbEmPO
AAGdEi
AAGi
AAHC
AAHJBKDGGj
AAHN
AAHoMLGo
AAI
AAIBHBcMk
AAIPlbPdPF
AAImEe
AAInpGh
AAJHeJol
AAJKClK
AAJLN
AAJPojpn
AAJboGIC
AAK
AALEIdIo
AALeNiJ
AALi...

output:

752156719

result:

ok 1 number(s): "752156719"

Test #63:

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

input:

99980
AAAFdMKBi
AABJMio
AABaAbnNLc
AACkhbOdLh
AADGOpcE
AADHDgON
AADfj
AAE
AAEf
AAEpOdCC
AAFA
AAFAg
AAFFF
AAFNkgldl
AAGBdegbDK
AAGdginN
AAHLlFOHk
AAI
AAIFJG
AAIoafgJaf
AAJ
AAJKhiAMe
AAJhp
AAJoh
AAK
AAKHgA
AAKMipooB
AAKp
AALfMcPB
AALlBeOlFa
AAM
AAMAolg
AAMPjL
AAMlID
AAMngCa
AANLGn
AAOBk
AAOceFLCDH
AAO...

output:

644577167

result:

ok 1 number(s): "644577167"

Subtask #4:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #64:

score: 0
Wrong Answer
time: 401ms
memory: 12164kb

input:

100000
004GiBKC3
005n
009
009I64
00B
00C
00CMVzR
00FDXQe
00HyUQ3j
00Mt65H
00NoQf
00QsXj
00V5B19hr
00VIh
00VN9On
00VqP
00Wg09jL
00Y9ZxY5
00Yc
00ZPZ
00ZYQcuN
00aRRbwi
00aaW
00l
00qt2sx
00w6
0137RNAvTK
0163VJz
017gPMEm
019xSB
01AHBFjWXd
01Ee13dbT
01GkH
01Imkm3cL
01LEqdDkjG
01Q
01RGxb
01T65TD55
01aP
01b...

output:

537089117

result:

wrong answer 1st numbers differ - expected: '67487127', found: '537089117'