QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#450675 | #6825. Expenditure Reduction | PetroTarnavskyi# | AC ✓ | 200ms | 22016kb | C++20 | 1.1kb | 2024-06-22 16:56:09 | 2024-06-22 16:56:10 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef double db;
int get(char c)
{
if ('a' <= c && c <= 'z')
return c - 'a';
return c - '0' + 26;
}
void solve()
{
string s, t;
cin >> s >> t;
int n = SZ(s);
vector<VI> nxt(n + 1, VI(36, n));
RFOR (i, n, 0)
{
nxt[i] = nxt[i + 1];
nxt[i][get(s[i])] = i;
}
PII ans = {n, 0};
FOR (i, 0, n)
{
if (s[i] != t[0])
continue;
int k = i;
int j = 1;
while (k < n && j < SZ(t))
{
k = nxt[k + 1][get(t[j])];
j++;
}
if (k != n)
ans = min(ans, {k - i + 1, i});
else
break;
}
cout << s.substr(ans.S, ans.F) << '\n';
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
while (t--)
solve();
return 0;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3780kb
input:
4 114514 15 shanghaicpc ac aaabbbaaabbbccc abc howdeliciousandfreshitis oishii
output:
145 aic abbbc owdeliciousandfreshiti
result:
ok T=4 (4 test cases)
Test #2:
score: 0
Accepted
time: 22ms
memory: 3568kb
input:
10000 9fk811aek6newrfy7hvdsln282g1dcpa829bum5x1lpfdq9qd6 9f8ek6newyvdn282ca29b5x1ld9q vg36oa5ncf4spe59gyplp1mi1or1hji2q0lcpubvxglbjjdyjm 365f4spe59glpm1oh2qpuvxjm h604exipq7eg5gvy1n06mugqlxqyqd5kao0u12rsrfs2m4lpez h60e70muglxyd5k0u1le 33kmdcvnzvmkyjylt2kvck8fiy32jabu0rcnbhogqrnfi3hj6j 3mdcnzkyjlvk8f...
output:
9fk811aek6newrfy7hvdsln282g1dcpa829bum5x1lpfdq9q 36oa5ncf4spe59gyplp1mi1or1hji2q0lcpubvxglbjjdyjm h604exipq7eg5gvy1n06mugqlxqyqd5kao0u12rsrfs2m4lpe 3kmdcvnzvmkyjylt2kvck8fiy32jabu0rcnbhogqrnfi3hj6 2f2ukqz1k3vbbs1x9o746i69vw675te94myxgqf0hesz0d6x4 12eqrshrg591ze2wjqpdcplm7ugkb9fo8v0xyk4r5ts4ikz86 akz...
result:
ok T=10000 (10000 test cases)
Test #3:
score: 0
Accepted
time: 23ms
memory: 3636kb
input:
10000 6cysrabtpdhyfa680e7we7y2iyzszuknxcecsiumsumvpafaia thyfa8e7yzsknxccmmvafaa rq6siapzyeqi5lzp7ilxyrdps65lsqcsg8mggea0imxu7yenjs rqiazy5lp7lypcs8gge0ixyens 9u6kjiebgugm7sw7bbs172rh5z5s3vrghq81yy2q5pnh5oem5w 6kieusw7bbs7rz53vg1yqpnh5e5 ggjmpuw3a23s3pjhuh3v7x6nw9b573r6jxpoaz9txh11hc9ikz gjm23s3pu36...
output:
tpdhyfa680e7we7y2iyzszuknxcecsiumsumvpafaia rq6siapzyeqi5lzp7ilxyrdps65lsqcsg8mggea0imxu7yenjs 6kjiebgugm7sw7bbs172rh5z5s3vrghq81yy2q5pnh5oem5 gjmpuw3a23s3pjhuh3v7x6nw9b573r6jxpoaz9txh11hc9ik cerj5uygs85eklvmpjoihdrwlemdkantywth7lvlvbj9mscu9 goe9iw7n8xu52ywzi4dy1umik9f30wa7hn8wye3nb3jj2c co2vv5xffek...
result:
ok T=10000 (10000 test cases)
Test #4:
score: 0
Accepted
time: 23ms
memory: 3632kb
input:
10000 svla166dvrllf9ze28r00vhp38maebj7l0r9wraw9q4bn0wu5b va66drll280vhp8ae7l09r4bu5 4cg2youkigm85sgxmd4ebg1bjeuv8klks8h4c7p0prasz2ucmk 4c2yokid4b1juvs4c0raz2um 54lpldj9yg0dl6yj3z821qzdfwqegrtr6a66wph0cxgezh8qkw 5l9yd6yj1zfwrr66cxgez8qw 1rlxhnkocrpz7yym42nrvdvyn458ioy7wivdhhxyvr5q56ib3t rxhkocyym4rvd...
output:
vla166dvrllf9ze28r00vhp38maebj7l0r9wraw9q4bn0wu5 4cg2youkigm85sgxmd4ebg1bjeuv8klks8h4c7p0prasz2ucm 54lpldj9yg0dl6yj3z821qzdfwqegrtr6a66wph0cxgezh8qkw rlxhnkocrpz7yym42nrvdvyn458ioy7wivdhhxyvr5q56ib gdew5j34ja8iddldwrvzgpayaf0bwj9noby27tglxci0uq4ed 61fr8e7hxmtrszb7tmqgvskg6bn68azbjpuj9bycsoe8jjzuix s...
result:
ok T=10000 (10000 test cases)
Test #5:
score: 0
Accepted
time: 19ms
memory: 3856kb
input:
10000 fv2mwmg9hmqrmwwtmoohy44w4hct7f7vqgm6gqxzg1f6m41knn wg9mrmmhy4c7qmgz641kn iqx3ry9cplusrblrx0x50tzgxxoorfxhmzb2b3tx9dptwujyiv q3csrbx5tzgf2btdtwyiv 24s5jwn9bswkac5c18i3xbki8b60h56w77f4ur2o42ornbk8iq 2s5jbsa3bb60hw7f4r42ornk8i sre8m6anb8wgkhdbncj211d60vpf2wfqsob4mjmds7doqwslaf mnwgkhbncj110vp2qob...
output:
wmg9hmqrmwwtmoohy44w4hct7f7vqgm6gqxzg1f6m41kn qx3ry9cplusrblrx0x50tzgxxoorfxhmzb2b3tx9dptwujyiv 24s5jwn9bswkac5c18i3xbki8b60h56w77f4ur2o42ornbk8i m6anb8wgkhdbncj211d60vpf2wfqsob4mjmds7doqwslaf qj7e0yxrut3s8ahbi4bwjrk1kdaezbe0j8wvvt4i2or0mp jx6gjajme9l995wjvdld5tzo0wbwqsduob4wg9pwvgjub6pqb vz1xhkdpwf...
result:
ok T=10000 (10000 test cases)
Test #6:
score: 0
Accepted
time: 24ms
memory: 3640kb
input:
10000 81dlg0rmlp9a2l31r4uk2f6d853fc8t39sejyioagsh0us7ew7 mp92ruk2f6d83fc39jigshuew 3861lu9p95ljn5qpk942tjitzepd0gzdjsdgu0msljrman9211 6u95ln5qp94tized0zjsduslra1 r8gmbt2g8swb8w83pfzw6hncq7akoh4swn2fmpg28jakkyh9g9 r8bgs8w83pfzw6ck4s2mp2aky9g9 eymebzo1z1icb0phl3af9m7zi1pf9cd1n9qvd4ugtl8fxnstn1 eymzo1z...
output:
mlp9a2l31r4uk2f6d853fc8t39sejyioagsh0us7ew 61lu9p95ljn5qpk942tjitzepd0gzdjsdgu0msljrman921 r8gmbt2g8swb8w83pfzw6hncq7akoh4swn2fmpg28jakkyh9g9 eymebzo1z1icb0phl3af9m7zi1pf9cd1n9qvd4ugtl8fxnst j7pvu828hq16o69ixnshvy34aykon2qeqfhjyx8odazekvrz9n b4qrjct4ywk1ag9klvli5dlajmpszjpy3sby18uglsrrlc86qd xcdgkrj...
result:
ok T=10000 (10000 test cases)
Test #7:
score: 0
Accepted
time: 23ms
memory: 3632kb
input:
10000 btz0nhud6lz2nd7t7urspfqaso32w0lo71cux6eq6k8pswc0dx zhuz2d7trfas320l716q6kscd t4h2gigi5201u4b34ivmixdigtne7k13vzklf04akxuuq76k7k t42gig52143vtnk1vzk04kqk bu7nwwtd9o035tjzsm0kf8243bh4m2s8j5cds7v19wwwa8m78k u7wwt9o35tjzsmk23mjds9k 85p2obgf0tnacu251i6axptekaq2njjuwuknmr4xkiep3kso3a p2nac16aptek2jj...
output:
z0nhud6lz2nd7t7urspfqaso32w0lo71cux6eq6k8pswc0d t4h2gigi5201u4b34ivmixdigtne7k13vzklf04akxuuq76k u7nwwtd9o035tjzsm0kf8243bh4m2s8j5cds7v19wwwa8m78k p2obgf0tnacu251i6axptekaq2njjuwuknmr4xkiep3kso3a 8hzmvrhblm09rmbixno48i3ost2c4yysvp74ep1c6po6ciybev yjeruif6xanypl9nekkrrbgeqd6gtoz3mzls0rp31y1oq7u0f b77...
result:
ok T=10000 (10000 test cases)
Test #8:
score: 0
Accepted
time: 23ms
memory: 3572kb
input:
10000 v1e3mt9il34t4wc3hmaae3u8p32vxzcp4yl76fruo5k4bnpali ve3t9l3t4cmaae83vzcpfuo5al vker5kk4iffrke60k1p47j04rthhurr8n2pwwe85wjknoculqy ker5kifre6p7jrhnpwwjknuy czrw3ayajdofgbkd8tto919ov8g93iq015r27696os0xjutnk5 waadgbkd8tto9199i1r276osxjn5 4zxg00fpbgjwr2zxrp42q0ecrc6ng1f3fuqdp0bz1roqsnxc79 zxg0fgj2r...
output:
v1e3mt9il34t4wc3hmaae3u8p32vxzcp4yl76fruo5k4bnpal ker5kk4iffrke60k1p47j04rthhurr8n2pwwe85wjknoculqy w3ayajdofgbkd8tto919ov8g93iq015r27696os0xjutnk5 zxg00fpbgjwr2zxrp42q0ecrc6ng1f3fuqdp0bz1roqsnxc yijtcj7mtcbrtq2stidvtab9482j5car3ubhzu4efu3pvl sugmncs8pek99gdivqze4vwofnjpjdaakkethdgkh9sqnh9 1kzd5ksxk...
result:
ok T=10000 (10000 test cases)
Test #9:
score: 0
Accepted
time: 19ms
memory: 3624kb
input:
10000 b6zb0tqa6l4ghc5smhnz173f7tuj017tj11ntj9d1ikn26tsid zql4csmhn13f01jd1k2ti be6ce19orr3iqn0nbd1002kruwbbmvnsyu18tstt5cebg3hvul b6iqn002kruwbbmutebghv hnxb53lm4jo4ed0qulke4d5oyg2zs4tot698kl9nnsa13g7qej hb53lm4edqul4d5oyzs4tokl9n1qj bat0tusriw6ei3dnzsmopysqr9sfmaw6poywj8gw62q0jkhpgx aw6i3nsmpqr9smw...
output:
zb0tqa6l4ghc5smhnz173f7tuj017tj11ntj9d1ikn26tsi be6ce19orr3iqn0nbd1002kruwbbmvnsyu18tstt5cebg3hv hnxb53lm4jo4ed0qulke4d5oyg2zs4tot698kl9nnsa13g7qej at0tusriw6ei3dnzsmopysqr9sfmaw6poywj8gw62q0jkhpgx bvtexqm4mnkhf3r71pszdjzixgh48w0w414v1wfjl4 pndgjf0pxob3ooofypk1kejm9f4siiqf0f2b0a3pwj3l4ep z4whk85yn91...
result:
ok T=10000 (10000 test cases)
Test #10:
score: 0
Accepted
time: 23ms
memory: 3868kb
input:
10000 hv0le8qb6yl9154rtuy15lgmik17i130r7a32f0fz6k00v0lad v0leqlrtulmk71302f0fza ngffpf1uqkw1bajzlf30zk3089s7owka7vbth4dqj84odm5we7 fp1qbaz309s7owkvbth4qj84odm5e7 ke33ah582jutnvdd4bem4esq177kuieec72qwg61n8235gt17s k3h58udmes17kc2wg6n835gt1s ryg4nds8q1p611ntw7vhe5oghppout2q4dm6r8pal7esrg81x0 ynsq161tw...
output:
v0le8qb6yl9154rtuy15lgmik17i130r7a32f0fz6k00v0la fpf1uqkw1bajzlf30zk3089s7owka7vbth4dqj84odm5we7 ke33ah582jutnvdd4bem4esq177kuieec72qwg61n8235gt17s yg4nds8q1p611ntw7vhe5oghppout2q4dm6r8pal7esrg81x0 t8etwcgg51ujdp1qr3lf5a6mhj883vnqf3iszvb4mx461f3l 4vhx9hwnm2id332ecph1o8994wfpf2j5xaoki4fhb0glsph5d oej...
result:
ok T=10000 (10000 test cases)
Test #11:
score: 0
Accepted
time: 23ms
memory: 3812kb
input:
10000 mvjr9wrjjuidw84p0o0mmi9khovk24f8om0vbvpe9i8efr2h50 mwjji40omhok480bpif2h50 57pnyfekpxw1mqwd6bvu9tssyrqxgbr3y2myl2o0ceiwrx8014 5pnyfkmw69syrqr3y2yl0cer801 bboqu5tg08yn0idu5fxhao8qmlqunhz752snuy5ndb1wf85cvo bboqugy0i5fxhqhz72ndb1f8o rc8yreps56y3tdynea756plcqc0njh8y8frnfg5rxqu8p1jmkh rcrs5yne76lc...
output:
mvjr9wrjjuidw84p0o0mmi9khovk24f8om0vbvpe9i8efr2h50 57pnyfekpxw1mqwd6bvu9tssyrqxgbr3y2myl2o0ceiwrx801 bboqu5tg08yn0idu5fxhao8qmlqunhz752snuy5ndb1wf85cvo rc8yreps56y3tdynea756plcqc0njh8y8frnfg5rxqu8p1jmkh g07g36dm1t7klkumyb729xm7uv5pn36ee4dz9k05xyp59ck ebc8gurlppi85luptlg0h0no3q5k8kvbl5bivfp6ur38jib3 ...
result:
ok T=10000 (10000 test cases)
Test #12:
score: 0
Accepted
time: 37ms
memory: 21772kb
input:
5 qypxgjbizdkyhvw7qp90lcd4eezlqobnqsvp5y0titdnovtjxfh4n9pig5rm0dt5k86daey4a8q4nid0jcs3j4k294fgywoa4ucm8mt8zjuqwzmzqrluelnc4bb2mf1g77riftb96i2hxu5nl2tv7nwnsj65qpvfugm9lkm0glwolsw4milch4nmm5dv11bj46e6ekrpmqgwqondwqqec0x71gnkf05jzml87vbqj23paosppeuq9q5ggxu5gwc45vj2lj1hfzzlzjncarv92purs4bwd4sgl9hwcn9n8m...
output:
ypxgjbizdkyhvw7qp90lcd4eezlqobnqsvp5y0titdnovtjxfh4n9pig5rm0dt5k86daey4a8q4nid0jcs3j4k294fgywoa4ucm8mt8zjuqwzmzqrluelnc4bb2mf1g77riftb96i2hxu5nl2tv7nwnsj65qpvfugm9lkm0glwolsw4milch4nmm5dv11bj46e6ekrpmqgwqondwqqec0x71gnkf05jzml87vbqj23paosppeuq9q5ggxu5gwc45vj2lj1hfzzlzjncarv92purs4bwd4sgl9hwcn9n8mi5t...
result:
ok T=5 (5 test cases)
Test #13:
score: 0
Accepted
time: 40ms
memory: 21700kb
input:
5 ixb1x4p7o6ewa8hld5v1242v4iyqxfzj5sjtifhhx986xlf03yjjebftnjc871e1589mf1kun2sfhgazqzmkv995ocouzn1c8ul435x0h4p20dojdeo4g0qf53nbeokt10fcwii8d49ot8oel4dtr1z33x7oygy97764qafzpd7lxaiuq9stf7ie9urp1deoghdf298lu2ddqxcodfvxabh0j3he7ae8tdaldc7awia58jbnrqmt8iqty61fu896zlksvo6kdoph1wuapq8xaacuvjtektromtahqgyync...
output:
p7o6ewa8hld5v1242v4iyqxfzj5sjtifhhx986xlf03yjjebftnjc871e1589mf1kun2sfhgazqzmkv995ocouzn1c8ul435x0h4p20dojdeo4g0qf53nbeokt10fcwii8d49ot8oel4dtr1z33x7oygy97764qafzpd7lxaiuq9stf7ie9urp1deoghdf298lu2ddqxcodfvxabh0j3he7ae8tdaldc7awia58jbnrqmt8iqty61fu896zlksvo6kdoph1wuapq8xaacuvjtektromtahqgyyncnb7pflto...
result:
ok T=5 (5 test cases)
Test #14:
score: 0
Accepted
time: 33ms
memory: 21800kb
input:
5 nms93b23r3xbulfoyigc9c7lt87pu393p9pspzjqr6i2y89ygm8sepk3lgg3q5hyk8r3863rox8ay2l37cwbx15nyg67bc3nfbpesnjq5rtpvnr76yt02e9gehuus842gj0y9570mh5pxjey4kdcwpie8va87n3q00b4yjcb6b79cc5inxkmywclnn7sskvznbwen56yql1sghdtavje3x2nodhhxr1qb8wbsqt3mg0dw1fgd7xhln4y4t58nksvorg3ouxegiwddngmocxt8c3v19e7i460owklshdc86...
output:
s93b23r3xbulfoyigc9c7lt87pu393p9pspzjqr6i2y89ygm8sepk3lgg3q5hyk8r3863rox8ay2l37cwbx15nyg67bc3nfbpesnjq5rtpvnr76yt02e9gehuus842gj0y9570mh5pxjey4kdcwpie8va87n3q00b4yjcb6b79cc5inxkmywclnn7sskvznbwen56yql1sghdtavje3x2nodhhxr1qb8wbsqt3mg0dw1fgd7xhln4y4t58nksvorg3ouxegiwddngmocxt8c3v19e7i460owklshdc869d2n...
result:
ok T=5 (5 test cases)
Test #15:
score: 0
Accepted
time: 35ms
memory: 21704kb
input:
5 8n13q563el45qjvpsvgylwbjpkh7cg2nd0y46ekr7v832hvlyyyyebptgn5dtgd0mk3jo1fic5ux57fh64sr742a0w2lcvw0xkhwrqxao4jqnjax1dxhjdrf9jzhcgni0bs3h3tmfoy285g0enxvmpi9eoo06a4l11p95grax49pxmpniee6iimp43xbrvylc41lnjkzuipdgt9h9rltr50dkozoyogqjcnq589n2vmzy3hbsenjenzcyibm21nlj689v89sjzi08inqdx0oo6yfl35fv1kbew75zc6004...
output:
nd0y46ekr7v832hvlyyyyebptgn5dtgd0mk3jo1fic5ux57fh64sr742a0w2lcvw0xkhwrqxao4jqnjax1dxhjdrf9jzhcgni0bs3h3tmfoy285g0enxvmpi9eoo06a4l11p95grax49pxmpniee6iimp43xbrvylc41lnjkzuipdgt9h9rltr50dkozoyogqjcnq589n2vmzy3hbsenjenzcyibm21nlj689v89sjzi08inqdx0oo6yfl35fv1kbew75zc6004heobp8y4mqy9bp3hfqlkck2b6p6ci98st...
result:
ok T=5 (5 test cases)
Test #16:
score: 0
Accepted
time: 31ms
memory: 21708kb
input:
5 zczckb5jkxylwrhujwsyq3wsynb1l1pl4k6m6sypdhxi0e6b7yr7iw3z75x2wgk4zuh32mygk0zndby8t97nldryhy8gktiisz3hmzngbun4nfq6283fy1hjzuaslun9t40xh1fvg43sytf34ivznedpoefrt0jdf52t7l0xvt8q9tk3l39q10r8jsvs5dn4wg44931xs7h2w3s5gsu5efxg0jv6rsgupm6hpe5m2bdhq4ulhafcozg65y7wapialzs2k7tvnwvl9nyq418q15viuk81wkzyhco1ehe3p8...
output:
5jkxylwrhujwsyq3wsynb1l1pl4k6m6sypdhxi0e6b7yr7iw3z75x2wgk4zuh32mygk0zndby8t97nldryhy8gktiisz3hmzngbun4nfq6283fy1hjzuaslun9t40xh1fvg43sytf34ivznedpoefrt0jdf52t7l0xvt8q9tk3l39q10r8jsvs5dn4wg44931xs7h2w3s5gsu5efxg0jv6rsgupm6hpe5m2bdhq4ulhafcozg65y7wapialzs2k7tvnwvl9nyq418q15viuk81wkzyhco1ehe3p8ev9fk84k...
result:
ok T=5 (5 test cases)
Test #17:
score: 0
Accepted
time: 29ms
memory: 21764kb
input:
5 p5vf5j83stv27spmlg07jdl8msdgxacn8baedp142rnwxxly6jryveywjua475n7gvkrtzmnjtydc7q533jx3lx59b4r3ih188snm1atd967d961cfqwr1ph1oxaj6rsxsa5tz3lvvozx6nvejv1ii3rpspge9rn0yv00icyw8boffykqkusx110o4t6wkiv0jdwa8uo4qk5a6lkno7z4k8snzi2jvpf7qzf1iyg21ps9vyjg1f1fya7wsbnslg7f3phof2sgee5oop1barmhftf67ilop7iyym0orbimx...
output:
8msdgxacn8baedp142rnwxxly6jryveywjua475n7gvkrtzmnjtydc7q533jx3lx59b4r3ih188snm1atd967d961cfqwr1ph1oxaj6rsxsa5tz3lvvozx6nvejv1ii3rpspge9rn0yv00icyw8boffykqkusx110o4t6wkiv0jdwa8uo4qk5a6lkno7z4k8snzi2jvpf7qzf1iyg21ps9vyjg1f1fya7wsbnslg7f3phof2sgee5oop1barmhftf67ilop7iyym0orbimxtjvmmgqa2zs1mlxcej730cwxy...
result:
ok T=5 (5 test cases)
Test #18:
score: 0
Accepted
time: 31ms
memory: 21704kb
input:
5 onzxzn95lte1zsjj9vlfdkxz0mljyntvdz44z8ijjll0g4nnxo6n5o0vt2zmkd2ekj9n96wtf5wt3ckyy6dscj1cr6mmnytiax69c8k059b92t5ipksoogw927hvqnpvkygpeqs1euqayvoklwyswwr2c06pyc0noyw16ujwqxz3g5i68a2dt7yd25p3hqzx5whpdnr5xht4zlfglv53xkmn4kcraxpde0y1god6oja60dayl0ijfs070ejonbza59ridj3v6v4zkcyaddn21kt89en1aeq0vy7lf5xm3r...
output:
lte1zsjj9vlfdkxz0mljyntvdz44z8ijjll0g4nnxo6n5o0vt2zmkd2ekj9n96wtf5wt3ckyy6dscj1cr6mmnytiax69c8k059b92t5ipksoogw927hvqnpvkygpeqs1euqayvoklwyswwr2c06pyc0noyw16ujwqxz3g5i68a2dt7yd25p3hqzx5whpdnr5xht4zlfglv53xkmn4kcraxpde0y1god6oja60dayl0ijfs070ejonbza59ridj3v6v4zkcyaddn21kt89en1aeq0vy7lf5xm3rdmgmdt8u0l...
result:
ok T=5 (5 test cases)
Test #19:
score: 0
Accepted
time: 27ms
memory: 21700kb
input:
5 gcgcjceb9hwjcb3ki5mxr2f33moj5hoss2t7vg0mhs9v7w8pjnlr0h5623snn84uk9clu9i8es7rxpjqpmyoia7s1aro7hidqi93rgud802d97zz6afr73j4pvuuids855wb4a95a7jm041pjb5mpexhklkc2s5opuyq81wex3wbjdn2lqi6dfz2ov7f0ys6719r2gteuyw2hft57pr81o1a2zvw8ostcqv70dbxubb1y2xx27ef4ywg0p1rihuimnwk0zav1hsyhzipdjvrhmnyvwv1y7fhtbg8okchlq...
output:
gcjceb9hwjcb3ki5mxr2f33moj5hoss2t7vg0mhs9v7w8pjnlr0h5623snn84uk9clu9i8es7rxpjqpmyoia7s1aro7hidqi93rgud802d97zz6afr73j4pvuuids855wb4a95a7jm041pjb5mpexhklkc2s5opuyq81wex3wbjdn2lqi6dfz2ov7f0ys6719r2gteuyw2hft57pr81o1a2zvw8ostcqv70dbxubb1y2xx27ef4ywg0p1rihuimnwk0zav1hsyhzipdjvrhmnyvwv1y7fhtbg8okchlq6daf...
result:
ok T=5 (5 test cases)
Test #20:
score: 0
Accepted
time: 35ms
memory: 21708kb
input:
5 prszrf16ia8uujr04nitrgoo81kf88pg9qt46bqox8v060geeprpnjg7ucjjszau3qdvcjxnqaangsmp12nsvmp65url59i8zhbo75nj7ukmewblelwjzxkuzd2xsw3tnncl16ajfngcsj5h5ilymb1cqi3hascs9nzvrqjlzwbac5dk88zm19cg3qmliv07qwgie0gd0thzj7m3hp77fdl5t70e9x2novzv3g0ahl0fbufak6obc20w975djci0gyunkqnjkwwu431qkzh41jfnwrqfn1v2ehlc958ooe...
output:
prszrf16ia8uujr04nitrgoo81kf88pg9qt46bqox8v060geeprpnjg7ucjjszau3qdvcjxnqaangsmp12nsvmp65url59i8zhbo75nj7ukmewblelwjzxkuzd2xsw3tnncl16ajfngcsj5h5ilymb1cqi3hascs9nzvrqjlzwbac5dk88zm19cg3qmliv07qwgie0gd0thzj7m3hp77fdl5t70e9x2novzv3g0ahl0fbufak6obc20w975djci0gyunkqnjkwwu431qkzh41jfnwrqfn1v2ehlc958ooex8...
result:
ok T=5 (5 test cases)
Test #21:
score: 0
Accepted
time: 36ms
memory: 21964kb
input:
5 gb7h3ntlcuvnk4rhf9favuc5adov4hnc9c2djr657n9bytfd0ac4dsmrlv9ugzdk7rgjvngyhl1jb6uy5lz7iu2ohq1hbkqzqgsgys4958tdt7wwgvp5qm68kxkxkhou2jefqkfgo0u0uns8odxmodpavlasttqrcbr8p9u1usyg14ov4615oroolp4n9jsr57dd02447undyei1je9bojbwluppz084ryncms5ytvrkocrn6vkz3fh5amyqpxuaw1gdc034odloh5e8o7pjjm4ubu3bzbz4cn5fi5p566...
output:
gb7h3ntlcuvnk4rhf9favuc5adov4hnc9c2djr657n9bytfd0ac4dsmrlv9ugzdk7rgjvngyhl1jb6uy5lz7iu2ohq1hbkqzqgsgys4958tdt7wwgvp5qm68kxkxkhou2jefqkfgo0u0uns8odxmodpavlasttqrcbr8p9u1usyg14ov4615oroolp4n9jsr57dd02447undyei1je9bojbwluppz084ryncms5ytvrkocrn6vkz3fh5amyqpxuaw1gdc034odloh5e8o7pjjm4ubu3bzbz4cn5fi5p566c5...
result:
ok T=5 (5 test cases)
Test #22:
score: 0
Accepted
time: 35ms
memory: 21772kb
input:
5 l3s7aq5a09waqezepxv9qk5cx5w2wezvkom6yrpynvleu0qdzeq4etvinolvgnh7fc4cqxg3b2qillxych4ebh2oeqkfeew77241pac0ule3jewvhvt8nyyy8pdvnjwrwd9xx2lviyk80hxnc7btdjj7rkxsghfyzjcg1uu5iftuc5vm3xo2qfe1x0yic69mrmmv5m3e44tsnay2lh0hmh2buvw96um9i52po0zxay0vcj9etdh1hspvqawjd1xsy1z8bx0fbyeuzhkegrjcxs86e6x7i4yv073qu8mmjd...
output:
q5a09waqezepxv9qk5cx5w2wezvkom6yrpynvleu0qdzeq4etvinolvgnh7fc4cqxg3b2qillxych4ebh2oeqkfeew77241pac0ule3jewvhvt8nyyy8pdvnjwrwd9xx2lviyk80hxnc7btdjj7rkxsghfyzjcg1uu5iftuc5vm3xo2qfe1x0yic69mrmmv5m3e44tsnay2lh0hmh2buvw96um9i52po0zxay0vcj9etdh1hspvqawjd1xsy1z8bx0fbyeuzhkegrjcxs86e6x7i4yv073qu8mmjdohrrgq6...
result:
ok T=5 (5 test cases)
Test #23:
score: 0
Accepted
time: 32ms
memory: 21656kb
input:
5 oceoo8fwsu1bebfc9kfoz0e3146spjm9x2h2dpdac6r16ivbp1raiom18wnlt6bz0r7evonmk5kmp7q38jei7agowfo91wrqzliadix8vhchumtmg7qyquv4fvnm7s6xyo62qyptkjyrlf2m93yqosi5ljxgps8adlkxj6wbwtmqwsftt8wxxvxjrtf8di1ptcrew8jro5yubz89vdzojozboco0l1ykkuavifk4klkq3ea8mqa6uzrmjoa29p0jifuwiznpxybtyier1lg0rplb6m82ju3crp10tcfv6f...
output:
ceoo8fwsu1bebfc9kfoz0e3146spjm9x2h2dpdac6r16ivbp1raiom18wnlt6bz0r7evonmk5kmp7q38jei7agowfo91wrqzliadix8vhchumtmg7qyquv4fvnm7s6xyo62qyptkjyrlf2m93yqosi5ljxgps8adlkxj6wbwtmqwsftt8wxxvxjrtf8di1ptcrew8jro5yubz89vdzojozboco0l1ykkuavifk4klkq3ea8mqa6uzrmjoa29p0jifuwiznpxybtyier1lg0rplb6m82ju3crp10tcfv6fte6...
result:
ok T=5 (5 test cases)
Test #24:
score: 0
Accepted
time: 39ms
memory: 22016kb
input:
5 tg0o7kz8ro987y8ux9jaihcvelsuwux4xm97buinimkdlgphlb4hevmn15nhbmekpweuvt30hxmlgymxciex0dm38nbtq036g6kkm8js7bq930u6vn27i27c3tjemaiwvlmm8n88nz6y1sofwascrpq7gcn4pir1pl3qtroujwbtfodlrxaehstjzlevdik2j5eeyd2brlbr8gikj2qngzmimp0nhvsyc0s4e3f5y9rcu3ay410bgylr5au67et0peznth0h7ouy9c3f2eum40arciuei9eb74qiifk3cy...
output:
9jaihcvelsuwux4xm97buinimkdlgphlb4hevmn15nhbmekpweuvt30hxmlgymxciex0dm38nbtq036g6kkm8js7bq930u6vn27i27c3tjemaiwvlmm8n88nz6y1sofwascrpq7gcn4pir1pl3qtroujwbtfodlrxaehstjzlevdik2j5eeyd2brlbr8gikj2qngzmimp0nhvsyc0s4e3f5y9rcu3ay410bgylr5au67et0peznth0h7ouy9c3f2eum40arciuei9eb74qiifk3cybcjhep28u85s6v77rzu...
result:
ok T=5 (5 test cases)
Test #25:
score: 0
Accepted
time: 36ms
memory: 21804kb
input:
5 c1n5y4grayqghp7cehpfthk7gt2qac9idqi8cyvbxx95ltzw8ppcks4xqixa21204v67cezagqwpqijazeua8cfmwbfiauom467xoukiazwdbzee83ezcrldhuaz30ogwj3m7b128v20wt4wiwsapw7uifnarnjrbi5954h30el6oxoi19u8g8poopcs5iyzkfriupp7ab4qmhxcdfd40peact4pub407g0nure1jwntjh5dv3f3q1nuzgtdnm6q7u1eh5b4s6fwmepobyy71bcx2f0agwfpsk58243ve0...
output:
4grayqghp7cehpfthk7gt2qac9idqi8cyvbxx95ltzw8ppcks4xqixa21204v67cezagqwpqijazeua8cfmwbfiauom467xoukiazwdbzee83ezcrldhuaz30ogwj3m7b128v20wt4wiwsapw7uifnarnjrbi5954h30el6oxoi19u8g8poopcs5iyzkfriupp7ab4qmhxcdfd40peact4pub407g0nure1jwntjh5dv3f3q1nuzgtdnm6q7u1eh5b4s6fwmepobyy71bcx2f0agwfpsk58243ve093sum6g...
result:
ok T=5 (5 test cases)
Test #26:
score: 0
Accepted
time: 37ms
memory: 21804kb
input:
5 88hwgwu9uijvxkfn32y6i76r1yqmr95p3kigess93pwu34q9nryus03ymn4114v8gl64q9fk7knawnbzbqtneh7mbcd4gfkxbfa82h1s7s3xdvwqjc4pib56k2buazaybp2xlix6x4ssbxma04oz7wzbkqh7kal45p9almd3r1p93ncsamupemm8ta8h35noqsc6bfp0mnqvkgqadaj34wk416x567t91mewalkr8ml41k9jppc4vlj712hahtmhnkgez0doera1kurd6rdo2qtb7bajecrebhcryivxic...
output:
xkfn32y6i76r1yqmr95p3kigess93pwu34q9nryus03ymn4114v8gl64q9fk7knawnbzbqtneh7mbcd4gfkxbfa82h1s7s3xdvwqjc4pib56k2buazaybp2xlix6x4ssbxma04oz7wzbkqh7kal45p9almd3r1p93ncsamupemm8ta8h35noqsc6bfp0mnqvkgqadaj34wk416x567t91mewalkr8ml41k9jppc4vlj712hahtmhnkgez0doera1kurd6rdo2qtb7bajecrebhcryivxicop21jxwgg3caqj...
result:
ok T=5 (5 test cases)
Test #27:
score: 0
Accepted
time: 32ms
memory: 21772kb
input:
5 wj9tmrejx5yrhwnnu721ormmgdpx3z9n093t2mtj90k4kxenz81zjhiyblw4swe0tvivv5836734375lkkelucp3wxmr0qedcq6yy5c3lv2w7zjr1udkrjiushdnyc4hhpuc0ezo65dvpk2dz2bkl2ibouvl2twelwa7hljpu24wyll7x5mii2yncgw83cmoqc1wreizk0rxnlwjnqayldcwydcyfsmhn3875u7ivq224ez3k1jfdhz6sujgvon1b42c2g7yqvsjf3d24u4nno338x2d1nfzb1k96ez780...
output:
j9tmrejx5yrhwnnu721ormmgdpx3z9n093t2mtj90k4kxenz81zjhiyblw4swe0tvivv5836734375lkkelucp3wxmr0qedcq6yy5c3lv2w7zjr1udkrjiushdnyc4hhpuc0ezo65dvpk2dz2bkl2ibouvl2twelwa7hljpu24wyll7x5mii2yncgw83cmoqc1wreizk0rxnlwjnqayldcwydcyfsmhn3875u7ivq224ez3k1jfdhz6sujgvon1b42c2g7yqvsjf3d24u4nno338x2d1nfzb1k96ez7806yl...
result:
ok T=5 (5 test cases)
Test #28:
score: 0
Accepted
time: 33ms
memory: 22004kb
input:
5 m7e8eyr2tfax4kocxop66h8fenlpuhbxg7o6d5iuvkoaarmf03kep32m4p39q8uwrtovfybrgs6c0zgipec2fzt5ex6veczld9q3ojfjpp75swydbknbkcceegcjrmlxymgsxmcapx3ovlar43r2rx9zf5hnkfekawtptcjw6jkv7otigtafi6x3ni330gkjga7i7norgyejkad0s9wykmi0gcpqp54vcijydm2sry49prvwgy7cjhz1sa9i3wxefhd3paoly2h3282uz9hq00nj62fxd44yn5nfnbthqo...
output:
eyr2tfax4kocxop66h8fenlpuhbxg7o6d5iuvkoaarmf03kep32m4p39q8uwrtovfybrgs6c0zgipec2fzt5ex6veczld9q3ojfjpp75swydbknbkcceegcjrmlxymgsxmcapx3ovlar43r2rx9zf5hnkfekawtptcjw6jkv7otigtafi6x3ni330gkjga7i7norgyejkad0s9wykmi0gcpqp54vcijydm2sry49prvwgy7cjhz1sa9i3wxefhd3paoly2h3282uz9hq00nj62fxd44yn5nfnbthqoychz2k...
result:
ok T=5 (5 test cases)
Test #29:
score: 0
Accepted
time: 27ms
memory: 21932kb
input:
5 ao25pw2azhr5cn7tfh6jdgcmtp6nv1j0lq1mb8e25pwxtrn0qguuc7u3tpbod1thwd243zshxuc1rvfxo0mxb436r1cpvzkejdqxtxky3h17fppklalscp3b1l6wuedt5lhtqzutpzpteay5qwqk4ijb2m7fa62o217qmk3q5zrihjfeap2wv76j3uvpnt55ixexribvrlh685bhkv3v60ao9pzfx7uj5pkebx9w9bvbos2ov9bfravsp5m7294a6p0ympctzgta316s0lx4kgetuy542c5p7vj965wzqy...
output:
n7tfh6jdgcmtp6nv1j0lq1mb8e25pwxtrn0qguuc7u3tpbod1thwd243zshxuc1rvfxo0mxb436r1cpvzkejdqxtxky3h17fppklalscp3b1l6wuedt5lhtqzutpzpteay5qwqk4ijb2m7fa62o217qmk3q5zrihjfeap2wv76j3uvpnt55ixexribvrlh685bhkv3v60ao9pzfx7uj5pkebx9w9bvbos2ov9bfravsp5m7294a6p0ympctzgta316s0lx4kgetuy542c5p7vj965wzqygmkaxek84m37r9h...
result:
ok T=5 (5 test cases)
Test #30:
score: 0
Accepted
time: 10ms
memory: 21328kb
input:
1 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghij...
output:
1
result:
ok T=1 (1 test case)
Test #31:
score: 0
Accepted
time: 26ms
memory: 5332kb
input:
50 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghi...
output:
rstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz012...
result:
ok T=50 (50 test cases)
Test #32:
score: 0
Accepted
time: 200ms
memory: 21736kb
input:
5 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg...
output:
ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggga ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg5ab gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg...
result:
ok T=5 (5 test cases)
Test #33:
score: 0
Accepted
time: 31ms
memory: 21768kb
input:
5 9876543210zyxwvutsrqponmlkjihgfedcbahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh...
output:
ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh bahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh cbazhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh...
result:
ok T=5 (5 test cases)
Test #34:
score: 0
Accepted
time: 108ms
memory: 21640kb
input:
5 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccddddddddddddddddddddddddddddddddddddddddddd...
result:
ok T=5 (5 test cases)
Test #35:
score: 0
Accepted
time: 108ms
memory: 21956kb
input:
5 abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccddddddddddddddddddddddddddddddddddddddddddd...
result:
ok T=5 (5 test cases)
Test #36:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
5 aaa aaa aa aa a a az z z z
output:
aaa aa a z z
result:
ok T=5 (5 test cases)