QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#39820#148. Brpermlarryzhong100 ✓996ms61236kbC++17948b2022-07-13 21:41:562022-07-13 21:41:58

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 13
Accepted

Test #1:

score: 13
Accepted
time: 1ms
memory: 3676kb

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: 0
Accepted
time: 3ms
memory: 3784kb

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: 27ms
memory: 15148kb

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: 0
Accepted
time: 39ms
memory: 15080kb

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: 0
Accepted
time: 30ms
memory: 15152kb

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: 996ms
memory: 61196kb

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: 0
Accepted
time: 213ms
memory: 61116kb

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: 202ms
memory: 61232kb

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: 0
Accepted
time: 214ms
memory: 61236kb

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: 0
Accepted
time: 212ms
memory: 61056kb

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