QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#698209 | #3305. LCS 8 | cjr2010 | AC ✓ | 2351ms | 4696kb | C++14 | 1.3kb | 2024-11-01 18:09:16 | 2024-11-01 18:09:17 |
Judging History
answer
/*
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 0x3f3f3f3f3f3f3f3fll
#define For(i,l,r) for(register int i=(l);i<=(r);++i)
#define Rof(i,l,r) for(register int i=(l);i>=(r);--i)
bool M_S;
const int mod=1000000007;
void add(int &x,int y){if((x+=y)>=mod) x-=mod;}
const int N=50005;
int n,m,f[2][(1<<6)][5],g[N],h[N];
char str[N];
void MAIN(){
cin>>(str+1);n=strlen(str+1);
cin>>m;f[0][0][0]=1;
For(i,1,n){
int I=i-1;
For(s,0,(1<<(m<<1))-1) For(j,0,m) if(f[I&1][s][j]){
g[I]=I-j;
For(k,I+1,min(n,I+m)) g[k]=g[k-1]+((s>>((k-1)-(I-m)))&1);
Rof(k,I-1,max(1ll,I-m)) g[k]=g[k+1]-((s>>(k-(I-m)))&1);
for(char S='A';S<='Z';S++){
For(k,max(1ll,i-m),min(n,i+m)) h[k]=max(max(h[k-1],g[k]),g[k-1]+(str[k]==S));
int t=0;For(k,max(0ll,i-m),min(n,i+m)-1) if(h[k]^h[k+1]) t|=(1<<(k-(i-m)));
add(f[i&1][t][i-h[i]],f[I&1][s][j]);
}
f[I&1][s][j]=0;
}
}
int ans=0;
For(s,0,(1<<(m<<1))-1) For(j,0,m) add(ans,f[n&1][s][j]);
cout<<ans<<'\n';
}
bool M_T;
signed main(){
// freopen(".in","r",stdin);
// freopen(".out","w",stdout);
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
// cerr<<"Memory: "<<1.0*(&M_S-&M_T)/1048576<<"MiB\n";
double T_S=clock();MAIN();double T_T=clock();
// cerr<<"Time: "<<1.0*(T_T-T_S)/CLOCKS_PER_SEC*1000<<"ms\n";
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3740kb
input:
ACAYKP 0
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
CAPCAK 1
output:
896
result:
ok single line: '896'
Test #3:
score: 0
Accepted
time: 1ms
memory: 3680kb
input:
WEDONTNEEDNOEDUCATION 2
output:
24651976
result:
ok single line: '24651976'
Test #4:
score: 0
Accepted
time: 1ms
memory: 3744kb
input:
WEDONTNEEDNOTHOUGHTCONTROL 3
output:
224129308
result:
ok single line: '224129308'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
ACAYKP 3
output:
4789698
result:
ok single line: '4789698'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
CAPCAK 3
output:
4984867
result:
ok single line: '4984867'
Test #7:
score: 0
Accepted
time: 1ms
memory: 3824kb
input:
WEDONTNEEDNOEDUCATION 3
output:
22786993
result:
ok single line: '22786993'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
KAIST 3
output:
1384274
result:
ok single line: '1384274'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
A 0
output:
1
result:
ok single line: '1'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
B 1
output:
26
result:
ok single line: '26'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
C 2
output:
26
result:
ok single line: '26'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
D 3
output:
26
result:
ok single line: '26'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
RUN 2
output:
5409
result:
ok single line: '5409'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
PSUULHCWHL 0
output:
1
result:
ok single line: '1'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
OVASGWSKVN 1
output:
2492
result:
ok single line: '2492'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
LWUBHKTOPO 2
output:
1207903
result:
ok single line: '1207903'
Test #17:
score: 0
Accepted
time: 1ms
memory: 3688kb
input:
AJLOYNZOBR 3
output:
210748912
result:
ok single line: '210748912'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
BALEZEXVDLJG 0
output:
1
result:
ok single line: '1'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
PCCCZLAHEYJY 1
output:
2991
result:
ok single line: '2991'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
ZYXMMJAVCCQF 2
output:
1903794
result:
ok single line: '1903794'
Test #21:
score: 0
Accepted
time: 1ms
memory: 3688kb
input:
ZCMLLLZQSDOW 3
output:
425094268
result:
ok single line: '425094268'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
PHVAVJWOCJXCLR 0
output:
1
result:
ok single line: '1'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
JOLIGQVHOTGHKU 1
output:
4888
result:
ok single line: '4888'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
XOCAQTLVCOLTLX 2
output:
5030491
result:
ok single line: '5030491'
Test #25:
score: 0
Accepted
time: 1ms
memory: 3748kb
input:
KSYAUEQWAEGPFF 3
output:
621029949
result:
ok single line: '621029949'
Test #26:
score: 0
Accepted
time: 0ms
memory: 3752kb
input:
NUGTENEBJSHVHXKN 0
output:
1
result:
ok single line: '1'
Test #27:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
JWVPOVQZBMXOQLKM 1
output:
6386
result:
ok single line: '6386'
Test #28:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
QQLFOVJVMEQGOBHQ 2
output:
7757339
result:
ok single line: '7757339'
Test #29:
score: 0
Accepted
time: 1ms
memory: 3880kb
input:
OYINSEAHRIHHETJB 3
output:
936564349
result:
ok single line: '936564349'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
DCQMOZZSQVICIKGZLW 0
output:
1
result:
ok single line: '1'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
RTIXCFAPMOQPVFVWZO 1
output:
8083
result:
ok single line: '8083'
Test #32:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
EEIPKBRXDZRZYDJABN 2
output:
12831727
result:
ok single line: '12831727'
Test #33:
score: 0
Accepted
time: 1ms
memory: 3748kb
input:
CHMAUTTYYVIUEPFZSV 3
output:
271916449
result:
ok single line: '271916449'
Test #34:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
KIMCYYYYZMQQTXGXWDBJ 0
output:
1
result:
ok single line: '1'
Test #35:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
HVKZYMPVIPQFXTCGYXJV 1
output:
9982
result:
ok single line: '9982'
Test #36:
score: 0
Accepted
time: 1ms
memory: 3692kb
input:
OXXGRYUWWPHDIDTAVFUI 2
output:
18069521
result:
ok single line: '18069521'
Test #37:
score: 0
Accepted
time: 1ms
memory: 3696kb
input:
ONBQZEBNLCGSWQJMLCSK 3
output:
679096242
result:
ok single line: '679096242'
Test #38:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
UUUUUUUUUU 0
output:
1
result:
ok single line: '1'
Test #39:
score: 0
Accepted
time: 0ms
memory: 3828kb
input:
LLLLLLLLLL 1
output:
251
result:
ok single line: '251'
Test #40:
score: 0
Accepted
time: 0ms
memory: 3880kb
input:
DDDDDDDDDD 2
output:
28376
result:
ok single line: '28376'
Test #41:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
RRRRRRRRRR 3
output:
1903376
result:
ok single line: '1903376'
Test #42:
score: 0
Accepted
time: 2ms
memory: 4572kb
input:
HQUWXLBTGTRUOODTQXRCFZHJONUEUDXUJSEVKIMEPLRWKWWQKCAQZSWHTOSBBEWTLNDOGYLDCPYTILRKAKHYVEWVHXIXVXCMMTCOVZCRDGCHZGCMJHOTFKHWRPLCAUMYFAILSNXBRXOIGMFOVXWXRQACPLMAKBOTCXECCDVRFPUGSDHLEQAEARIGMCLFQAJEFFLBSPLYVJHGLNWDMGGZPHVJLDVUJXAETWDJZPFNMKUOVAOYHEOMZDPQXHBCKPQLVYGWQHKZDFXKZXAPILWRDHDILBAELCQCRRSCRDIUCNRT...
output:
1
result:
ok single line: '1'
Test #43:
score: 0
Accepted
time: 35ms
memory: 4620kb
input:
RVRJTJQAVRCSAPFBDVGRMQEURXTLSTIYXITFBICIWIEEDXZNNNYULADHOWSYAICFFEAKZTNOKRXLYRAVAZXHYNZLDXISVFTETLEMNOTFYKVHEIEADSAEKOJMONKYMXPSKQOFSNDEBQMNNNXWESOLKZEHJNBHFFCISPDLKHACRIXJXASFPXEEMUOMEVOGWSWTGXQRSCULYYMUKQTOJKRUNECCPVYUVILYEGCEXUVROGMHAMFBRUETOZUVPATKONFOVCILIBIDYLDGIHTZQBZDEOUNUSNFWABZFOQRDXRMNIEB...
output:
68796748
result:
ok single line: '68796748'
Test #44:
score: 0
Accepted
time: 333ms
memory: 4648kb
input:
NISAPKXGGUZNNOKAVRLFFLMXUKKHALQZGLVGFTEZIJIGXSQNPPTQHUBKXNMTGNWCYKVIITRJOKVLGQCCAYVDBUWKNVNSJFQWGKPMURYGTVDPVLBWCNBAHTUNZWAXZVHPNSZVTDPMWEYHNGPFFANGPVSPVKKMUWRFHQDPAKVURHXYZXZXDDZTGBRQSBLHKMDNSTTYTJGQOLLJEFHXRFDTUWVXWDDGRQFGSREMZPREQLOONQKZZSEYAZRLKLYZIAGAZOODIQBHARPHFDRNMMCMVDKBOYQJLGBWVWFDKLIHUFOA...
output:
899592736
result:
ok single line: '899592736'
Test #45:
score: 0
Accepted
time: 2194ms
memory: 4508kb
input:
JPVAJPOTPZZRKSMHWUOGGARJFACLBXIFDCVCCRPFFRGBTLPOGTKLYDDQFLTSMNLLLXFIXDALVGFGBCGMRGDTGRYXFTNAVNTFWNWVQTJAKIKFQTIZHPBKJORQEYHRMZUTDHSWMBPEDRAVOIQLTCNYGJKSSBPKEKJCRIAYGLJJLYBRQJCHFYZRSGPUBZLPGSLCOCGQNZAPPVYDAVAFXNZLSZPUXCWPEENSZUZZKZILJAOXRSPIEZRZNOQLWAHKGFZKNKMAWFIYGNRWKGNZNEYMFKNEXFCPABIVPIFNDCIMTXUK...
output:
585665949
result:
ok single line: '585665949'
Test #46:
score: 0
Accepted
time: 2ms
memory: 4624kb
input:
YTXGIBVAGKTOEAOEFXKTEJZTFHJPIZSCGUCCQGHXSVAVQZBALZRPKNYPXLBIJZFXQUJNMCGZZJUWYNTZSKFXXTHVDKLJWSYALVVBBJLTYOAVFDFEFYIAVIEIQVRKZBSWWVOIXJKCGIIEZKAKWNEXTSUCBSFAFDKLITQRFIJMIITHYUJLFYHYPXNMZCQQTQYUDXXPBCJMTMHMPRJSSYGHYAXJYTIFPXNJIIWVCJVVLYXZMTFNZCFHHCNHXGRBHCOWACMCMNYCFPABMZIIXZONMPIDDRUKFGLYVKQTILJOOCGD...
output:
1
result:
ok single line: '1'
Test #47:
score: 0
Accepted
time: 43ms
memory: 4564kb
input:
LVNXQKLMVVWEDFSLSHDBLJMMJHJMBNIHMBLQVCNKUTYIZVQAHBFQVQTVKKZZXLZXIMPWXGTZPFUGABQFSACBXNSLGMQKWZCIOJBBNVFNEPTJVLYBVICUYCKIODBNRHRJAAVRORRHQYHBZUVCTFFGZQNYSQDCCVKPAEFKYIZNQJPEOIXOSJHPBYZZGUFNTVULEALKZZZMDURTWYIRXSXIAXCBBLHQTZRZTWPVLVKGGCYEUCFTWJSOLAKXLVBJSJDBNHIRKMEWQXKGJBCILOYYLFNDHUQGNDWRZUZBGJHQSLYG...
output:
54998437
result:
ok single line: '54998437'
Test #48:
score: 0
Accepted
time: 333ms
memory: 4568kb
input:
IUJKHOAKZJCMVZJYIOGRDREZQWDDRFPVSYTEYICNQYIVEXMTVRNBQSFFCWPGFWYLLQWHCOLBUNQMKGZWJPLTZZGHRHTIUJADFOBJMATZTEXJNKMYBYAHMNOMGEOCLAMGGDPPGRAMFJTWIVGVFLLHICSZSQWPTPOPJKIJFHIYLLMEUCYMSSLHTMUIYWRYRMQOEPZMLXADGUUBHEQTAFRLBRJNFAQVJAIIUYXVGFSCIAMUVMFLKXYTCZLJEOMUTNNFLEBLMMSYPKXERSKITEVAUVEEVPJQZLMTHVYSEBTQOWPI...
output:
965126013
result:
ok single line: '965126013'
Test #49:
score: 0
Accepted
time: 2191ms
memory: 4648kb
input:
WTIVAXYBTEKWRCYMXZYWKCBIHAXVWPGTSDYILHLBTWAIDPZNESOVDVEIHZOIOUJWCROZNAGBMMNZRKDPBFXHZENBHFAQBCSIAXOJNZMJXIKNKBXOXZHNDRLAYNIAZNPYNXSCAQBSFYFJMYECEVKXVZUUFPUSGTHNGWQRWLJSVLGWBXTHXXXJYZMQOEOGVXDCMPKMBDCVXGLKCEZLNHQKZZAWPFQKMIFQXUBKSCNTRIAWPIOIKSXMCOALHAWMEYPVXCRQGFKQZAGNJEHYAITPMWNIUVMGEMXUCARAWALDEALQ...
output:
390560171
result:
ok single line: '390560171'
Test #50:
score: 0
Accepted
time: 5ms
memory: 4652kb
input:
UGBNFRGZWFSLEHZQOBXHEHQMCDCUCFPTSLONDCTHJUZYMJQJTUVUOWTBFAUGMWZNEGOPPALDUKCVIUHHUEAWYNERVVBZAAMEYMGNHDUJADIJJZIKKHGOEBESEULLMFRAKUOOJBOTBVSEXOEZGBTJHQKSWWXMICNSNJLYGOCDKBYHZWDISRVFCGLQPOGOUSFWAOKKBZHNIVRQWPNVEAMMLUFMXKZFVKVEIRHJNNDBSDZWIDMICCROXCOLKWJPBKEKJFQNGEUXSZCPGDWBLUNPWUHNTNZSJBGLLWGNLFAWJHGL...
output:
1
result:
ok single line: '1'
Test #51:
score: 0
Accepted
time: 43ms
memory: 4508kb
input:
RKKYDFZZHLHTXBJNYQQXRSXJSVANTQFMIAPZOVNCOVFJADLHBRIPGJKXZGFAANJIMGGFHPDUMIOJIXYVACYOYKXDNTJFQWLREFNMZZBCSTGGFWQBODBLNBKKMJJOKIVRCPFTVXLODGYFSNPRZMDIFWPAFPSDBCSISINJBIYTKAVBJAWNXFDQKXPMMXXVDILWFBESTLJZZYEVXQQPPEHYEPSIXTEDLINKGSDFNXRPULEOZHUCBTLWXSNQTZBTETFPKZQTJQBYEBDNAFMXCNYPCWYYQWHSSOCBDHXZTMAZIBUS...
output:
37449596
result:
ok single line: '37449596'
Test #52:
score: 0
Accepted
time: 333ms
memory: 4504kb
input:
ZAVKTKUQPRYLTWTJCFXRLQHZVSGOLIVPPOOXSRAMUVVTORZLCIBMKPRGSBISNHAVGVPGFFSSBBWMLJBBUVCKOPQLMVNBFFDHJGTQVKGICQIWUMLFKJPXPZEXXBKSPBWXHFLHNGFISCEMJBLRPRCDPKHBIOHRTNSWYYDWXUPMNKMQIMSWLIUZJIJRIQBQOWJQRUHAZUSLGZDAEFVLHYLPHKLHUUVWBLZBPUDARSIWEANNHDSSIHPIBINQMGDNQBOLQWRURAZWLKDVHFCHXSVTMKPJGHMBFJEPZZHXPDVQYQZD...
output:
24231254
result:
ok single line: '24231254'
Test #53:
score: 0
Accepted
time: 2197ms
memory: 4496kb
input:
QPEEUFVTTONNZYXUXIZUSWQGEELIJPTOKNWLHBLEPFDNNFLJDUNBTATPMKIHRWVBILZVONKLEPXSYKPOEJSRHBDYZBDRHGYZNYBXTPKXCUPEITAXQDXXQRIDUCRNMBLZWUHSBFNNJMKUGXDVNUTXOHDFRPJJFZIBWMTDEQUSYWTRNHSZTHBTIZMCZKEJWFKNSBYAUFRZFSCMEYHBOGSDXJKIELQAMYTQJYYEANGRGHXTRNCYRKMLHLJBVMVVBFFTCLQHYOPTNIGMQIZXWSHZHUXROIUGYMYNCUWSUSAGPRUB...
output:
631309861
result:
ok single line: '631309861'
Test #54:
score: 0
Accepted
time: 5ms
memory: 4556kb
input:
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...
output:
1
result:
ok single line: '1'
Test #55:
score: 0
Accepted
time: 11ms
memory: 4508kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY...
output:
1250001
result:
ok single line: '1250001'
Test #56:
score: 0
Accepted
time: 37ms
memory: 4648kb
input:
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...
output:
235619534
result:
ok single line: '235619534'
Test #57:
score: 0
Accepted
time: 80ms
memory: 4504kb
input:
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ...
output:
300860434
result:
ok single line: '300860434'
Test #58:
score: 0
Accepted
time: 5ms
memory: 4580kb
input:
UTTUUUUTTUUTTUTUTUTTUUUTUUTTUUUUTUTTUTTUUUUUUUUTUTUTUTUUUTUTUTUUTUUTUTTTUTUTUTUTUUTUUUTTUTUTTTTTUTTTUTTTTUTTTTTTTUUTTTTUTTUUTUUUUTUTTTTTTTUTTUTTUTTTTUUUUTUTUUUTTUTUUUTUUUUTUTUTUTUUUUUUUUTUTTTTTTTTTUUTUUTTTTUUUTUUTUTUTUUTUTTTUUUUUUTTTTUUUUUTTUUUTUUTUTTTTUTTTUTTTTUUUUTUUUUUUUUTUUTTTUUTTTTTUTTUTUTUTUUT...
output:
1
result:
ok single line: '1'
Test #59:
score: 0
Accepted
time: 30ms
memory: 4556kb
input:
PVVVPVPPPPVVPPVVPVVVPPVPPPPPPPVPPVPPPPPVVVVPPPVPPVVPPVPPVVPVVPPPVPVVVPPPVPVPPPPVPPPVVVVVVVPVPPVVVVPPPPVVVVPVVPPPPVPVPPPPPPPPVVPVPVVVPVVPVPPPVPPPPPPVPPVPPVVPPPPVVPPVVVPVVPPPVVPVVVVVPPVVVPVVPPPPPVVPPPVPPPVVPVPPPVVPVVPVPVPPPPPPPVPVVVVPVPVVPPPPPVPPPPVVPPVPPVPVPPPVPVPVPPPVVVPVPVVVVVVVVVVVPPVPVPVPVPVPVVVP...
output:
224949790
result:
ok single line: '224949790'
Test #60:
score: 0
Accepted
time: 215ms
memory: 4572kb
input:
YYYYYOOOOYYYYYYYYOOYYOYOOYOOYOYYOYYYOYYYYOYYOOOOOYOOYYYOOYYYOOYYYOOOYOYOOYYOOOYOOOYYYOOYOYOOOOYOYOOYOYYOYYYOOYYYYOYOYYYYOOYYYYOOOYYYYOYOOYYYOYYYYOYOOYOYOOYYOYYOYYOOYOYOYOOYOOYYYYYYYYOYYYYYOOOYOYOOYOOYYYYYOYYOYOOYOYOOOOYYYOYYYYYOYYYYYYOYYYYYOOYOYYOYYOYYYYYOYOYYYYOOYOOYOOOOYYOOOOOOOOOOYYYYYOYYOOOYOOOO...
output:
625319531
result:
ok single line: '625319531'
Test #61:
score: 0
Accepted
time: 1148ms
memory: 4564kb
input:
HHHWWHHHHHHHWHHWHWWHWHWHWWWWHWWHHWWWHHWHWWWHWWHWWWWWHWWWHHWHHWWWHWWWWHWWWHWHWHHWWHWWHHHHHHWHHWHWHWWWHWHHWWWWWWWWWHWHWWWWWHHHHHWHHHHWWWHWHHWWWHWWWHWWHHWHWWHWHHHWHHHWWHWHHWWWHWHWWWWWHHHWWWHWHWWWHHWWWWHHWHHHHWWWHWHHWWHHHWWWHHHHHWHWWWHHHHWHWHHWWHHHWHHHHWWWWHWHWWHHWHWHHHHWHWWHHWWHWHWWHWHWHWHHWHWHWWHHWHWH...
output:
365827857
result:
ok single line: '365827857'
Test #62:
score: 0
Accepted
time: 2181ms
memory: 4564kb
input:
NQUJDETQPGFBCEUNSQWSODOXMIHRXNGZSKIWJRVYVXYILYTRLKCNZMBWYDBDBZYEWWADZPKMHAWEQZYUNLYSOWCGAJVTVHWZRXDZOWURKINQWRPIQWNBDEBMHCNGRKCXTEWKPLYHIZBGHHUEJPFCXKJOHMREKSGFTLVGEPMPUXPVYGHHRSBSRDIPSXCZGCPQHSKLGIOEMBQDWRVLIWWRDHMYUPINOLSBLIGCNTASIPKGGEHKDGYOMFJPEPCLQAFUKSSBWLELYSCERLPNCTVXHZBYMABBGCWJUTELVFNEEKMI...
output:
649966991
result:
ok single line: '649966991'
Test #63:
score: 0
Accepted
time: 2186ms
memory: 4696kb
input:
DJIWPNLFBCWEOWDYAXBXIFLJOZIAXEPQWVACSOINDWIWDDVCXEDLAYQOKQHWEZLYHZAJSMDAJGSWSRSYVAZGQDWZWKXCSMRIUKVHXLPSIRYZLWIOJJQMQUJYENSUHLCJQIWHHQUQDGSQOPHPWYNCKMDMBVDJQWMUVWDCMBMLQWDNSBIATECADQKVMCEXEEKLZDVDXJTHLCSLMTVQRWWKUBTEZVONLYTOHZGYPMYJKRWCOUETVNQGJXZOWJTHVARWYZMNCABYWDROKIXKLTBRIKZQNQTAKXMMVDMHYSEHUQEU...
output:
115129530
result:
ok single line: '115129530'
Test #64:
score: 0
Accepted
time: 2193ms
memory: 4508kb
input:
QEDKBHKDMIVEVGNHDHQYMMLPJPLVJXTTWPWNRXPIJAFTLQRSSAAQYDZZIUYJOXAJCPVIPOOMAJELAGANTZBSEVHEJKTBNIFDLJZFMKKKRSMQZFROCIGCJILUBXJWLSHRBBCGTSAAGFWKDTNMTEEAOGXIGBNDEWXUJHNMXTARNAJZUISPOBAORIOKFWPQYTCTJRLTKLPPQZDBHQIQFRMKRDSVMWFNEORYFRYAMZARMUYQJSPHWWWVOLOIGNMSWQZGEBAQUZXUHUHCMOMPOCAPIXZJURPLAOVUPVVLULWAHLIR...
output:
968898966
result:
ok single line: '968898966'
Test #65:
score: 0
Accepted
time: 2194ms
memory: 4560kb
input:
JNQGBARFSPMAATGUSWZHTSYOILQYCFMKZAKZCBCLTVYMYYEBEUGLDISUEMDMPQQTJNBKFALXBSFVFCNZRYCWWMIHNZSEAGQBUVHMGRLNDHBJZEIGMETWHZJYEQEIYXDHOETKDGWBFAWVPOSGMNEYOZHQUCRJBEDOPQRMPHDQCBROFRAPWMOFVIDRNPKLLQWZDHXSOJNKGQTBRJWYOVZVOLCWQPBMTEVNVYJEUCJUBHGPMIIBSKBZFXABJPRXBLTJDSSKRMYCMAHOCPYQECNMAQUCBHFPBIXWZISXRHJTXSIS...
output:
598291130
result:
ok single line: '598291130'
Test #66:
score: 0
Accepted
time: 2211ms
memory: 4624kb
input:
MOWJYFPCZMRMEDPZMOQYSLQQUOEYPCWRNOFQGKCRZSFBMAVWFERTIOKKRJHHQYHOPAHJXEPTEUMEUPKYFNRCJGCWREKLNHNCSIEUPGLBJERJXZHQNRGGFFSMYJRVYCSVSQWSYRVFLNBQMQDIZIEQXTHKASYBNTLEXLPXUDTIVUSMXSAPHVGXICCQTAKVVJPHRWLDTFGORSOQGFESHBJWWZHVOCXJBNNDZFDKCKEXQDRFHSMVITKRBGACQUEZVVHKHRDSKNKEXAIHAMRVHXNDUKJZFDVQBSGYIPRKTFUHTMCX...
output:
2290417
result:
ok single line: '2290417'
Test #67:
score: 0
Accepted
time: 2198ms
memory: 4632kb
input:
FQFHKZICRAGBFAYJZAGWIWGVMNYBQYHGPLZONXZKQPSFDCDQGKWLZXSTNRISGUIESJOPLCOOMNEHOSHMTMQOTYLAOWBCOELFVDURQKHJAWKUUVMRAEQIZTYDQUTSJFWGRJOTJTRPUTWXYEKYSSKJFTXPTNFFEMHUOGIOXAQYIEAZDGFTQNCAFLACABYNRSYRSLWCBWBCFAVMBRIANITGGHFSETZWGXETIMSNTOAUQOEDONAGCJLDUYOOFIBQBTHKHOGJAEZJDJRGBGWSABSXHANEMTXWWONLFHNFBYMJKISK...
output:
393173949
result:
ok single line: '393173949'
Test #68:
score: 0
Accepted
time: 2195ms
memory: 4628kb
input:
GMRIRBFEZVNJPVJJRJNTDGKSPAUNSOQWYCBSFTZWMGYDKAXQULQIWCYSRDWVQEAGDZORHAGTNQKSXZEMRNDBWEOHTIJFFTFUKLHWWTHDBKOJBYQEERLFOLLDHMRIQOYZAANHGIVDKZPQBYWAAIYERVHYSEVFMWMRBEWXLEZZKMLDJTAKTLZLJDVPFWYUPZUNCXWOHBKPDWKYEEJHIBPUNPVFNYVZAPWNQNZEUPKOMMOHMHYROHIYHUYYOCEZSPSPKGVSGUSBTWJIKLMDSVZYVRQZWGTETZXWSZIRQAOKHWIW...
output:
998873577
result:
ok single line: '998873577'
Test #69:
score: 0
Accepted
time: 2193ms
memory: 4568kb
input:
SYDEMFQOXVKJARUUFLEDRXTACXPOHGIFHOHJKDEDLJIMARKWZZNQDMARYFFQTNGGJTJELDIVRTNPXBTUZALCTLGSYQGSKGIYQHPRGQJEIOYBJUODDMIOHAXSZJCBWIRMYGMDOVYPXRPFMYWFYWGGQKOAZKMFOHMSDPJAZTHXSWQDINRMSMLIPXAUPQVHZEIULDFQRYTZJTZSDPRKLMBINIBKGUOWZHLACHTXNDLZYTPMMJVTSYXFRNJFXDPBVSURTGGLQYRYYZPDLKGTMEQZHCTTXJWDWWSUTPOVRGZCYPHU...
output:
670688677
result:
ok single line: '670688677'
Test #70:
score: 0
Accepted
time: 2199ms
memory: 4648kb
input:
AITDWHYKOWZOHEFRMLGFERMWNMSUFTVLCEVPUGKBABIPCHLYDRFIZRNPQGHGSULBNYCDOEPNJACRKCZROCONMPEOWSENIAYOEFBMLTYJOHDFCEXPNWSXVCIPTERGKBMGXUDPRJWVKFAFISFGALXTBCVGEVDTQLXSBZUPQLIRLMMPRLKSZXPUDIAGYRKAAYFESZWDBXFIPSVEQTNPWVLNKUYUNFWANPMNAMVLBLZDKYGCGBGOMIMPDOUSFAQGKKOEQUDCMVFMDPFYTAHOVRQJDHRTNYNPVUXALGLOOVLMLHGT...
output:
760913752
result:
ok single line: '760913752'
Test #71:
score: 0
Accepted
time: 2196ms
memory: 4556kb
input:
ZFGHHBFQNXXBPPCKWPRYBVOQWIJTRCIYNNQDPNTUAYGHNYYAJJRDXZGXWOTDKUWQVVCMKSLODCRVPVTXCSTXUGJALQNIDJDHNWQUAUKSDFMFRVXXMACJSGHHZQORNKXDNKLWBTBUQIWCNFDOQXEVONCDWSDCGEHPLFXLREWYKMUGBAUEUQXVRTXYXVLFOEYXVVBNPBIXSWEUVIEILSMWCONPMNRRDIYWACNDWAVDGOELTJHHLGCLHKYDICBQXUNTOUGIJNVTDQNCVGEEQYDZWQOVWVTBFKPCUHULCUSYRMNA...
output:
530642847
result:
ok single line: '530642847'
Test #72:
score: 0
Accepted
time: 2201ms
memory: 4516kb
input:
NMWIXNKZTOWQJJAKJGNJNUIWKNCKUHDLRKTEFMBHFORUXWPMFIHXWLMCNEVCCYTEDCLGIRRZZJISDBOEUGKIGQMBMGLYKAOKZPAVMXBOXONNSXCSHLGISZFGRNVLFFJCXXVWRXMMYRLHJLYUKRAPGTRAIQNZFVRAJHYUPOAOICEAQDWKEXFQHNHEVBSVKLWCHCVMPEAGZPWVTNRYTNJYDUHFJIEJLSDKIRMEDONPMTVVARMSGORTZROHVIQIGNGTIDOYOHVTFSYUPBWFSUJPXLUEHOSFBOYIGPLITFCBFXTQ...
output:
206907775
result:
ok single line: '206907775'
Test #73:
score: 0
Accepted
time: 2197ms
memory: 4648kb
input:
VPBFLOASRWECUJYTRUROLLGIHZQOXXWAXBYNTJBWIRHZELSAOFTTXUCAAMYJFBRHLOPAKDCSGRMAJJJXOXJALHDZPGBBKKCXGVERFMNFPCELBAAUCUYCZKCMOHALIQGJHPXFZMSXPLLDPGQVAZPUAVYBNGMLSQZFEGGKEVWIRYSLITOLGVYYGXSFNMNZNJVBMJWTJIQIKYXEUXCHUSCOPHZWJRTWOSWHUEBXFTVBQPYXWHXWMOLBELEOVVNLNKACCBEGDIEAVEGSFXWMZLZRGVTVFIIKAUBRCQIKAXGMFLRY...
output:
842261451
result:
ok single line: '842261451'
Test #74:
score: 0
Accepted
time: 2195ms
memory: 4564kb
input:
WZBHEZRHNKOORUUPQTXXWURAYGYLJJOHWIHVIGOIZWDVNUTTNLYRWZUPPQCGZBUGYOHNXEXGAMQMUYDKXVHIBFYUBHOFGOAVOIHXBRXPUCJLIORSCHJUGKRGAZMYHBTMORPUKADYQMRKZIDQGOBHUCURYNNBNVQDHUDAFQULENJPQYEHXKLIUKCCYNVDXWHWJGPTSTZKJAAVSGUYYOGBADZZRWNRUDSEGMMRJMAPTDMTKRUEAPPQBYUAQUZTCPLEKDDTBAGBRRYTQHLSLNXOBFTBVTJGKPIAGGCIFRDKZVUW...
output:
502335191
result:
ok single line: '502335191'
Test #75:
score: 0
Accepted
time: 2351ms
memory: 4504kb
input:
OCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZLPNQJDGRMFAYBOCKETSIHWVXUZL...
output:
433010414
result:
ok single line: '433010414'