QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#743076#7531. Hacking the Projectucup-team2172AC ✓11ms3872kbC++231.8kb2024-11-13 18:09:562024-11-13 18:09:57

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

query a 1
query a 2
query a 4
query b 1
query c 1
query c 2
query czzzz 2
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 p 1
query q 1
query r 1
query s 1
query t 1
query u 1
query v 1
query w 1
query x 1
query y 1
query ...

result:

ok Ok in 36 k

Test #2:

score: 0
Accepted
time: 6ms
memory: 3836kb

input:

5
1000
1 a
2 a aajm
4 a aajm aavfegkci aavj
8 a aajm aavfegkci aavj abjc abnxwsy abzbr acvd
16 a aajm aavfegkci aavj abjc abnxwsy abzbr acvd adrvb af afbxpytbe afl afwsjfu aigwxskrks aimpdesf ajbq
32 a aajm aavfegkci aavj abjc abnxwsy abzbr acvd adrvb af afbxpytbe afl afwsjfu aigwxskrks aimpdesf ajb...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query c 1
query c 2
query c 4
query c 8
query c 16
query cm 2
query cm 4
query cn 1
query cn 2
query cn 4
query co 1
query co 2
query co 4
query cp 1
quer...

result:

ok Ok in 3018 k

Test #3:

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

input:

5
1000
1 acbd
2 acbd acgts
4 acbd acgts acvdflmn admkf
8 acbd acgts acvdflmn admkf aehzdl aepocjmc afaeqq afbqeawd
16 acbd acgts acvdflmn admkf aehzdl aepocjmc afaeqq afbqeawd afjb agrfnq ahrhdp aidg aimp aiqana ajb akwm
32 acbd acgts acvdflmn admkf aehzdl aepocjmc afaeqq afbqeawd afjb agrfnq ahrhdp...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query c 1
query c 2
query c 4
query c 8
query c 16
query c 32
query d 1
query d 2
query d 4
query d 8
query d 16
query d 32
query d 64
query e 1
query e 2...

result:

ok Ok in 2942 k

Test #4:

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

input:

5
1000
1 aaxqvzig
2 aaxqvzig abbaep
4 aaxqvzig abbaep actfxtivf adt
8 aaxqvzig abbaep actfxtivf adt adtl aer afa agfev
16 aaxqvzig abbaep actfxtivf adt adtl aer afa agfev agluptr ahci ahdfhfr aiympo ajjcvjb ajkux akq alnoiph
32 aaxqvzig abbaep actfxtivf adt adtl aer afa agfev agluptr ahci ahdfhfr ai...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query atq 2
query au 1
query au 2
query au 4
query av 1
query av 2
query aw 1
query aw 2
query ax 1
query ay 1
query ay 2
query az 1
query az 2
query atr 1
query ats 1
query att 1
query atu 1
query atu 2
query atv 1
query atw 1
query atx ...

result:

ok Ok in 3112 k

Test #5:

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

input:

5
1000
1 a
2 a aalilyz
4 a aalilyz ac acb
8 a aalilyz ac acb adcogtni adroq aepocjm aevi
16 a aalilyz ac acb adcogtni adroq aepocjm aevi af aguwuvh agxaaac ahuwl ahxy aiafmv aisyr ajuqw
32 a aalilyz ac acb adcogtni adroq aepocjm aevi af aguwuvh agxaaac ahuwl ahxy aiafmv aisyr ajuqw ake amdjxnsmk amg...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query bxuw 2
query by 1
query by 2
query by 4
query bz 1
query bz 2
query bxv 1
query bxw 1
query bxx 1
query bxy 1
query bxz 1
query bxux 1
query bxuy 1
query bxuz ...

result:

ok Ok in 2949 k

Test #6:

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

input:

5
1000
1 abvmqw
2 abvmqw acgt
4 abvmqw acgt acoogjx adrvbejoo
8 abvmqw acgt acoogjx adrvbejoo ae aeqv af afb
16 abvmqw acgt acoogjx adrvbejoo ae aeqv af afb afdktn aggcwzid aibg aimgcusle aiymp ajuqm al alk
32 abvmqw acgt acoogjx adrvbejoo ae aeqv af afb afdktn aggcwzid aibg aimgcusle aiymp ajuqm al...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query ayjo 2
query az 1
query az 2
query az 4
query ayk 1
query ayl 1
query aym 1
query ayn 1
query ayo 1
query ayp 1
query ayq 1
query ayr 1
query ays 1
query ays 2
query ayt 1
query ayu 1
query ayv 1
query ayw 1
query ayx 1
query ayy 1
...

result:

ok Ok in 3056 k

Test #7:

score: 0
Accepted
time: 9ms
memory: 3528kb

input:

5
1000
1 aavfeg
2 aavfeg abogkwk
4 aavfeg abogkwk abpwnr abqlngdsc
8 aavfeg abogkwk abpwnr abqlngdsc acbdx adgeed aerm aevi
16 aavfeg abogkwk abpwnr abqlngdsc acbdx adgeed aerm aevi aexjyu afascs afbqeawdi afkxyfmcn afvmu agmm agwdwxsu aigw
32 aavfeg abogkwk abpwnr abqlngdsc acbdx adgeed aerm aevi a...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query bup 2
query bv 1
query bv 2
query bv 4
query bw 1
query bw 2
query bx 1
query bx 2
query bx 4
query by 1
query by 2
query bz 1
query bz 2
query buq 1
query bur...

result:

ok Ok in 2990 k

Test #8:

score: 0
Accepted
time: 8ms
memory: 3796kb

input:

5
1000
1 a
2 a aaac
4 a aaac aac aadrvbej
8 a aaac aac aadrvbej aay abwun abz acb
16 a aaac aac aadrvbej aay abwun abz acb acn acqx actyaovq acvdf adgeedjk af ahnzdw ahxylcgn
32 a aaac aac aadrvbej aay abwun abz acb acn acqx actyaovq acvdf adgeedjk af ahnzdw ahxylcgn aidvvi aisyr aivtmpqz al an anbi...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query bzxu 2
query bzy 1
query bzz 1
query bzxv 1
query bzxw 1
query bzxx 1
query bzxy 1
query bzxz 1
query c 1
query c 2
query c 4
query c 8
query c 16
query c 32
q...

result:

ok Ok in 2938 k

Test #9:

score: 0
Accepted
time: 7ms
memory: 3872kb

input:

5
1000
1 aaciqgnc
2 aaciqgnc aawtbc
4 aaciqgnc aawtbc aayipsoj abqlngds
8 aaciqgnc aawtbc aayipsoj abqlngds acf acqrs actad adrv
16 aaciqgnc aawtbc aayipsoj abqlngds acf acqrs actad adrv adxm aexjy agnn agwdwxs ai aid aif aijelh
32 aaciqgnc aawtbc aayipsoj abqlngds acf acqrs actad adrv adxm aexjy ag...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query aucz 2
query av 1
query av 2
query aw 1
query aw 2
query aw 4
query ax 1
query ax 2
query ay 1
query ay 2
query ay 4
query az 1
query az 2
query az 4
query aud 1
query aue 1
query aue 2
query auf 1
query aug 1
query auh 1
query aui ...

result:

ok Ok in 2959 k

Test #10:

score: 0
Accepted
time: 7ms
memory: 3600kb

input:

5
1000
1 aagxaa
2 aagxaa abjc
4 aagxaa abjc acg aciqg
8 aagxaa abjc acg aciqg acnhpzn acvdfl adtninwc aehz
16 aagxaa abjc acg aciqg acnhpzn acvdfl adtninwc aehz aek aeqqojyp aevibe aexjyulg afbxp afl aguwuv ahcipz
32 aagxaa abjc acg aciqg acnhpzn acvdfl adtninwc aehz aek aeqqojyp aevibe aexjyulg afb...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query atju 2
query au 1
query au 2
query au 4
query av 1
query aw 1
query aw 2
query aw 4
query ax 1
query ay 1
query ay 2
query az 1
query az 2
query atk 1
query atl 1
query atm 1
query atn 1
query ato 1
query ato 2
query atp 1
query atq...

result:

ok Ok in 2981 k

Test #11:

score: 0
Accepted
time: 8ms
memory: 3808kb

input:

5
1000
1 aadbd
2 aadbd aadbg
4 aadbd aadbg aaemf aaepzchvxg
8 aadbd aadbg aaemf aaepzchvxg aapihz aaqjqvgx aazfccep aaznfe
16 aadbd aadbg aaemf aaepzchvxg aapihz aaqjqvgx aazfccep aaznfe abakwq abbwcmdh abdhdofrs abdjlpez abeaa abezgbabhd abgbpa abhkmvmahb
32 aadbd aadbg aaemf aaepzchvxg aapihz aaqj...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query c 1
query c 2
query c 4
query c 8
query c 16
query c 32
query c 64
query c 128
query d 1
query d 2
query d 4
query d 8
query...

result:

ok Ok in 3023 k

Test #12:

score: 0
Accepted
time: 10ms
memory: 3640kb

input:

5
1000
1 aabwpote
2 aabwpote aaclnnc
4 aabwpote aaclnnc aadjkgs aaemccd
8 aabwpote aaclnnc aadjkgs aaemccd aapihztr aavaacml aazdodzr abbaeuada
16 aabwpote aaclnnc aadjkgs aaemccd aapihztr aavaacml aazdodzr abbaeuada abbriejjk abbzfui abcdocbn abicfcs abjcdznj abkcmdgj abrlkfgb abuesdgjja
32 aabwpot...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query c 1
query c 2
query c 4
query c 8
query c 16
query c 32
query c 64
query c 128
query d 1
query d 2
query d 4
query d 8
query...

result:

ok Ok in 3107 k

Test #13:

score: 0
Accepted
time: 9ms
memory: 3640kb

input:

5
1000
1 aaaac
2 aaaac aabcfn
4 aaaac aabcfn aacafh aacklaael
8 aaaac aabcfn aacafh aacklaael aacqahce aadaagbh aadneaeg aaeahnfag
16 aaaac aabcfn aacafh aacklaael aacqahce aadaagbh aadneaeg aaeahnfag aaedi aaegsqcag aafbkbfcra aaffddb aagecekeae aaghla aagpa aajdhjlba
32 aaaac aabcfn aacafh aacklaa...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query ajmuar 2
query ak 1
query ak 2
query ak 4
query ak 8
query al 1
query al 2
query al 4
query am 1
query am 2
query am 4
query an 1
query an 2
query an 4
query ao 1
query ao 2
query ao 4
query ap 1
query ap 2
qu...

result:

ok Ok in 2877 k

Test #14:

score: 0
Accepted
time: 9ms
memory: 3596kb

input:

5
1000
1 aabbhcc
2 aabbhcc aabfaakbdp
4 aabbhcc aabfaakbdp aabpmcgoa aabzaecvji
8 aabbhcc aabfaakbdp aabpmcgoa aabzaecvji aadcaoscc aadcbqgafi aaeizjcec aafaedcb
16 aabbhcc aabfaakbdp aabpmcgoa aabzaecvji aadcaoscc aadcbqgafi aaeizjcec aafaedcb aafbefhcab aafbygbcc aagobdhafb aajhdbdlm aakbaezd aakc...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query asdelika 2
query at 1
query at 2
query at 4
query au 1
query av 1
query aw 1
query aw 2
query aw 4
query ax 1
query ay 1
query az 1
query az 2
query az 4
query ase 1
query asf 1
query asg 1
query ash 1
query a...

result:

ok Ok in 2950 k

Test #15:

score: 0
Accepted
time: 6ms
memory: 3796kb

input:

5
1000
1 aaaaaibb
2 aaaaaibb aaabaa
4 aaaaaibb aaabaa aaabceaid aaabf
8 aaaaaibb aaabaa aaabceaid aaabf aaagbba aaagpabe aaahcab aaamdca
16 aaaaaibb aaabaa aaabceaid aaabf aaagbba aaagpabe aaahcab aaamdca aabhbhbf aabhdl aabicbiaa aabjcngb aacafh aacdcaca aacia aaclg
32 aaaaaibb aaabaa aaabceaid aaa...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query a 256
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query bgebcnj 2
query bh 1
query bh 2
query bh 4
query bh 8
query bi 1
query bi 2
query bi 4
query bi 8
query bj 1
que...

result:

ok Ok in 2908 k

Test #16:

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

input:

5
1000
1 aaabfdi
2 aaabfdi aaabied
4 aaabfdi aaabied aaacbfg aaaeebaf
8 aaabfdi aaabied aaacbfg aaaeebaf aaafbeabii aaagbbabh aaaqpbb aaaudai
16 aaabfdi aaabied aaacbfg aaaeebaf aaafbeabii aaagbbabh aaaqpbb aaaudai aabaabge aabbbdc aabcehac aabeabfacb aabedfk aacaeaaeac aaccfdc aacgdicaa
32 aaabfdi ...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query a 256
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query b 256
query c 1
query c 2
query c 4
query c 8
query c 16
query c 32
query c 64
query c 128
query c 256
query d 1...

result:

ok Ok in 3107 k

Test #17:

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

input:

5
1000
1 aaaab
2 aaaab aaaad
4 aaaab aaaad aaaaeddca aaabceaed
8 aaaab aaaad aaaaeddca aaabceaed aaabf aaacbaa aaaedfecd aaafd
16 aaaab aaaad aaaaeddca aaabceaed aaabf aaacbaa aaaedfecd aaafd aaafdegda aaamaab aaanae aabaacfca aabajbdbda aabak aabbgddaaa aabca
32 aaaab aaaad aaaaeddca aaabceaed aaab...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query acdladg 2
query ad 1
query ad 2
query ad 4
query ad 8
query ad 16
query ad 32
query ae 1
query ae 2
query ae 4
query ae 8
query ae 16
query af 1
query af 2
query af 4
query af 8
query af 16
query ag 1
query ag...

result:

ok Ok in 3005 k

Test #18:

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

input:

5
1000
1 aaaadbaab
2 aaaadbaab aaaagbae
4 aaaadbaab aaaagbae aaabhab aaacakhd
8 aaaadbaab aaaagbae aaabhab aaacakhd aaacbcbaqe aaadacda aaadfagae aaaeaaaebr
16 aaaadbaab aaaagbae aaabhab aaacakhd aaacbcbaqe aaadacda aaadfagae aaaeaaaebr aaaeaekea aaaebbdfe aaajbbb aabaabgd aabaeefbfa aabakfbeb aabba...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query a 256
query akifaac 2
query al 1
query al 2
query al 4
query am 1
query am 2
query am 4
query an 1
query an 2
query ao 1
query ao 2
query ao 4
query ao 8
query ap 1
query ap 2
query aq 1
query ar 1
query ar 2
...

result:

ok Ok in 3044 k

Test #19:

score: 0
Accepted
time: 4ms
memory: 3608kb

input:

5
1000
1 aaaaaedd
2 aaaaaedd aaaab
4 aaaaaedd aaaab aaaabb aaaabc
8 aaaaaedd aaaab aaaabb aaaabc aaaadda aaaaeabb aaabaa aaabbcaabh
16 aaaaaedd aaaab aaaabb aaaabc aaaadda aaaaeabb aaabaa aaabbcaabh aaabbncfba aaabd aaabeda aaabi aaacaad aaackaaee aaadbaab aaadbc
32 aaaaaedd aaaab aaaabb aaaabc aaaa...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query a 256
query aghabcca 2
query ah 1
query ah 2
query ah 4
query ah 8
query ah 16
query ai 1
query ai 2
query ai 4
query ai 8
query aj 1
query aj 2
query aj 4
query ak 1
query ak 2
query ak 4
query al 1
query al ...

result:

ok Ok in 2925 k

Test #20:

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

input:

5
1000
1 aaaaaaakf
2 aaaaaaakf aaaaaadda
4 aaaaaaakf aaaaaadda aaaaacf aaaacaabc
8 aaaaaaakf aaaaaadda aaaaacf aaaacaabc aaaadbaa aaaafaia aaaafeaeeb aaabbcaa
16 aaaaaaakf aaaaaadda aaaaacf aaaacaabc aaaadbaa aaaafaia aaaafeaeeb aaabbcaa aaabceaaa aaabdbb aaabeda aaabiaagh aaacbcbaqe aaacbdf aaaceaa...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query a 256
query afedbaaa 2
query ag 1
query ag 2
query ag 4
query ag 8
query ag 16
query ah 1
query ah 2
query ah 4
query ah 8
query ai 1
query ai 2
query ai 4
query ai 8
query aj 1
query aj 2
query aj 4
query aj ...

result:

ok Ok in 2854 k

Test #21:

score: 0
Accepted
time: 4ms
memory: 3552kb

input:

1
1000
0
1 bagaoguesy
2 bagaoguesy bajdjjxkus
4 bagaoguesy bajdjjxkus bamxlzqrbg baqstjbgkd
8 bagaoguesy bajdjjxkus bamxlzqrbg baqstjbgkd baxomczwvf bbcczeqbln bbfivcdxcq bbkdokgwfw
16 bagaoguesy bajdjjxkus bamxlzqrbg baqstjbgkd baxomczwvf bbcczeqbln bbfivcdxcq bbkdokgwfw bbmbmkokgs bbvoexrygb bcaym...

output:

query a 1
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query c 1
query d 1
query e 1
query f 1
query g 1
query h 1
query i 1
query i 2
query i 4
query i 8
query i 16
query i 32
query i 64
query i 128
query j 1
query k 1
query l 1
query m 1
query m 2
query m 4
...

result:

ok Ok in 2571 k

Test #22:

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

input:

1
1000
0
1 babuzeiopu
2 babuzeiopu baekaudviq
4 babuzeiopu baekaudviq baerbtrcoo bajklhxyid
8 babuzeiopu baekaudviq baerbtrcoo bajklhxyid bajxsdfnaz bakbkywipe bakwsjgopl bamuoeesxn
16 babuzeiopu baekaudviq baerbtrcoo bajklhxyid bajxsdfnaz bakbkywipe bakwsjgopl bamuoeesxn bamvowdurh bapdftjwal baspe...

output:

query a 1
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query bm 1
query bm 2
query bm 4
query bm 8
query bn 1
query bn 2
query bn 4
query bn 8
query bn 16
query bo 1
query bo 2
query bo 4
query bo 8
query bo 16
query bp 1
query bp 2
query bp 4
query bp 8
query...

result:

ok Ok in 2972 k

Test #23:

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

input:

1
1000
1 aahisutiku
2 aahisutiku aakxjvgzfg
4 aahisutiku aakxjvgzfg aamvtdufhl aaprijqexs
8 aahisutiku aakxjvgzfg aamvtdufhl aaprijqexs abeysgmdvz abkhygxbld abyfnocctt acboavgdvp
16 aahisutiku aakxjvgzfg aamvtdufhl aaprijqexs abeysgmdvz abkhygxbld abyfnocctt acboavgdvp acrpgutmfc adaavgwzbu adkpbom...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query c 1
query c 2
query c 4
query c 8
query c 16
query c 32
query c 64
query c 128
query d 1
query e 1
query e 2
query f 1
query...

result:

ok Ok in 3245 k

Test #24:

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

input:

1
1000
1 adwrfxvqth
2 adwrfxvqth akykuvdgif
4 adwrfxvqth akykuvdgif aosgchfnkc apmnedzewx
8 adwrfxvqth akykuvdgif aosgchfnkc apmnedzewx arjntqhinl arkgjayddx avjczjvyww awvoeoenja
8 adwrfxvqth akykuvdgif aosgchfnkc apmnedzewx arjntqhinl arkgjayddx avjczjvyww awvoeoenja
1 bariprplmb
2 bariprplmb bbde...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query c 1
query c 2
query c 4
query c 8
query c 16
query c 32
query d 1
query e 1
query e 2
query e 4
query e 8
query e 16
query e 32
query e 64
query e 128
query e...

result:

ok Ok in 2661 k

Test #25:

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

input:

1
1000
0
0
1 cbepuznjbc
2 cbepuznjbc cbilnwqszh
4 cbepuznjbc cbilnwqszh cbnhflckuo cbrqmcwarn
8 cbepuznjbc cbilnwqszh cbnhflckuo cbrqmcwarn cbrwvaeoqj cbuvzuspvx cbvbibnvnn cdjdgylqpc
16 cbepuznjbc cbilnwqszh cbnhflckuo cbrqmcwarn cbrwvaeoqj cbuvzuspvx cbvbibnvnn cdjdgylqpc cdplbcgtyo cduoxeltku cdz...

output:

query a 1
query b 1
query c 1
query c 2
query c 4
query c 8
query c 16
query c 32
query c 64
query d 1
query e 1
query f 1
query g 1
query h 1
query i 1
query j 1
query j 2
query j 4
query j 8
query j 16
query j 32
query k 1
query l 1
query l 2
query l 4
query l 8
query l 16
query l 32
query l 64
qu...

result:

ok Ok in 2542 k

Test #26:

score: 0
Accepted
time: 4ms
memory: 3528kb

input:

1
1000
0
1 babktgvctu
2 babktgvctu bacckliudy
4 babktgvctu bacckliudy badycnijil baetozsvwo
8 babktgvctu bacckliudy badycnijil baetozsvwo bafkjjimwe bahqwfghge bakdzdncvx bakxnjuted
16 babktgvctu bacckliudy badycnijil baetozsvwo bafkjjimwe bahqwfghge bakdzdncvx bakxnjuted balwwpmrvk bamtkbtrfg baomi...

output:

query a 1
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query bh 1
query bh 2
query bh 4
query bh 8
query bh 16
query bi 1
query bi 2
query bi 4
query bi 8
query bi 16
query bi 32
query bj 1
query bj 2
query bj 4
query bj 8
query bj 16
query bj 32
query bk 1
qu...

result:

ok Ok in 2818 k

Test #27:

score: 0
Accepted
time: 4ms
memory: 3548kb

input:

1
1000
1 anpmcjtvhc
1 anpmcjtvhc
1 babqiytdti
2 babqiytdti backovxsdu
4 babqiytdti backovxsdu bacnnmlgfv badvigqcqh
8 babqiytdti backovxsdu bacnnmlgfv badvigqcqh bafemlfuaz bafvsugtiw bagguxpimu bagwdcjohm
16 babqiytdti backovxsdu bacnnmlgfv badvigqcqh bafemlfuaz bafvsugtiw bagguxpimu bagwdcjohm bah...

output:

query a 1
query a 2
query b 1
query b 2
query b 4
query b 8
query b 16
query b 32
query b 64
query b 128
query b 256
query bv 1
query bv 2
query bv 4
query bv 8
query bv 16
query bw 1
query bw 2
query bw 4
query bw 8
query bw 16
query bx 1
query bx 2
query bx 4
query bx 8
query bx 16
query by 1
quer...

result:

ok Ok in 2596 k

Test #28:

score: 0
Accepted
time: 4ms
memory: 3668kb

input:

1
1000
0
0
1 cadaytkjkd
2 cadaytkjkd cafzgsqgfu
4 cadaytkjkd cafzgsqgfu caqlhlglip casxpxqqoa
8 cadaytkjkd cafzgsqgfu caqlhlglip casxpxqqoa catxklbkrn caxsnclszq cayihgbkpv cbbdesifkj
16 cadaytkjkd cafzgsqgfu caqlhlglip casxpxqqoa catxklbkrn caxsnclszq cayihgbkpv cbbdesifkj cbggreijir cbghfxiqvo cbl...

output:

query a 1
query b 1
query c 1
query c 2
query c 4
query c 8
query c 16
query c 32
query c 64
query c 128
query cw 1
query cw 2
query cw 4
query cw 8
query cw 16
query cx 1
query cx 2
query cx 4
query cx 8
query cy 1
query cy 2
query cy 4
query cy 8
query cy 16
query cz 1
query cz 2
query cz 4
query ...

result:

ok Ok in 2835 k

Test #29:

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

input:

1
1000
0
1 bbebxtglxm
2 bbebxtglxm bdzpwcbwvo
4 bbebxtglxm bdzpwcbwvo bfurjatycr bmfsbdoxww
7 bbebxtglxm bdzpwcbwvo bfurjatycr bmfsbdoxww bpfvjcmlct bpmixrqzfb bylpzqlgxq
0
0
0
0
0
0
1 iabmdmtywa
2 iabmdmtywa iaemjvkjdy
4 iabmdmtywa iaemjvkjdy iakpsrcnhb iaowsmpxps
8 iabmdmtywa iaemjvkjdy iakpsrcnhb...

output:

query a 1
query b 1
query b 2
query b 4
query b 8
query c 1
query d 1
query e 1
query f 1
query g 1
query h 1
query i 1
query i 2
query i 4
query i 8
query i 16
query i 32
query i 64
query i 128
query iy 1
query iy 2
query iy 4
query iy 8
query iz 1
query iz 2
query iz 4
query iz 8
query ixzzs 1
que...

result:

ok Ok in 2916 k

Test #30:

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

input:

1
1000
0
0
0
1 dkthhcxrcq
1 dkthhcxrcq
1 eakgfiehic
2 eakgfiehic eaqjfngdky
4 eakgfiehic eaqjfngdky ebgxwpmnxx ebidmjgczs
8 eakgfiehic eaqjfngdky ebgxwpmnxx ebidmjgczs ebubwrmjdc ecdjuyzyjs ecmzzanhuc ecsnhvefww
16 eakgfiehic eaqjfngdky ebgxwpmnxx ebidmjgczs ebubwrmjdc ecdjuyzyjs ecmzzanhuc ecsnhvef...

output:

query a 1
query b 1
query c 1
query d 1
query d 2
query e 1
query e 2
query e 4
query e 8
query e 16
query e 32
query e 64
query e 128
query f 1
query f 2
query g 1
query h 1
query h 2
query i 1
query i 2
query j 1
query j 2
query j 4
query j 8
query j 16
query j 32
query j 64
query k 1
query k 2
qu...

result:

ok Ok in 2700 k

Test #31:

score: 0
Accepted
time: 8ms
memory: 3612kb

input:

5
1000
1 aaaiqwexnq
2 aaaiqwexnq aadjcquqdq
4 aaaiqwexnq aadjcquqdq aafaldvvzr aaflmsydwu
8 aaaiqwexnq aadjcquqdq aafaldvvzr aaflmsydwu aafwzaqmhr aafypzoakd aahtirtmve aaitvirspt
16 aaaiqwexnq aadjcquqdq aafaldvvzr aaflmsydwu aafwzaqmhr aafypzoakd aahtirtmve aaitvirspt aajkhyjujl aajwmyiykc aamnvri...

output:

query a 1
query a 2
query a 4
query a 8
query a 16
query a 32
query a 64
query a 128
query a 256
query ah 1
query ah 2
query ah 4
query ah 8
query ah 16
query ah 32
query ah 64
query ai 1
query ai 2
query ai 4
query ai 8
query ai 16
query ai 32
query ai 64
query aj 1
query aj 2
query aj 4
query aj 8...

result:

ok Ok in 3446 k