QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#203280 | #7531. Hacking the Project | qzez | AC ✓ | 6ms | 4032kb | C++14 | 1.3kb | 2023-10-06 16:34:20 | 2023-10-06 16:34:20 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
template<typename T>
ostream& operator << (ostream &out,const vector<T>&x){
if(x.empty())return out<<"[]";
out<<'['<<x[0];
for(int len=x.size(),i=1;i<len;i++)out<<','<<x[i];
return out<<']';
}
template<typename T>
vector<T> ary(const T *a,int l,int r){
return vector<T>{a+l,a+1+r};
}
template<typename T>
void debug(T x){
cerr<<x<<'\n';
}
template<typename T,typename ...S>
void debug(T x,S ...y){
cerr<<x<<' ',debug(y...);
}
const int M=26;
int T,n,vis[M];
mt19937 rnd(time(0));
void get(){
cin>>n;
int lim=1,cnt=M;
vector<string>ans;
for(;cnt;lim=lim*2+rnd()%2){
for(int i=0;i<M;i++)if(!vis[i]){
if(cnt==1){
cout<<"query "<<char(i+'a')<<' '<<n<<endl;
int t;
for(cin>>t;t--;){
string s;
cin>>s,ans.push_back(s);
}
vis[i]=1,cnt--;
}else{
cout<<"query "<<char(i+'a')<<' '<<lim<<endl;
int t;
cin>>t;
if(t<lim){
n-=t;
for(string s;t--;){
cin>>s,ans.push_back(s);
}
vis[i]=1,cnt--;
}else{
for(string s;t--;)cin>>s;
}
}
}
}
cout<<"answer";
for(string s:ans)cout<<' '<<s;
cout<<endl;
fill(vis,vis+M,0);
}
int main(){
// freopen(".in","r",stdin);
// freopen(".out","w",stdout);
for(cin>>T;T--;)get();
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3808kb
input:
1 4 1 aaa 0 1 cxyxy 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 aaa aba 2 cxyxy czzzz
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query c 2 answer aaa aba cxyxy...
result:
ok Ok in 31 k
Test #2:
score: 0
Accepted
time: 0ms
memory: 3996kb
input:
5 1000 1 a 1 b 1 c 1 d 1 e 1 f 1 g 1 h 1 i 1 j 1 k 1 l 1 m 1 n 1 o 1 p 1 q 1 r 1 s 1 t 1 u 1 v 1 w 1 x 1 y 1 z 3 a aajm aavfegkci 3 b baaxqvzig bccurp 3 c cabvmqwafv ccqjnyveg 3 d dagwdwxsuf dase 3 e eai eamumkscvl 3 f faf fawaznbuw 3 g gawqvlr gaxd 3 h hah hbnumg 3 i iafjb ibeq 3 j jbda jdxgfhtgrd ...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2838 k
Test #3:
score: 0
Accepted
time: 5ms
memory: 3760kb
input:
5 1000 1 acbd 1 bayaeq 1 cbok 1 daevi 1 ebaavj 1 fa 1 gawqvlrb 1 hahc 1 ia 1 jafdktn 1 kat 1 lb 1 majph 1 natbaww 1 oampo 1 patmdlhmqe 1 qactfx 1 raca 1 sa 1 tadtninwc 1 ubjcmblwko 1 va 1 wahxylc 1 xaaacqrs 1 yaovqb 1 zauu 3 acbd acgts acvdflmn 3 bayaeq bbfomoiaww bbmz 3 cbok cbszcep cdyczmyfru 3 da...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2749 k
Test #4:
score: 0
Accepted
time: 5ms
memory: 3828kb
input:
5 1000 1 aaxqvzig 1 bcfsesgfb 1 caayipsojl 1 dbjifnrvw 1 eamumksc 1 fagppcoil 1 gamb 1 hbdfqbvc 1 iafmvkb 1 jamwvtxfqf 1 kaxsxwktfc 1 lahkprf 1 mcci 1 nbnsx 1 oaquu 1 pbminx 1 qacbdxw 1 rasz 1 sam 1 taurglbgm 1 ubiwqjdjh 1 vaex 1 wafvm 1 xavemciuqm 1 ybug 1 zapun 3 aaxqvzig abbaep actfxtivf 3 bcfses...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2885 k
Test #5:
score: 0
Accepted
time: 5ms
memory: 3716kb
input:
5 1000 1 a 1 b 1 c 1 d 1 e 1 f 1 g 1 h 1 i 1 j 1 k 1 l 1 m 1 n 1 o 1 p 1 qbgvgljhv 1 r 1 s 1 t 1 u 1 v 1 w 1 x 1 y 1 z 3 a aalilyz ac 3 b bbmigtq bbn 3 c cafbx cazyewqy 3 d dbexsgly dby 3 e eb ebaav 3 f fafq fbhohj 3 g gawqvlr gbk 3 h hacvd hbhphtjk 3 i iabzbrs ibptd 3 j jaaws jabwunyl 3 k ka kc 3 l...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 3178 k
Test #6:
score: 0
Accepted
time: 5ms
memory: 4008kb
input:
5 1000 1 abvmqw 1 bbmig 1 canwpofl 1 db 1 eaonqkrt 1 fa 1 ga 1 hai 1 iadtlc 1 jaopve 1 kcamv 1 lahkpr 1 ma 1 nagfevscf 1 oandfqjam 1 pa 1 qa 1 rahu 1 sa 1 ta 1 ua 1 vbrpp 1 waznbuwen 1 xav 1 ya 1 zcl 3 abvmqw acgt acoogjx 3 bbmig bbnxbhq bbsxqb 3 canwpofl casinzxcd cektfrdmo 3 db dbc dcbdcm 3 eaonqk...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2830 k
Test #7:
score: 0
Accepted
time: 5ms
memory: 3832kb
input:
5 1000 1 aavfeg 1 bahnzdwto 1 cafb 1 datx 1 eatdzw 1 fafqlbo 1 ganel 1 hahci 1 ibcbbmzbi 1 jcvhdec 1 kampswf 1 lalkb 1 maixwsq 1 nacxwl 1 oapjzkz 1 pcuuimo 1 qalswxs 1 raehzdlt 1 sac 1 tabvkspw 1 uaibgyc 1 vaadr 1 wbqjv 1 xbhqj 1 yaovqbivu 1 zbnduoa 3 aavfeg abogkwk abpwnr 3 bahnzdwto bay baz 3 cafb...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2901 k
Test #8:
score: 0
Accepted
time: 6ms
memory: 3764kb
input:
5 1000 1 a 1 b 1 c 1 d 1 e 1 f 1 g 1 h 1 i 1 j 1 k 1 l 1 m 1 n 1 o 1 p 1 q 1 r 1 s 1 t 1 u 1 v 1 w 1 x 1 y 1 z 3 a aaac aac 3 b bbee bbfomo 3 c caoc cb 3 d dbyfw dcx 3 e ebsc eciuclqu 3 f fafqlb fascsxa 3 g gaxd gb 3 h haoz hbdfqb 3 i ia iafmv 3 j jaaws jaopv 3 k kbblvnm kchn 3 l larjo lc 3 m mambzu...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2786 k
Test #9:
score: 0
Accepted
time: 2ms
memory: 3920kb
input:
5 1000 1 aaciqgnc 1 baapy 1 cab 1 dbfancn 1 ea 1 fc 1 ga 1 ha 1 iabzbrsk 1 jabwu 1 kaflgk 1 laqsal 1 mbpdtwnz 1 na 1 oag 1 pas 1 qaa 1 rawm 1 sa 1 tabvksp 1 uaggxcvb 1 vals 1 wafvm 1 xasca 1 ybaa 1 zaf 3 aaciqgnc aawtbc aayipsoj 3 baapy bbqkfl bbu 3 cab caqj cb 3 dbfancn dczatf ddk 3 ea eanf ebaavj ...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 3253 k
Test #10:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
5 1000 1 aagxaa 1 bbmifnu 1 cbbm 1 daskq 1 eai 1 faf 1 gaa 1 haia 1 iaaiso 1 jaqso 1 katjmppr 1 laiiymt 1 maqzqi 1 namdjxn 1 oaci 1 pahfbke 1 qaavfe 1 rafbqe 1 sac 1 tawoxi 1 ualgf 1 vbr 1 wazhbje 1 xabq 1 yaeqv 1 zagrf 3 aagxaa abjc acg 3 bbmifnu bccu bdcmjsf 3 cbbm cciab cdxewcul 3 daskq datx dcin...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 3051 k
Test #11:
score: 0
Accepted
time: 5ms
memory: 3696kb
input:
5 1000 1 aadbd 1 baczgkb 1 cadadn 1 daidcgg 1 eaaju 1 faalpahgag 1 gandpacjc 1 habek 1 iabahoj 1 jaaczjnicf 1 kaafyf 1 ladsdfa 1 maclk 1 nadgm 1 oblarbs 1 paadzha 1 qaddagbumk 1 racxzzj 1 saapzcab 1 tadadva 1 uajbkyzec 1 vddbkd 1 waxad 1 xalfddkhc 1 ybddfgha 1 zaaagkfan 3 aadbd aadbg aaemf 3 baczgkb...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2906 k
Test #12:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
5 1000 1 aabwpote 1 baaadas 1 caaiynpab 1 daaibptcfz 1 eaakzcz 1 faadbmm 1 gabaxalfd 1 halekcdrh 1 iaccfnzefc 1 jaakcds 1 kaafyfih 1 lalbdehaai 1 mafaicbje 1 nagzmozxfj 1 oazfjzio 1 paadzhadi 1 qacoxksddj 1 raaxefbfei 1 sajuqdga 1 tabnafaffm 1 uaccocdien 1 vcmdhjnazb 1 wgdzachyad 1 xabezqcfu 1 ybfwb...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2934 k
Test #13:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
5 1000 1 aaaac 1 baaad 1 caadidkda 1 daaeatmaj 1 eaajdabctd 1 fabzahdka 1 gaanfdadh 1 hacmga 1 iaadcahbfa 1 jaabategda 1 kabadcaos 1 lacbbcafd 1 maaqucne 1 nabfn 1 oaaddahaf 1 pabad 1 qacdf 1 rbbbr 1 saacbtcdga 1 tbglccfmib 1 uaajsuqei 1 vfgghpcccl 1 waaafidkku 1 xbiaedch 1 yagabwal 1 zabbnemecd 3 a...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 3059 k
Test #14:
score: 0
Accepted
time: 5ms
memory: 3760kb
input:
5 1000 1 aabbhcc 1 baacaedab 1 caadqibaca 1 daakiclage 1 eaaifebma 1 fabcaral 1 gaadtacbbh 1 habbbaadkj 1 iacbeqcaca 1 jaaboabfnb 1 kabbdbacc 1 labhcvbdb 1 mahdbagim 1 nagdajg 1 oaapabadn 1 paaieclbme 1 qacdfigpa 1 rbbdfbhlhe 1 sbecbbdh 1 tckfamkq 1 uaoaebf 1 vaafbnbbn 1 wcepvaeja 1 xbiaedchgk 1 yaa...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2994 k
Test #15:
score: 0
Accepted
time: 4ms
memory: 3760kb
input:
5 1000 1 aaaaaibb 1 baaaf 1 caaaelpu 1 daaaibs 1 eaaambc 1 faahh 1 gaabbbicei 1 haadca 1 iaakgfad 1 jabafae 1 kaacfaqbr 1 lacdql 1 maadzb 1 naeebjccjb 1 oabagabgs 1 pbfacb 1 qcabxlcbsa 1 rccaadeda 1 sbafahibd 1 taadaaab 1 uicicchs 0 1 wfeaa 0 0 1 zcefd 3 aaaaaibb aaabaa aaabceaid 3 baaaf baabk baadb...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2890 k
Test #16:
score: 0
Accepted
time: 1ms
memory: 3796kb
input:
5 1000 1 aaabfdi 1 baaadceai 1 caacaeda 1 daaabaolf 1 eaaaagb 1 faaegdebac 1 gabbehbb 1 hadbcee 1 iaabeeeba 1 jabcgbbhdb 1 kabgfkd 1 lafdbpaj 1 maadzbambi 1 naeebjcc 1 oaadkbc 1 pabegcme 1 qaacbtcdga 1 rbbbaedbg 1 sajeecbbaf 1 tcibfaid 1 ufajeccbh 1 vbesacjaa 1 wadbffc 0 1 ycaavaeeab 1 zdaebaab 3 aa...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2896 k
Test #17:
score: 0
Accepted
time: 4ms
memory: 3756kb
input:
5 1000 1 aaaab 1 baaaccaoe 1 caaaaie 1 daabefdc 1 eaaacib 1 faaaadb 1 gaadflgi 1 haaba 1 iaababicb 1 jaaeeab 1 kadaafeic 1 laaabbaaa 1 madbabddbm 1 naeebbeccc 1 obbabdae 1 pnaeb 1 qcgdaeea 1 racbbhaif 1 sbcmcdcec 1 taadaaab 1 ubcai 1 vdcdacaad 0 0 0 0 3 aaaab aaaad aaaaeddca 3 baaaccaoe baaacgagje b...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2892 k
Test #18:
score: 0
Accepted
time: 4ms
memory: 3772kb
input:
5 1000 1 aaaadbaab 1 baaadagga 1 caaaacbaca 1 daabafhaah 1 eaacbae 1 faagcbbdf 1 gaabcgada 1 haabaaadh 1 iaabbca 1 jaaadlh 1 kabbcbcaa 1 laaahckga 1 maabcacgc 1 nacblad 1 oaeebbec 1 pabbdbc 1 qdgfccaafb 1 rdaqiabla 1 sdabacc 0 1 ucfebcfd 0 0 0 0 0 3 aaaadbaab aaaagbae aaabhab 3 baaadagga baaafcbfe b...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2892 k
Test #19:
score: 0
Accepted
time: 2ms
memory: 4024kb
input:
5 1000 1 aaaaaedd 1 baaaaaaaaa 1 caaaababc 1 daaaaaddb 1 eaaagbbbc 1 faaaaaaac 1 gaahdb 1 haaaaacj 1 iaaabbea 1 jaaabbccde 1 kaabbdc 1 labjeca 1 macaae 1 nebaae 0 1 pabca 1 qddaa 1 rcbedaead 0 0 0 0 0 0 0 0 3 aaaaaedd aaaab aaaabb 3 baaaaaaaaa baaaab baaaabae 3 caaaababc caaaaeabbc caaaaie 3 daaaaad...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 3008 k
Test #20:
score: 0
Accepted
time: 5ms
memory: 3768kb
input:
5 1000 1 aaaaaaakf 1 baaaaad 1 caaaacbaca 1 daaaaaddb 1 eaaaabc 1 faaaebshf 1 gaadcegb 1 haaaajbibd 1 iabeaad 1 jaabbaaab 1 kbadabdaab 1 lacadba 1 mbabbakaa 1 naggaba 1 ogafahaa 1 pbiaaba 1 qaacbjjbad 1 rcbedae 0 0 0 0 1 wbafabbabj 0 0 0 3 aaaaaaakf aaaaaadda aaaaacf 3 baaaaad baaaaaka baaaabaedd 3 ...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query d 3 ...
result:
ok Ok in 2799 k
Test #21:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
1 1000 0 1 bagaoguesy 0 0 0 0 0 0 1 iadwiuhuul 0 0 0 1 mahzatptrv 0 0 0 0 0 0 0 0 1 vaaairmyxt 0 0 0 0 3 bagaoguesy bajdjjxkus bamxlzqrbg 3 iadwiuhuul ianqxstpto ibahquujsw 3 mahzatptrv makynpckdo maogkcjptj 3 vaaairmyxt vaaofrhqxr vacgbadpnx 6 bagaoguesy bajdjjxkus bamxlzqrbg baqstjbgkd baxomczwvf ...
output:
query a 1 query b 1 query c 1 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 z 1 query b 3 query i 3 query m 3 query v 3 ...
result:
ok Ok in 2612 k
Test #22:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
1 1000 0 1 babuzeiopu 0 1 dagtaojwhl 0 1 fbgxkameup 0 0 0 0 0 0 0 0 0 1 paaaieotlw 0 0 0 0 0 1 vachxbrzly 1 wafzksjmam 0 0 1 zahhxshcmo 3 babuzeiopu baekaudviq baerbtrcoo 3 dagtaojwhl dajhtkoabk damwaecnfp 3 fbgxkameup fbhagpmkuk fbodchitxu 3 paaaieotlw pegnpjocgh phjmnjvsec 3 vachxbrzly vacjfetyay ...
output:
query a 1 query b 1 query c 1 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 z 1 query b 3 query d 3 query f 3 query p 3 ...
result:
ok Ok in 3117 k
Test #23:
score: 0
Accepted
time: 1ms
memory: 3920kb
input:
1 1000 1 aahisutiku 1 bahhntxaqw 1 cagvieqsrk 0 1 ezbdevmmuz 0 1 gamosyaoqh 0 1 iaahshwshh 0 1 kabwxethzl 1 lwewhacibc 1 marnodzhmh 1 nyatsjbyaw 1 oljzvcwraw 1 paocelsrtf 1 qirczapbrn 0 0 0 1 udmvahtwrz 0 1 wbgipkjokc 0 1 yhpobikkis 1 zfqomqbyrn 3 aahisutiku aakxjvgzfg aamvtdufhl 3 bahhntxaqw bajmbo...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query e 3 ...
result:
ok Ok in 2215 k
Test #24:
score: 0
Accepted
time: 1ms
memory: 3756kb
input:
1 1000 1 adwrfxvqth 1 bariprplmb 1 caafsnhpjh 0 1 eacihotcds 1 fdhkizdgqc 1 gajmudviom 0 1 iabfpdqtzo 1 jbusjfkthc 0 0 0 0 0 0 0 0 1 sabfgyrvaf 0 1 uagjiicsdt 1 vaohtnrgbd 0 1 xcclrzlnal 0 1 zaglzersoz 3 adwrfxvqth akykuvdgif aosgchfnkc 3 bariprplmb bbdehlqkie bbdnupnpqe 3 caafsnhpjh cdjasccgme cgwh...
output:
query a 1 query b 1 query c 1 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 z 1 query a 3 query b 3 query c 3 query e 3 ...
result:
ok Ok in 3137 k
Test #25:
score: 0
Accepted
time: 2ms
memory: 4032kb
input:
1 1000 0 0 1 cbepuznjbc 0 0 0 0 0 0 1 jangnpiymj 0 1 laackwvqzq 1 manykzslud 0 0 1 pabpwglhtj 1 qacjadcsvn 0 0 1 tadlrvhlhp 0 0 0 0 0 1 ztrxfgazou 3 cbepuznjbc cbilnwqszh cbnhflckuo 3 jangnpiymj janttuwqtu jbzuygylwf 3 laackwvqzq laahyqzspp labejrzvie 3 manykzslud mbcjwdjakg mgabmfjcxs 3 pabpwglhtj ...
output:
query a 1 query b 1 query c 1 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 z 1 query c 3 query j 3 query l 3 query m 3 ...
result:
ok Ok in 3003 k
Test #26:
score: 0
Accepted
time: 1ms
memory: 3692kb
input:
1 1000 0 1 babktgvctu 1 cagxvcghvb 0 0 0 0 0 0 0 0 0 0 0 1 oaeggfpfky 1 pabuhwripc 0 0 1 swmcktejny 1 tbkmpmsadq 0 0 1 waakcwsjnz 0 0 0 3 babktgvctu bacckliudy badycnijil 3 cagxvcghvb cbaplkbhaj cdpbbmtfwy 1 oaeggfpfky 3 pabuhwripc pacecpvmgs paefvjaeby 1 swmcktejny 3 tbkmpmsadq tbultwytlf tbwylalff...
output:
query a 1 query b 1 query c 1 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 z 1 query b 3 query c 3 query o 3 query p 3 ...
result:
ok Ok in 2803 k
Test #27:
score: 0
Accepted
time: 1ms
memory: 3996kb
input:
1 1000 1 anpmcjtvhc 1 babqiytdti 1 cjqrgxmiml 0 1 eaadnyfyke 0 0 0 1 ifocrxtzza 0 0 0 0 0 0 1 pmnswpiniq 1 qabuziwiox 0 1 sbqxjqassk 0 0 1 vikogcgnag 0 0 0 1 zirsnlbvls 1 anpmcjtvhc 2 babqiytdti backovxsdu 1 cjqrgxmiml 2 eaadnyfyke eadqkbuzri 1 ifocrxtzza 1 pmnswpiniq 2 qabuziwiox qaqobkldgj 1 sbqxj...
output:
query a 1 query b 1 query c 1 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 z 1 query a 2 query b 2 query c 2 query e 2 ...
result:
ok Ok in 2575 k
Test #28:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
1 1000 0 0 1 cadaytkjkd 0 1 eadawukitu 0 1 gexwsftlku 0 0 0 1 kafjpejnpm 1 laascsiodw 1 mjgqhorzag 0 0 0 0 0 0 0 1 uaiipebmpd 0 0 0 0 0 2 cadaytkjkd cafzgsqgfu 2 eadawukitu eadgnhhaqo 1 gexwsftlku 2 kafjpejnpm kbdgflymdk 2 laascsiodw laceyfdivb 2 mjgqhorzag mklrsiutur 2 uaiipebmpd uauxnwoycs 4 caday...
output:
query a 1 query b 1 query c 1 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 z 1 query c 2 query e 2 query g 2 query k 2 ...
result:
ok Ok in 2397 k
Test #29:
score: 0
Accepted
time: 1ms
memory: 3760kb
input:
1 1000 0 1 bbebxtglxm 0 0 0 0 0 0 1 iabmdmtywa 0 1 kdcgdixwiq 1 lbewsywptj 0 0 0 0 1 qaafeyqakh 0 1 souqzkmxem 0 0 0 1 wakazlfhzc 1 xaaebcjrjz 0 0 2 bbebxtglxm bdzpwcbwvo 2 iabmdmtywa iaemjvkjdy 2 kdcgdixwiq kmpokdfdqg 2 lbewsywptj lcntwvsqkm 2 qaafeyqakh qabhzkdpdi 1 souqzkmxem 2 wakazlfhzc wakidqp...
output:
query a 1 query b 1 query c 1 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 z 1 query b 2 query i 2 query k 2 query l 2 ...
result:
ok Ok in 2062 k
Test #30:
score: 0
Accepted
time: 1ms
memory: 3992kb
input:
1 1000 0 0 0 1 dkthhcxrcq 1 eakgfiehic 1 fcikyttfvo 0 1 hnmzfakzkd 1 irbxwbzaum 1 jacmdavkix 1 kalkbyofhq 1 lbzshgmvns 1 mmirvzmcyb 0 1 oaakjxuowo 1 pwunbqnxby 0 0 1 sltalhnakx 1 tchuyuygic 1 ulhvczdptv 1 vagpgxcpik 0 0 1 yacaoxxjjb 1 znlumvtxph 1 dkthhcxrcq 2 eakgfiehic eaqjfngdky 1 fcikyttfvo 1 hn...
output:
query a 1 query b 1 query c 1 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 z 1 query d 2 query e 2 query f 2 query h 2 ...
result:
ok Ok in 2172 k
Test #31:
score: 0
Accepted
time: 3ms
memory: 3732kb
input:
5 1000 1 aaaiqwexnq 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 aaaiqwexnq aadjcquqdq aafaldvvzr aaflmsydwu aafwzaqmhr aafypzoakd aahtirtmve aaitvirspt aajkhyjujl aajwmyiykc aamnvriles aamotubelz aanjhaxtjv aanpnufnlu aanxeqwcui aaorahdigy aapdnumytf aarbiaepor aarnjuiyeu aaroebtfdu aarrn...
output:
query a 1 query b 1 query c 1 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 z 1 query a 1000 answer aaaiqwexnq aadjcquqd...
result:
ok Ok in 1076 k