QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#407893#6539. Treasure BoxMaMengQiWA 1012ms51460kbC++203.0kb2024-05-09 14:06:512024-05-09 14:06:53

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3856kb

input:

2
5 1
ABCDE
7 1 4 5 1
5 1
ABCDA
7 1 4 5 1

output:

6 5 6 6 5 
2 1 2 3 4 

result:

ok 10 numbers

Test #2:

score: 0
Accepted
time: 0ms
memory: 3968kb

input:

1
10 4
AABABBABAB
10 3 4 10 7 1 8 10 7 6

output:

10 14 18 22 26 22 18 14 10 6 

result:

ok 10 numbers

Test #3:

score: 0
Accepted
time: 12ms
memory: 3956kb

input:

10000
10 4
ABBBAABABB
6 10 3 9 1 8 5 4 4 10
10 4
BABBAAABAB
3 7 5 9 2 3 9 8 4 1
10 4
ABBBAAABAA
3 2 4 8 2 9 1 9 6 3
10 4
BBAABBAABB
8 8 10 7 1 1 4 9 6 4
10 4
BAABBBBBAB
5 7 3 5 4 2 1 8 2 8
10 4
ABAAAABABA
10 8 2 7 5 3 7 8 10 5
10 4
BBABABAABA
10 6 10 2 2 6 4 4 3 9
10 4
BBBAAAABBB
7 2 2 8 9 10 10 6 7...

output:

17 21 17 21 25 29 26 22 26 22 
21 17 13 9 13 13 9 13 17 21 
22 18 22 18 22 19 15 19 15 19 
0 0 0 0 0 0 0 0 0 0 
11 7 3 7 11 15 12 8 12 16 
19 15 11 7 11 11 7 11 15 19 
30 34 38 34 30 34 38 42 39 35 
0 0 0 0 0 0 0 0 0 0 
11 7 3 7 11 13 9 5 9 13 
8 4 8 12 16 14 10 6 2 6 
18 14 10 6 10 14 10 14 18 22 
...

result:

ok 100000 numbers

Test #4:

score: 0
Accepted
time: 97ms
memory: 3968kb

input:

100000
10 4
BABBBABBAB
8 2 3 10 2 1 10 1 6 4
10 4
BBBAAAABBB
6 4 8 2 6 5 3 7 8 1
10 4
ABAAABAAAB
9 8 8 1 5 4 7 8 2 1
10 4
ABABBBBAAA
8 6 6 3 10 4 5 4 7 3
10 4
AABAABABBA
3 9 9 1 5 6 4 8 2 6
10 4
ABBBAABBBA
7 1 10 2 1 5 1 8 3 7
10 4
BAAABBBAAB
7 10 5 5 1 5 3 5 1 7
10 4
BABAAAAAAB
10 8 7 6 7 10 10 4 8...

output:

18 14 10 6 2 1 5 9 13 17 
0 0 0 0 0 0 0 0 0 0 
38 39 35 31 27 23 27 31 27 23 
10 6 10 14 18 19 15 11 7 11 
30 26 30 27 23 20 24 24 20 24 
0 0 0 0 0 0 0 0 0 0 
17 13 9 5 9 7 3 7 11 15 
15 11 7 11 15 12 8 4 8 12 
4 8 12 16 20 17 13 9 5 1 
15 11 7 11 15 11 7 3 7 11 
31 27 31 31 27 24 28 28 24 28 
17 21...

result:

ok 1000000 numbers

Test #5:

score: 0
Accepted
time: 0ms
memory: 4068kb

input:

1
1000 4
BABABABBBBABAAAAAABAABBBBBBBBABBBAAAAAABBBBAAABBABABBBBABBBBBBABABBBBAABAAABBBBBBAABABBBAAABABAAAABBBBAAABAABBBABBBAAABBABABABBABAAABAAABBABABABBABAABAABAAABBBBAAABBABBBBABAAABBABBBAAABBABBAABABBABAAAAAABBABAAAABBBBBAABAABBABABAABBAAABBBAAABABAAAABAABBAAABBBAABBABABABBAAAAABBBAAAAAAAABAABBB...

output:

3441 3437 3441 3445 3449 3453 3457 3461 3465 3469 3473 3477 3481 3485 3489 3493 3497 3501 3505 3509 3513 3517 3521 3525 3529 3533 3537 3541 3545 3549 3553 3557 3561 3565 3569 3573 3577 3581 3585 3589 3593 3597 3601 3605 3609 3613 3617 3621 3625 3629 3633 3637 3641 3645 3649 3653 3657 3661 3665 3669 ...

result:

ok 1000 numbers

Test #6:

score: 0
Accepted
time: 237ms
memory: 4004kb

input:

1000
1000 4
ABBABBBABBABBAABBABABAAABABAAABAAABAAABABABABABBBAABABBAABAABBBAABBBABBAABAAABBABAAABAAAABAAAAABBBBABBAAABBBABBABABBBABABBABAAABBBBAABBAAABAABBAABBAAAAABAAAABBABBABBAAABBAABBBBABBBAABAAAABAAAAABAAAABABABBBAABBBABAAABBBAAABAAAAABBABAABBABBBAABAABBBBBBAABABBBAAAABBABBAAABBBABBBBABAABAAAABA...

output:

3316 3312 3316 3320 3324 3328 3332 3336 3340 3344 3348 3352 3356 3360 3364 3368 3372 3376 3380 3384 3388 3392 3396 3400 3404 3408 3412 3416 3420 3424 3428 3432 3436 3440 3444 3448 3452 3456 3460 3464 3468 3472 3476 3480 3484 3488 3492 3496 3500 3504 3508 3512 3516 3520 3524 3528 3532 3536 3540 3544 ...

result:

ok 1000000 numbers

Test #7:

score: 0
Accepted
time: 147ms
memory: 4196kb

input:

1000
1000 4
BAABAABAABABABBBABBBAAAABAAAABBAAAABABABAABBBABBBAABBBBABAAABBAABBAAAABAABAAABAAAABAAABBABAAAAABABBBAAABAAAABAABBAAAABBBBAAABBBBBABAABBBBAAAAAABABBBBAABBABBAABABBABAAAAAABAABBABBBAAAAAABAABBABBBBABBBBAAAAAABABBABBABAABABBBBBBABBAABBBAAAAAAAABAAAAAAAAAAABBBBAAABBAABBAAABBBBBABAAAAABBABAAB...

output:

2691 2695 2699 2703 2707 2711 2715 2719 2723 2727 2731 2735 2739 2743 2747 2751 2755 2759 2763 2767 2771 2775 2779 2783 2787 2791 2795 2799 2803 2807 2811 2815 2819 2823 2827 2831 2835 2839 2843 2847 2851 2855 2859 2863 2867 2871 2875 2879 2883 2887 2891 2895 2899 2903 2907 2911 2915 2919 2923 2927 ...

result:

ok 1000000 numbers

Test #8:

score: 0
Accepted
time: 318ms
memory: 47420kb

input:

3
300000 4
BBBBAABABAABBBBBBBBBAAAABAABABBBBABBAABABBBAABABAAABAAABAAAAABAABAAABABBABAABBBBBAABBABAAABAABAABBBAAAAAAABBABABBBABABBBBBBBABBAAAAAABBBABBBBAABAAABBBBABAABAABBAABBAAAABBBABBBAAABAAABAAABABBABBABABBBABBBABABAABBABBBBABAAAABABBAABABAAABABBBBBAABBBABAAAAAAABAAAAAAAABBAAABABBBBBBABAABBBBAABA...

output:

1009294 1009290 1009294 1009298 1009302 1009306 1009310 1009314 1009318 1009322 1009326 1009330 1009334 1009338 1009342 1009346 1009350 1009354 1009358 1009362 1009366 1009370 1009374 1009378 1009382 1009386 1009390 1009394 1009398 1009402 1009406 1009410 1009414 1009418 1009422 1009426 1009430 1009...

result:

ok 900000 numbers

Test #9:

score: 0
Accepted
time: 83ms
memory: 19472kb

input:

3
300000 4
AAAABBBBABAABBBBBABBBABAAABAABBBAAAAABBBAABAABABBABBAAAABBABABBAAABBBBAABBBBBBBBAAABBABBBBBABBABABBBABABBBBBBBABBABBAAABBBBBBBABABABBBABABBAABBBBABABAAAABBABBAAAABBBBAABABABAAAABAAABABBBBAABBBABBBBBBABBBAABBAABBAABBBAABABABBBBABBBAAAABBBAABABBBBABAAAABAAAABABBBAABBABABBBABAABABABBABABAAAA...

output:

640825 640821 640817 640821 640825 640829 640833 640837 640841 640845 640849 640853 640857 640861 640865 640869 640873 640877 640881 640885 640889 640893 640897 640901 640905 640909 640913 640917 640921 640925 640929 640933 640937 640941 640945 640949 640953 640957 640961 640965 640969 640973 640977...

result:

ok 900000 numbers

Test #10:

score: -100
Wrong Answer
time: 1012ms
memory: 51460kb

input:

3
300000 123123123
BAAABBAABAAAAAAABBBAAABABBBBBBABBAAABAAAABBBBAAAAAABABBBBBBBAAAAAABABABAABBAAABBABBAAABAAAABBBBAAAAABABBBABAABABAAABABBBAAAABBABABBABABBBBBAAABBAABABABBABBBABBBAAAAABAAABAABBBAAAAAAABBBBBABBBAABABBAABAAAAAAAABAAABAABBAAAAABABABAABBABABBAAABAAAAAABBABBBBABAABABAAAAAAABBABABBAAAAAAA...

output:

-2270599273 -2393722396 -2516845519 -2639968642 -2763091765 -2886214888 -3009338011 -3132461134 -3255584257 -3378707380 -3501830503 -3624953626 -3748076749 -3871199872 -3994322995 -4117446118 -4240569241 -4363692364 -4486815487 -4609938610 -4733061733 -4856184856 -4979307979 -5102431102 -5225554225 ...

result:

wrong answer 1st numbers differ - expected: '55885802355459', found: '-2270599273'