QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#212416#7531. Hacking the ProjectwaifuSenpai#AC ✓5ms3904kbC++20835b2023-10-13 15:44:192023-10-13 15:44:19

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3508kb

input:

1
4
1 aaa
2 aaa aba
0
1 cxyxy
2 cxyxy czzzz

output:

query a 1
query a 3
query b 1
query c 1
query c 2
answer aaa aba cxyxy czzzz

result:

ok Ok in 8 k

Test #2:

score: 0
Accepted
time: 2ms
memory: 3616kb

input:

5
1000
1 a
3 a aajm aavfegkci
10 a aajm aavfegkci aavj abjc abnxwsy abzbr acvd adrvb af
26 a aajm aavfegkci aavj abjc abnxwsy abzbr acvd adrvb af afbxpytbe afl afwsjfu aigwxskrks aimpdesf ajbq alsqmc alswxsm anmkcljvyy anwwyoosx aofpxw aoovrejhpb apunxuyp apyhw aqmqhmbkai aqqgzwyf
42 a aajm aavfegkc...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query b 1
query b 3
query b 10
query b 26
query b 59
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query d 3
query d 10
query d 26
query d 59
query e 1
query e 3
query e 10
query e 26
query e 59
query f 1
query f 3
query f 10
quer...

result:

ok Ok in 2564 k

Test #3:

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

input:

5
1000
1 acbd
3 acbd acgts acvdflmn
10 acbd acgts acvdflmn admkf aehzdl aepocjmc afaeqq afbqeawd afjb agrfnq
26 acbd acgts acvdflmn admkf aehzdl aepocjmc afaeqq afbqeawd afjb agrfnq ahrhdp aidg aimp aiqana ajb akwm alilyzhysa alkb amljwn amzkptt anbet anmkclj aoapjzkzn aptmpvlcny aq aqjdoi
37 acbd a...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query b 1
query b 3
query b 10
query b 26
query b 59
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query d 3
query d 10
query d 26
query d 59
query e 1
query e 3
query e 10
query e 26
query e 59
query f 1
query f 3
query f 10
quer...

result:

ok Ok in 2563 k

Test #4:

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

input:

5
1000
1 aaxqvzig
3 aaxqvzig abbaep actfxtivf
10 aaxqvzig abbaep actfxtivf adt adtl aer afa agfev agluptr ahci
26 aaxqvzig abbaep actfxtivf adt adtl aer afa agfev agluptr ahci ahdfhfr aiympo ajjcvjb ajkux akq alnoiph alsq alxz amtx anbiypuziq anfvodtiok aonq aoovre aopvef aorppyffun aovq
40 aaxqvzig...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query b 1
query b 3
query b 10
query b 26
query b 59
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query d 3
query d 10
query d 26
query d 59
query e 1
query e 3
query e 10
query e 26
query e 59
query f 1
query f 3
query f 10
quer...

result:

ok Ok in 2558 k

Test #5:

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

input:

5
1000
1 a
3 a aalilyz ac
10 a aalilyz ac acb adcogtni adroq aepocjm aevi af aguwuvh
26 a aalilyz ac acb adcogtni adroq aepocjm aevi af aguwuvh agxaaac ahuwl ahxy aiafmv aisyr ajuqw ake amdjxnsmk amgcifdlj amvprza amzt anaztksn ane anfvodti aozdd appruokyw
36 a aalilyz ac acb adcogtni adroq aepocjm ...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query b 1
query b 3
query b 10
query b 26
query b 59
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query d 3
query d 10
query d 26
query d 59
query e 1
query e 3
query e 10
query e 26
query e 59
query f 1
query f 3
query f 10
quer...

result:

ok Ok in 2554 k

Test #6:

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

input:

5
1000
1 abvmqw
3 abvmqw acgt acoogjx
10 abvmqw acgt acoogjx adrvbejoo ae aeqv af afb afdktn aggcwzid
26 abvmqw acgt acoogjx adrvbejoo ae aeqv af afb afdktn aggcwzid aibg aimgcusle aiymp ajuqm al alk amklrwl amncorb anaztksn anelj aozddwx apyhw aqd atxbu aupv avpqato
35 abvmqw acgt acoogjx adrvbejoo...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query b 1
query b 3
query b 10
query b 26
query b 59
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query d 3
query d 10
query d 26
query d 59
query e 1
query e 3
query e 10
query e 26
query e 59
query f 1
query f 3
query f 10
quer...

result:

ok Ok in 2552 k

Test #7:

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

input:

5
1000
1 aavfeg
3 aavfeg abogkwk abpwnr
10 aavfeg abogkwk abpwnr abqlngdsc acbdx adgeed aerm aevi aexjyu afascs
26 aavfeg abogkwk abpwnr abqlngdsc acbdx adgeed aerm aevi aexjyu afascs afbqeawdi afkxyfmcn afvmu agmm agwdwxsu aigw aimg aitmxp aiy aju ambz amnc anf ann anwp aofvrvc
43 aavfeg abogkwk ab...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query b 1
query b 3
query b 10
query b 26
query b 59
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query d 3
query d 10
query d 26
query d 59
query e 1
query e 3
query e 10
query e 26
query e 59
query f 1
query f 3
query f 10
quer...

result:

ok Ok in 2562 k

Test #8:

score: 0
Accepted
time: 3ms
memory: 3680kb

input:

5
1000
1 a
3 a aaac aac
10 a aaac aac aadrvbej aay abwun abz acb acn acqx
26 a aaac aac aadrvbej aay abwun abz acb acn acqx actyaovq acvdf adgeedjk af ahnzdw ahxylcgn aidvvi aisyr aivtmpqz al an anbiypuz apjzkzn aptmp aqclps aqe
49 a aaac aac aadrvbej aay abwun abz acb acn acqx actyaovq acvdf adgeed...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query b 1
query b 3
query b 10
query b 26
query b 59
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query d 3
query d 10
query d 26
query d 59
query e 1
query e 3
query e 10
query e 26
query e 59
query f 1
query f 3
query f 10
quer...

result:

ok Ok in 2555 k

Test #9:

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

input:

5
1000
1 aaciqgnc
3 aaciqgnc aawtbc aayipsoj
10 aaciqgnc aawtbc aayipsoj abqlngds acf acqrs actad adrv adxm aexjy
26 aaciqgnc aawtbc aayipsoj abqlngds acf acqrs actad adrv adxm aexjy agnn agwdwxs ai aid aif aijelh aj ajrnwj akevsjo all alswxsm amdxa amklrw anow anw aoapj
43 aaciqgnc aawtbc aayipsoj ...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query b 1
query b 3
query b 10
query b 26
query b 59
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query d 3
query d 10
query d 26
query d 59
query e 1
query e 3
query e 10
query e 26
query f 1
query f 3
query f 10
query f 26
quer...

result:

ok Ok in 2556 k

Test #10:

score: 0
Accepted
time: 5ms
memory: 3580kb

input:

5
1000
1 aagxaa
3 aagxaa abjc acg
10 aagxaa abjc acg aciqg acnhpzn acvdfl adtninwc aehz aek aeqqojyp
26 aagxaa abjc acg aciqg acnhpzn acvdfl adtninwc aehz aek aeqqojyp aevibe aexjyulg afbxp afl aguwuv ahcipz aijelhy aixws ajuldlwr amk amn andfq anokvb anw aoc aozd
39 aagxaa abjc acg aciqg acnhpzn ac...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query b 1
query b 3
query b 10
query b 26
query b 59
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query d 3
query d 10
query d 26
query d 59
query e 1
query e 3
query e 10
query e 26
query e 59
query f 1
query f 3
query f 10
quer...

result:

ok Ok in 2564 k

Test #11:

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

input:

5
1000
1 aadbd
3 aadbd aadbg aaemf
10 aadbd aadbg aaemf aaepzchvxg aapihz aaqjqvgx aazfccep aaznfe abakwq abbwcmdh
26 aadbd aadbg aaemf aaepzchvxg aapihz aaqjqvgx aazfccep aaznfe abakwq abbwcmdh abdhdofrs abdjlpez abeaa abezgbabhd abgbpa abhkmvmahb abhtaev abicf absaa acaeaej acbphie acfkbefqye acpp...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query d 1
query d 3
query d 10
query d 26
query d 59
query d 123
query e 1
query e 3
query e 10
query e 2...

result:

ok Ok in 2749 k

Test #12:

score: 0
Accepted
time: 3ms
memory: 3680kb

input:

5
1000
1 aabwpote
3 aabwpote aaclnnc aadjkgs
10 aabwpote aaclnnc aadjkgs aaemccd aapihztr aavaacml aazdodzr abbaeuada abbriejjk abbzfui
26 aabwpote aaclnnc aadjkgs aaemccd aapihztr aavaacml aazdodzr abbaeuada abbriejjk abbzfui abcdocbn abicfcs abjcdznj abkcmdgj abrlkfgb abuesdgjja abzegbl abzgbaz ac...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query d 1
query d 3
query d 10
query d 26
query d 59
query d 123
query e 1
query e 3
query e 10
query e 2...

result:

ok Ok in 2661 k

Test #13:

score: 0
Accepted
time: 2ms
memory: 3684kb

input:

5
1000
1 aaaac
3 aaaac aabcfn aacafh
10 aaaac aabcfn aacafh aacklaael aacqahce aadaagbh aadneaeg aaeahnfag aaedi aaegsqcag
26 aaaac aabcfn aacafh aacklaael aacqahce aadaagbh aadneaeg aaeahnfag aaedi aaegsqcag aafbkbfcra aaffddb aagecekeae aaghla aagpa aajdhjlba aakbae aakcbfobaa aaldd aamdenfa aankd...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query a 236
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query d 1
query d 3
query d 10
query d 26
query d 59
query d 123
query e 1
query e 3
query e ...

result:

ok Ok in 2713 k

Test #14:

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

input:

5
1000
1 aabbhcc
3 aabbhcc aabfaakbdp aabpmcgoa
10 aabbhcc aabfaakbdp aabpmcgoa aabzaecvji aadcaoscc aadcbqgafi aaeizjcec aafaedcb aafbefhcab aafbygbcc
26 aabbhcc aabfaakbdp aabpmcgoa aabzaecvji aadcaoscc aadcbqgafi aaeizjcec aafaedcb aafbefhcab aafbygbcc aagobdhafb aajhdbdlm aakbaezd aakcbfob aaldd...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query a 236
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query d 1
query d 3
query d 10
query d 26
query d 59
query d 123
query e 1
query ...

result:

ok Ok in 2910 k

Test #15:

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

input:

5
1000
1 aaaaaibb
3 aaaaaibb aaabaa aaabceaid
10 aaaaaibb aaabaa aaabceaid aaabf aaagbba aaagpabe aaahcab aaamdca aabhbhbf aabhdl
26 aaaaaibb aaabaa aaabceaid aaabf aaagbba aaagpabe aaahcab aaamdca aabhbhbf aabhdl aabicbiaa aabjcngb aacafh aacdcaca aacia aaclg aadbb aadfqjoead aadhbkb aaeabdadfo aae...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query a 236
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query d 1
query d 3
query d 10
query d 26
query d 59
query d 123
query e 1
query ...

result:

ok Ok in 2711 k

Test #16:

score: 0
Accepted
time: 2ms
memory: 3868kb

input:

5
1000
1 aaabfdi
3 aaabfdi aaabied aaacbfg
10 aaabfdi aaabied aaacbfg aaaeebaf aaafbeabii aaagbbabh aaaqpbb aaaudai aabaabge aabbbdc
26 aaabfdi aaabied aaacbfg aaaeebaf aaafbeabii aaagbbabh aaaqpbb aaaudai aabaabge aabbbdc aabcehac aabeabfacb aabedfk aacaeaaeac aaccfdc aacgdicaa aacgebfcba aachaad a...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query a 236
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query c 236
query d 1
query d 3
query d 10
query d 26
query d 59
query d 123
quer...

result:

ok Ok in 2749 k

Test #17:

score: 0
Accepted
time: 2ms
memory: 3900kb

input:

5
1000
1 aaaab
3 aaaab aaaad aaaaeddca
10 aaaab aaaad aaaaeddca aaabceaed aaabf aaacbaa aaaedfecd aaafd aaafdegda aaamaab
26 aaaab aaaad aaaaeddca aaabceaed aaabf aaacbaa aaaedfecd aaafd aaafdegda aaamaab aaanae aabaacfca aabajbdbda aabak aabbgddaaa aabca aabcbacdc aabhbhbf aabjga aablhadhai aabmdad...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query a 236
query a 418
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query c 236
query d 1
query d 3
query d 10
query d 26
query d 59
quer...

result:

ok Ok in 2971 k

Test #18:

score: 0
Accepted
time: 2ms
memory: 3680kb

input:

5
1000
1 aaaadbaab
3 aaaadbaab aaaagbae aaabhab
10 aaaadbaab aaaagbae aaabhab aaacakhd aaacbcbaqe aaadacda aaadfagae aaaeaaaebr aaaeaekea aaaebbdfe
26 aaaadbaab aaaagbae aaabhab aaacakhd aaacbcbaqe aaadacda aaadfagae aaaeaaaebr aaaeaekea aaaebbdfe aaajbbb aabaabgd aabaeefbfa aabakfbeb aabbaaai aabbb...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query a 236
query a 418
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query c 236
query d 1
query d 3
query d 10
query d 26
query d 59
quer...

result:

ok Ok in 2929 k

Test #19:

score: 0
Accepted
time: 3ms
memory: 3684kb

input:

5
1000
1 aaaaaedd
3 aaaaaedd aaaab aaaabb
10 aaaaaedd aaaab aaaabb aaaabc aaaadda aaaaeabb aaabaa aaabbcaabh aaabbncfba aaabd
26 aaaaaedd aaaab aaaabb aaaabc aaaadda aaaaeabb aaabaa aaabbcaabh aaabbncfba aaabd aaabeda aaabi aaacaad aaackaaee aaadbaab aaadbc aaaddb aaafbfdkd aaafdf aabaaaf aabab aaba...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query a 236
query a 418
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query c 236
query d 1
query d 3
query d 10
query d 26
query d 59
quer...

result:

ok Ok in 3030 k

Test #20:

score: 0
Accepted
time: 2ms
memory: 3900kb

input:

5
1000
1 aaaaaaakf
3 aaaaaaakf aaaaaadda aaaaacf
10 aaaaaaakf aaaaaadda aaaaacf aaaacaabc aaaadbaa aaaafaia aaaafeaeeb aaabbcaa aaabceaaa aaabdbb
26 aaaaaaakf aaaaaadda aaaaacf aaaacaabc aaaadbaa aaaafaia aaaafeaeeb aaabbcaa aaabceaaa aaabdbb aaabeda aaabiaagh aaacbcbaqe aaacbdf aaaceaa aaadacaa aaa...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query a 236
query a 418
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query c 236
query d 1
query d 3
query d 10
query d 26
query d 59
quer...

result:

ok Ok in 2681 k

Test #21:

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

input:

1
1000
0
1 bagaoguesy
3 bagaoguesy bajdjjxkus bamxlzqrbg
10 bagaoguesy bajdjjxkus bamxlzqrbg baqstjbgkd baxomczwvf bbcczeqbln bbfivcdxcq bbkdokgwfw bbmbmkokgs bbvoexrygb
26 bagaoguesy bajdjjxkus bamxlzqrbg baqstjbgkd baxomczwvf bbcczeqbln bbfivcdxcq bbkdokgwfw bbmbmkokgs bbvoexrygb bcaymppyki bcmiph...

output:

query a 1
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query c 1
query d 1
query e 1
query f 1
query g 1
query h 1
query i 1
query i 3
query i 10
query i 26
query i 59
query i 123
query i 236
query j 1
query k 1
query l 1
query m 1
query m 3
query m 10
query m 26
quer...

result:

ok Ok in 3186 k

Test #22:

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

input:

1
1000
0
1 babuzeiopu
3 babuzeiopu baekaudviq baerbtrcoo
10 babuzeiopu baekaudviq baerbtrcoo bajklhxyid bajxsdfnaz bakbkywipe bakwsjgopl bamuoeesxn bamvowdurh bapdftjwal
26 babuzeiopu baekaudviq baerbtrcoo bajklhxyid bajxsdfnaz bakbkywipe bakwsjgopl bamuoeesxn bamvowdurh bapdftjwal baspeslstz batmiw...

output:

query a 1
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query b 418
query c 1
query d 1
query d 3
query d 10
query d 26
query d 59
query d 123
query d 236
query d 418
query e 1
query f 1
query f 3
query f 10
query f 26
query f 59
query g 1
query h 1
query i 1
query j 1...

result:

ok Ok in 3278 k

Test #23:

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

input:

1
1000
1 aahisutiku
3 aahisutiku aakxjvgzfg aamvtdufhl
10 aahisutiku aakxjvgzfg aamvtdufhl aaprijqexs abeysgmdvz abkhygxbld abyfnocctt acboavgdvp acrpgutmfc adaavgwzbu
26 aahisutiku aakxjvgzfg aamvtdufhl aaprijqexs abeysgmdvz abkhygxbld abyfnocctt acboavgdvp acrpgutmfc adaavgwzbu adkpbomane adpyjhbw...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query d 1
query e 1
query e 3
query f 1
query g 1
query g 3
query g 10
query g 26
query g 59
query g 123
...

result:

ok Ok in 3094 k

Test #24:

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

input:

1
1000
1 adwrfxvqth
3 adwrfxvqth akykuvdgif aosgchfnkc
8 adwrfxvqth akykuvdgif aosgchfnkc apmnedzewx arjntqhinl arkgjayddx avjczjvyww awvoeoenja
1 bariprplmb
3 bariprplmb bbdehlqkie bbdnupnpqe
10 bariprplmb bbdehlqkie bbdnupnpqe bbfsesqaia bbjsjspkdx bbmbtvfccp bbpjihbaao bbpqdncdxz bbwecpjqre bcevv...

output:

query a 1
query a 3
query a 10
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query c 1
query c 3
query c 10
query c 26
query d 1
query e 1
query e 3
query e 10
query e 26
query e 59
query e 123
query e 236
query e 418
query f 1
query f 3
query f 10
query f 26
query g 1...

result:

ok Ok in 3323 k

Test #25:

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

input:

1
1000
0
0
1 cbepuznjbc
3 cbepuznjbc cbilnwqszh cbnhflckuo
10 cbepuznjbc cbilnwqszh cbnhflckuo cbrqmcwarn cbrwvaeoqj cbuvzuspvx cbvbibnvnn cdjdgylqpc cdplbcgtyo cduoxeltku
26 cbepuznjbc cbilnwqszh cbnhflckuo cbrqmcwarn cbrwvaeoqj cbuvzuspvx cbvbibnvnn cdjdgylqpc cdplbcgtyo cduoxeltku cdzalgjsmw cejv...

output:

query a 1
query b 1
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query d 1
query e 1
query f 1
query g 1
query h 1
query i 1
query j 1
query j 3
query j 10
query j 26
query j 59
query k 1
query l 1
query l 3
query l 10
query l 26
query l 59
query l 123
query l 236
query l 418
que...

result:

ok Ok in 3141 k

Test #26:

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

input:

1
1000
0
1 babktgvctu
3 babktgvctu bacckliudy badycnijil
10 babktgvctu bacckliudy badycnijil baetozsvwo bafkjjimwe bahqwfghge bakdzdncvx bakxnjuted balwwpmrvk bamtkbtrfg
26 babktgvctu bacckliudy badycnijil baetozsvwo bafkjjimwe bahqwfghge bakdzdncvx bakxnjuted balwwpmrvk bamtkbtrfg baomixiagc baoqpm...

output:

query a 1
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query b 418
query b 674
query c 1
query c 3
query c 10
query c 26
query c 59
query d 1
query e 1
query f 1
query g 1
query h 1
query i 1
query j 1
query k 1
query l 1
query m 1
query n 1
query o 1
query o 3
query ...

result:

ok Ok in 2952 k

Test #27:

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

input:

1
1000
1 anpmcjtvhc
1 anpmcjtvhc
1 babqiytdti
3 babqiytdti backovxsdu bacnnmlgfv
10 babqiytdti backovxsdu bacnnmlgfv badvigqcqh bafemlfuaz bafvsugtiw bagguxpimu bagwdcjohm bahoawcolg balfvfqttv
26 babqiytdti backovxsdu bacnnmlgfv badvigqcqh bafemlfuaz bafvsugtiw bagguxpimu bagwdcjohm bahoawcolg balf...

output:

query a 1
query a 3
query b 1
query b 3
query b 10
query b 26
query b 59
query b 123
query b 236
query b 418
query c 1
query c 3
query d 1
query e 1
query e 3
query e 10
query e 26
query e 59
query e 123
query e 236
query e 418
query e 674
query f 1
query g 1
query h 1
query i 1
query i 3
query j 1
...

result:

ok Ok in 2655 k

Test #28:

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

input:

1
1000
0
0
1 cadaytkjkd
3 cadaytkjkd cafzgsqgfu caqlhlglip
10 cadaytkjkd cafzgsqgfu caqlhlglip casxpxqqoa catxklbkrn caxsnclszq cayihgbkpv cbbdesifkj cbggreijir cbghfxiqvo
26 cadaytkjkd cafzgsqgfu caqlhlglip casxpxqqoa catxklbkrn caxsnclszq cayihgbkpv cbbdesifkj cbggreijir cbghfxiqvo cblngggqxz cbnn...

output:

query a 1
query b 1
query c 1
query c 3
query c 10
query c 26
query c 59
query c 123
query c 236
query d 1
query e 1
query e 3
query e 10
query e 26
query e 59
query e 123
query e 236
query f 1
query g 1
query g 3
query h 1
query i 1
query j 1
query k 1
query k 3
query k 10
query k 26
query k 59
que...

result:

ok Ok in 2746 k

Test #29:

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

input:

1
1000
0
1 bbebxtglxm
3 bbebxtglxm bdzpwcbwvo bfurjatycr
7 bbebxtglxm bdzpwcbwvo bfurjatycr bmfsbdoxww bpfvjcmlct bpmixrqzfb bylpzqlgxq
0
0
0
0
0
0
1 iabmdmtywa
3 iabmdmtywa iaemjvkjdy iakpsrcnhb
10 iabmdmtywa iaemjvkjdy iakpsrcnhb iaowsmpxps iawwchhbue iaxooljbux ibdlngpkgx ibduaemqdw ibpyleayhq ib...

output:

query a 1
query b 1
query b 3
query b 10
query c 1
query d 1
query e 1
query f 1
query g 1
query h 1
query i 1
query i 3
query i 10
query i 26
query i 59
query i 123
query i 236
query j 1
query k 1
query k 3
query k 10
query l 1
query l 3
query l 10
query l 26
query l 59
query m 1
query n 1
query o ...

result:

ok Ok in 2932 k

Test #30:

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

input:

1
1000
0
0
0
1 dkthhcxrcq
1 dkthhcxrcq
1 eakgfiehic
3 eakgfiehic eaqjfngdky ebgxwpmnxx
10 eakgfiehic eaqjfngdky ebgxwpmnxx ebidmjgczs ebubwrmjdc ecdjuyzyjs ecmzzanhuc ecsnhvefww ectepkuesj ecxteexpsq
26 eakgfiehic eaqjfngdky ebgxwpmnxx ebidmjgczs ebubwrmjdc ecdjuyzyjs ecmzzanhuc ecsnhvefww ectepkues...

output:

query a 1
query b 1
query c 1
query d 1
query d 3
query e 1
query e 3
query e 10
query e 26
query e 59
query e 123
query e 236
query f 1
query f 3
query g 1
query h 1
query h 3
query i 1
query i 3
query j 1
query j 3
query j 10
query j 26
query j 59
query k 1
query k 3
query k 10
query k 26
query k ...

result:

ok Ok in 3129 k

Test #31:

score: 0
Accepted
time: 2ms
memory: 3904kb

input:

5
1000
1 aaaiqwexnq
3 aaaiqwexnq aadjcquqdq aafaldvvzr
10 aaaiqwexnq aadjcquqdq aafaldvvzr aaflmsydwu aafwzaqmhr aafypzoakd aahtirtmve aaitvirspt aajkhyjujl aajwmyiykc
26 aaaiqwexnq aadjcquqdq aafaldvvzr aaflmsydwu aafwzaqmhr aafypzoakd aahtirtmve aaitvirspt aajkhyjujl aajwmyiykc aamnvriles aamotube...

output:

query a 1
query a 3
query a 10
query a 26
query a 59
query a 123
query a 236
query a 418
query a 674
query a 947
query a 1000
answer aaaiqwexnq aadjcquqdq aafaldvvzr aaflmsydwu aafwzaqmhr aafypzoakd aahtirtmve aaitvirspt aajkhyjujl aajwmyiykc aamnvriles aamotubelz aanjhaxtjv aanpnufnlu aanxeqwcui aa...

result:

ok Ok in 3773 k