QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#549788#148. Brperm5un_xiaomivita_mbox100 ✓127ms228624kbC++201.3kb2024-09-06 21:23:202024-09-06 21:23:21

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 13
Accepted

Test #1:

score: 13
Accepted
time: 0ms
memory: 42684kb

input:

ykkubxafnylfriivjjqphltuagfkfcoigfcukuisdgufezomndodalbusgesraatkgnskdsiedfysodmsemmtjuoiezoaqljdodegogedjfpfwntljpgdhswtmqtwtpnbaawfumskuiwjodtsrlhblpunzqjkrzaakamjzyumkzfdjxwdkadgbwffjmldsfbhaltfnykbmvnxdkpfzsswpnmyyqpalsalaeqmqqivzqyhjgiiwfugmpxxsmkkgecuvrnlkujbyllhecpjsneluvsyckueeexhbtuhikfzuvw...

output:

0
1
0
1
1
0
1
1
1
0
0
1
1
0
0
1
0
0
0
1
0
1
1
1
1
0
1
0
0
0
1
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
1
1
0
0
1
1
1
0
0
1
0
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
1
0
1
0
0
1
1
1
1
0
1
0
0
0
1
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
1
0
1
0
0
0
0
0
1
1
0
1
0
0
0
1
0
0
0
0
1
1
0
0
0
0
1
1
1
0
1
1
0
0
0
0
1
0
0
1
1
1
1
1
0
...

result:

ok 1000 lines

Test #2:

score: 13
Accepted
time: 0ms
memory: 42696kb

input:

qytnjgmxfvhrgflrfktkttxvrftktiffaimtwsuflrvflacgltptqwyhvtytpmtlcftxyudiogevzswhhzplvdrvjhvileplggptfgmgdvehzodzazxgmyzsdowekeldhyngdxaoidkjydlhyabgthtzyzdlwkovtmlfedeeketvdwypbxlplnqwldypolfrtzqmeaezhefeiekhsfykkikslcwehplfobxalbqioelvalobhnalvnilbibnloeinzjxcmbvltcrdvdcjrlbebjdecqlflejadfeizhvsylp...

output:

0
1
0
1
1
1
1
1
0
1
0
1
1
0
1
1
0
0
1
1
0
0
1
0
1
1
1
0
1
0
1
0
0
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
0
0
0
1
1
1
0
0
1
1
1
0
1
1
0
0
0
1
0
0
1
1
1
1
1
0
0
0
0
1
1
1
1
0
1
0
0
1
0
0
0
1
0
1
0
0
1
1
1
0
1
0
0
0
0
0
1
1
0
0
1
0
0
1
1
1
0
0
1
1
0
1
0
0
0
1
1
1
0
1
0
0
1
1
1
1
0
0
0
0
0
0
1
0
0
1
1
0
1
1
0
...

result:

ok 1000 lines

Subtask #2:

score: 37
Accepted

Dependency #1:

100%
Accepted

Test #3:

score: 37
Accepted
time: 24ms
memory: 126820kb

input:

rsufzafbpxjkrmubvscneqiybldroqajxbazpqccqthkdqgsiukjicklhvisezmlrkofmplwgrpanulsknxxzuiovforkarjqwfqdsqmitupfumbsisykznbpvhvntpkfrzajusffhmopgxgrxtisguptwnkftwryxqzeifbyvrieczlfvpzfbxdpryejqmykjaehxmylarbpjgkxrumngzsmapsneinpczjoiaepikvgvvpnsoexvwnfimqarnmxnkcsfddmhgfylrepscljvyrnoprauklhbqxbslivtsr...

output:

0
1
1
0
1
0
0
1
1
0
0
0
1
0
0
1
0
0
0
0
0
1
1
1
1
1
0
0
0
1
1
0
1
1
0
1
0
1
1
1
0
1
1
0
0
0
0
0
1
0
0
0
0
1
0
0
1
0
0
1
1
0
1
0
0
1
1
1
1
1
1
1
1
0
0
1
0
0
1
1
1
0
0
1
1
0
1
0
0
1
1
0
0
1
0
1
1
1
1
0
1
1
1
0
1
0
1
0
0
0
0
0
0
0
0
0
1
0
1
1
0
1
1
1
0
1
0
0
0
0
1
0
0
0
1
0
0
1
1
0
0
0
1
0
1
0
0
0
1
1
...

result:

ok 100000 lines

Test #4:

score: 37
Accepted
time: 19ms
memory: 120152kb

input:

gqecxoexyofzehscrttbsvrrffnonisgyqzjraxdeesuffbylrmfutnfwezoazvwdjyekgxtivifkuzknisgzkwdtzbzcetbjilaanpotjzhmbkjmjmrrkaglhqcgrbrlzlzdqujehrzqhiyzkgixcxxchqjvftjlrzwiwamynidjiccupftpmfojtfwyuiazwhwvdgavibfjzbmfmbrafkhdixqztgsckzkoexacdbabhkgblulpbkvvbsmjnftnelwajkwlktjsmpzrrujjkfjlvdripsclprqcxrdzood...

output:

1
0
1
1
1
0
0
0
1
0
0
1
0
1
0
0
1
0
1
1
1
0
1
1
0
0
0
1
1
1
1
1
0
0
1
1
1
1
0
1
0
1
0
0
0
1
0
0
0
1
0
0
1
1
1
0
1
0
1
0
1
0
1
0
0
0
1
0
1
0
1
0
1
0
1
1
1
1
0
1
1
1
0
0
1
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
1
0
0
0
0
1
1
1
0
0
1
1
0
0
1
1
0
0
0
1
0
1
1
1
0
0
1
0
0
1
1
0
0
1
1
1
1
0
1
1
1
0
0
0
...

result:

ok 100000 lines

Test #5:

score: 37
Accepted
time: 20ms
memory: 114432kb

input:

wszieltjkpvmfwmgjtxjzamhomyinzeejaslmbhiphzlkjgdgkjmnskyfdwumsnkdlesdslhejnrqvszyjvnrbjgvmyfyhxaeilsyhwwgnldnqzvgcdvaxlqcoitsiwwzmhchufvbqlitqiewntfkvufhkvnpcqmrehqdahbcxeuzwcjvkkptiymqpbakjeyekhupyaehjekeekcuiyczbwbnrrfzqwgapqjaqpzedeeayswxhmginefjozxkaefitrbkxwoczmvjuqyuxlqnvbojqrwvtsncvbukbcyneyp...

output:

0
1
1
0
1
0
1
0
1
0
0
1
1
0
1
0
0
0
1
0
0
0
1
1
0
1
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1
1
1
0
1
1
1
0
1
1
0
1
0
0
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
0
0
1
1
0
0
0
1
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
0
0
0
1
1
0
1
0
0
0
1
0
1
0
0
0
0
1
0
1
1
1
0
0
0
0
1
0
0
1
0
1
0
1
1
1
1
1
0
0
1
0
1
1
1
1
0
1
1
...

result:

ok 100000 lines

Subtask #3:

score: 17
Accepted

Test #6:

score: 17
Accepted
time: 127ms
memory: 228320kb

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:

0
0
1
0
0
1
0
0
0
1
0
0
0
1
1
1
0
0
1
1
1
1
1
1
0
0
1
1
0
1
1
0
0
0
0
1
1
0
1
0
1
1
1
0
0
1
1
0
1
1
0
0
1
0
1
0
1
0
1
1
1
1
1
0
0
1
1
1
1
0
0
0
1
0
1
0
0
0
1
1
1
1
1
0
0
1
1
0
0
0
1
1
0
1
1
1
1
0
1
0
1
0
0
1
1
0
1
0
0
1
1
0
1
0
1
1
0
1
0
0
0
1
1
1
1
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
1
1
0
1
1
1
1
0
...

result:

ok 500000 lines

Test #7:

score: 17
Accepted
time: 115ms
memory: 227680kb

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbabbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:

0
0
0
0
0
1
0
1
0
1
0
1
0
0
0
0
0
0
0
0
1
0
1
1
1
1
1
0
0
0
0
0
1
1
0
1
0
0
1
1
1
1
0
0
0
0
0
0
1
1
1
0
0
0
1
1
0
1
1
0
0
0
1
0
1
1
0
0
1
1
0
0
1
1
1
0
1
1
0
0
0
1
0
1
0
0
1
1
0
1
0
0
1
0
0
0
0
1
0
1
1
0
1
1
1
0
1
1
0
0
0
0
1
1
0
0
1
0
0
1
0
0
1
0
0
0
0
1
0
0
1
1
0
0
1
0
1
1
0
1
1
1
0
1
1
0
1
0
0
1
...

result:

ok 500000 lines

Subtask #4:

score: 33
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #8:

score: 33
Accepted
time: 124ms
memory: 228624kb

input:

aectkyaaxcoazrdbtqsxfittdcpjpcgfnbsjcvrwzvklcmhfuivgagtbctipbkkyvrmcvwbfeshuwchffsuqvttnjpwzzxpmloynuhjvcbruvaoxrynquictutfhwdpttsigbzpehkwqxuukvywmtnsdblopchhqcvurhductjjvhcwewxnatbvekznxflmjfzqmtbqprytwvwoicxmrmmmqudscszchdpdlltzuwmrfmcpsclwhzgdermgaqhjjoqokvktsbynlsjjhkjwcixejshokbzlukohcmcexwhqq...

output:

0
0
1
1
1
0
1
1
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
1
1
1
1
1
0
0
1
0
1
1
1
0
1
0
1
0
1
0
0
0
1
1
1
0
1
0
0
1
1
1
0
1
1
1
0
0
1
1
1
0
1
0
1
1
0
1
1
1
0
0
1
0
0
0
1
0
1
0
1
1
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
1
0
1
0
1
0
1
1
1
0
0
1
1
1
1
0
0
0
1
0
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
0
1
0
0
1
0
1
1
0
0
0
0
1
1
1
...

result:

ok 500000 lines

Test #9:

score: 33
Accepted
time: 125ms
memory: 227480kb

input:

aybuckskrrjbuirvnoziazajvpppztxailyqsrfcdzhbgjsilbpvzdzgonheobuwuskisxgoytqwhfprimszzqyffpzrcxluqyynaeqthnjmtmdmahzqafwxxglfkzjmdsgfyrmywhwnlosqxxzhbirvotibywrlhcvybwbybdlwzcpfrbpneevxgdzqolcdlnpznejeukxxeojdykbynbklqxohlfakkuhvwnsojbfkahpntkafuzckumqdhoxpntmfzrtdbxwbgtevmuwwurclheowowpmmrsttvdwxxiz...

output:

0
0
1
1
1
1
0
0
0
0
1
0
1
0
1
1
0
0
0
1
0
1
1
0
0
0
0
0
1
0
0
1
0
0
1
0
1
1
0
1
0
1
0
0
1
1
0
0
0
0
0
1
0
1
1
1
0
1
0
0
1
1
0
1
1
0
1
1
0
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
0
1
1
1
1
0
0
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
1
0
1
0
0
1
0
1
0
1
0
0
1
0
1
1
0
1
0
0
0
1
1
1
1
1
1
1
1
1
1
0
0
1
0
1
0
1
1
1
0
1
...

result:

ok 500000 lines

Test #10:

score: 33
Accepted
time: 108ms
memory: 227492kb

input:

lpbzamryfcfiqhyouztxcmcyevavzbdgomejlgzlnxzamwcphtgrcmpuzgasqynqpbicrhohrpfdtffxaaqbxzuelwegrzjxooqvvhaicokzqclxrpymfxmafpxcwwjcquqoqvlabbnwyixrojrnakcakiatavdxulmsgogvjwkpqnbiomujtfkrmnuxzonljusbvlhxgrpxcrcmckjqmswdmnxikfdrrkbkxkumdyvmqrlnsnvcgwxqwkyyyukfxhzyqyghtcsfijietgucpmphpnumjobylhiylfrhjyqh...

output:

0
1
1
1
1
1
0
0
1
1
0
0
0
0
1
0
1
1
1
0
1
1
0
0
0
1
1
1
1
0
1
0
1
0
0
1
1
0
1
1
0
1
0
1
1
1
1
0
0
0
0
0
1
0
0
1
0
0
1
1
1
0
1
0
1
1
1
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
0
1
0
1
1
0
0
0
1
1
0
0
1
1
0
0
0
1
0
1
0
0
0
0
0
0
1
1
1
0
0
0
1
1
1
1
0
0
1
0
0
0
1
1
0
1
0
1
1
1
0
1
1
0
0
1
0
0
1
0
0
0
1
0
1
0
...

result:

ok 500000 lines