QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#225231#148. Brpermhouzhiyuan100 ✓157ms193660kbC++141.3kb2023-10-24 10:45:102023-10-24 10:45:10

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 13
Accepted

Test #1:

score: 13
Accepted
time: 2ms
memory: 7976kb

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: 0ms
memory: 7988kb

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: 20ms
memory: 47560kb

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: 33ms
memory: 47508kb

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: 16ms
memory: 47524kb

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: 116ms
memory: 193660kb

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: 139ms
memory: 193600kb

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: 133ms
memory: 192148kb

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: 145ms
memory: 193656kb

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: 157ms
memory: 193136kb

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