QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#839513#9915. General SymmetryqiuzxTL 1894ms55476kbC++201.1kb2025-01-01 20:22:222025-01-01 20:22:23

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 7ms
memory: 54016kb

input:

5 0
1 2 1 2 1

output:

1 3 5 3 1 
0 0 0 0 

result:

ok 9 numbers

Test #2:

score: 0
Accepted
time: 7ms
memory: 54628kb

input:

5 1
1 2 1 3 1

output:

1 3 5 3 1 
2 2 0 0 

result:

ok 9 numbers

Test #3:

score: 0
Accepted
time: 7ms
memory: 54036kb

input:

10 0
1 2 3 4 500 5 501 6 499 503

output:

1 1 1 1 1 1 1 1 1 1 
0 0 0 0 0 0 0 0 0 

result:

ok 19 numbers

Test #4:

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

input:

10 1
1 2 3 4 500 5 501 6 499 503

output:

1 1 1 1 3 3 5 1 1 1 
2 2 2 0 0 0 0 0 0 

result:

ok 19 numbers

Test #5:

score: 0
Accepted
time: 7ms
memory: 53812kb

input:

10 2
1 2 3 4 500 5 501 6 499 503

output:

1 3 3 1 3 5 5 3 1 1 
2 2 2 0 0 0 0 0 0 

result:

ok 19 numbers

Test #6:

score: 0
Accepted
time: 8ms
memory: 55252kb

input:

10 10
1 2 3 4 500 5 501 6 499 503

output:

1 3 3 1 3 5 5 3 1 1 
2 4 2 0 0 0 0 0 2 

result:

ok 19 numbers

Test #7:

score: 0
Accepted
time: 963ms
memory: 54636kb

input:

100000 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175 177...

result:

ok 199999 numbers

Test #8:

score: 0
Accepted
time: 958ms
memory: 55324kb

input:

100000 0
2 1 2 1 1 1 1 1 2 1 2 1 1 1 1 1 2 1 1 2 1 2 1 2 2 1 1 1 2 2 2 2 2 1 1 2 2 1 2 1 2 2 1 1 1 2 2 2 1 2 1 2 2 1 2 1 2 1 1 2 2 2 1 2 2 2 1 1 2 2 2 2 1 1 1 1 2 1 2 2 1 2 1 1 2 2 1 1 1 2 1 2 1 2 2 2 1 2 1 1 1 2 1 2 1 2 1 1 2 1 1 2 2 1 1 2 2 1 1 2 1 2 1 1 1 1 2 2 2 2 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 2...

output:

1 3 3 1 3 11 3 1 3 17 3 1 3 9 3 1 5 1 1 3 5 5 3 1 1 1 7 1 1 3 9 3 1 1 1 1 1 3 11 3 1 1 1 7 1 1 5 1 3 7 3 1 1 3 5 5 3 1 1 1 5 1 13 1 5 1 1 1 1 3 3 1 1 3 3 1 3 3 1 1 3 3 1 1 1 1 1 5 1 3 5 5 3 1 9 1 3 3 1 9 1 3 5 9 5 3 1 1 7 1 1 1 1 1 1 1 1 1 1 3 7 3 1 3 3 1 1 3 3 1 1 3 5 9 5 3 1 3 13 3 1 3 9 3 1 5 1 1...

result:

ok 199999 numbers

Test #9:

score: 0
Accepted
time: 968ms
memory: 54636kb

input:

100000 1
2 2 1 2 1 2 1 1 2 1 1 2 1 2 2 2 1 1 1 1 2 2 2 1 1 2 1 2 2 2 2 2 1 1 2 2 2 1 2 2 2 2 2 1 2 1 2 2 1 2 1 2 2 1 2 2 1 2 2 1 1 1 2 1 1 1 2 1 2 2 1 2 2 2 2 1 2 2 1 2 2 2 1 1 1 2 1 1 1 2 1 2 2 1 2 2 1 1 1 1 2 2 2 1 1 2 2 2 1 2 1 2 2 2 1 1 1 1 2 2 1 1 1 1 2 1 2 2 2 2 1 1 1 2 1 2 1 1 2 2 1 1 2 2 1 2...

output:

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175 177...

result:

ok 199999 numbers

Test #10:

score: 0
Accepted
time: 983ms
memory: 54988kb

input:

100000 1000
732 864 923 542 711 842 80 128 371 633 258 351 763 694 384 254 328 863 981 613 558 596 470 246 925 811 893 9 872 685 177 696 665 294 972 124 915 480 67 558 391 433 538 415 832 840 206 489 895 964 952 891 671 373 257 528 337 497 296 929 154 465 150 783 305 849 107 178 417 51 877 508 13 81...

output:

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175 177...

result:

ok 199999 numbers

Test #11:

score: 0
Accepted
time: 1853ms
memory: 55304kb

input:

200000 1
2 2 2 1 2 1 1 2 2 2 2 2 1 2 2 1 1 1 2 1 1 1 2 2 1 2 1 2 2 1 1 2 2 1 1 2 1 2 1 1 2 1 1 2 1 2 1 2 1 1 2 2 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 2 2 1 1 1 2 1 1 1 2 2 2 2 1 2 2 2 2 2 2 1 1 1 2 2 1 2 1 2 2 2 1 1 2 2 1 2 2 1 1 2 2 1 1 2 2 2 1 2 1 2 1 1 2 2 1 1 2 2 2 2 2 2 1 1 1 2 2 2 1 2 2 1 2 1 1 1...

output:

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175 177...

result:

ok 399999 numbers

Test #12:

score: 0
Accepted
time: 1894ms
memory: 55476kb

input:

200000 0
6 3 5 7 5 13 23 15 22 12 5 14 7 25 14 20 26 23 20 5 8 15 18 14 3 11 15 23 10 12 13 3 9 11 24 11 17 12 1 17 20 3 4 6 9 10 24 2 15 9 26 6 11 19 11 22 20 12 22 1 13 3 19 9 6 21 2 5 2 2 5 13 14 25 17 4 4 10 15 10 20 21 9 7 18 18 17 10 10 25 7 26 12 13 23 2 23 25 9 8 10 11 5 13 19 24 1 18 22 13 ...

output:

1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 399999 numbers

Test #13:

score: 0
Accepted
time: 1884ms
memory: 55400kb

input:

200000 1
20 20 23 14 3 18 24 19 1 16 11 2 15 4 17 19 6 9 4 21 24 16 22 9 2 19 12 4 6 1 23 20 4 21 10 12 7 17 16 17 25 16 25 16 3 1 12 4 11 24 7 11 8 5 4 22 9 15 7 20 10 22 16 16 5 26 21 12 11 14 20 25 24 7 9 16 21 17 20 12 26 21 21 7 9 9 13 13 20 9 13 14 11 22 16 26 11 26 3 14 19 9 20 18 12 26 9 9 1...

output:

1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 3 1 3 5 3 1 1 1 1 3 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 3 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 ...

result:

ok 399999 numbers

Test #14:

score: 0
Accepted
time: 1879ms
memory: 55348kb

input:

200000 2
4 10 23 18 14 19 13 15 7 24 21 3 24 18 20 4 3 4 14 16 15 6 11 1 1 17 13 19 11 11 21 6 13 10 11 24 15 17 2 18 7 16 8 23 20 11 8 6 12 16 15 17 23 18 26 1 2 14 1 16 21 23 17 24 4 14 22 16 2 22 5 11 3 11 4 10 19 24 13 5 11 17 8 6 22 19 9 15 7 4 18 3 14 9 17 6 25 6 5 12 2 11 10 9 16 2 26 4 4 19 ...

output:

1 1 1 1 3 3 1 1 1 1 1 1 1 1 1 1 3 1 1 5 1 1 1 1 1 1 3 3 1 1 1 1 1 3 1 1 1 1 3 1 3 3 1 1 1 1 1 1 1 1 3 1 3 1 1 1 1 3 3 1 1 1 3 1 1 1 7 1 1 1 1 3 5 5 3 1 1 1 1 3 1 1 1 1 1 1 1 3 1 1 3 1 1 1 1 1 3 1 1 1 3 1 3 1 1 1 3 1 1 1 1 1 1 1 1 1 1 3 1 1 3 1 1 1 1 3 1 1 1 3 1 3 1 1 1 1 1 1 1 3 1 1 1 3 1 1 1 1 3 1 ...

result:

ok 399999 numbers

Test #15:

score: 0
Accepted
time: 1893ms
memory: 55368kb

input:

200000 5
12 3 8 19 17 21 1 15 1 11 13 20 26 11 3 25 4 4 11 4 8 9 11 26 16 24 4 4 8 10 18 26 4 15 7 4 14 14 10 10 18 8 21 12 14 21 12 4 16 20 16 17 25 25 2 14 20 13 24 18 15 6 12 8 2 12 21 1 18 16 11 8 4 18 12 11 1 11 8 17 4 8 1 14 17 13 26 23 14 4 24 8 24 8 22 19 6 14 11 19 4 19 11 18 21 11 12 22 5 ...

output:

1 3 1 1 3 1 1 3 3 1 1 1 1 1 1 3 1 1 5 5 5 3 1 3 3 1 1 3 1 1 1 1 1 3 1 1 1 3 7 1 3 7 5 1 1 3 1 11 1 3 3 1 1 1 1 1 3 5 5 1 1 3 3 1 3 1 1 5 1 1 1 1 1 1 1 1 11 1 1 13 1 5 1 1 3 1 1 1 1 1 3 5 5 3 1 1 3 5 7 1 7 1 3 1 1 1 1 1 1 1 1 1 3 1 1 1 1 3 1 1 1 1 1 3 1 1 1 1 3 1 3 1 3 3 3 1 1 1 1 3 1 1 1 5 1 1 1 5 1...

result:

ok 399999 numbers

Test #16:

score: 0
Accepted
time: 1882ms
memory: 55428kb

input:

200000 10
26 14 13 12 9 5 26 4 22 21 22 4 21 12 14 9 16 19 8 5 21 23 15 10 22 23 8 4 15 3 12 13 9 25 3 22 3 6 21 26 17 20 25 5 14 14 16 12 18 1 25 7 22 26 17 14 9 4 18 3 19 22 7 2 5 22 22 2 13 13 4 8 8 20 2 22 4 13 26 22 7 12 15 1 9 7 18 12 21 20 7 2 24 11 4 18 23 12 19 10 19 18 12 2 22 20 4 23 22 1...

output:

1 1 3 7 3 1 3 3 1 17 1 11 5 9 5 5 9 7 1 1 1 5 1 5 1 1 1 3 7 9 5 3 1 11 9 3 1 1 1 3 7 3 1 1 9 7 9 3 1 7 5 3 1 5 1 3 5 3 9 3 1 1 1 21 1 1 1 13 1 5 5 5 1 3 7 5 3 1 7 1 3 3 1 5 7 3 3 3 3 1 1 1 17 1 7 1 3 5 13 5 13 9 1 5 1 1 5 1 3 3 3 1 1 1 5 5 5 1 1 1 5 1 7 1 3 3 1 5 5 1 15 5 5 3 1 1 1 3 1 7 7 5 3 7 5 3...

result:

ok 399999 numbers

Test #17:

score: -100
Time Limit Exceeded

input:

200000 0
78 83 697 374 251 9 304 789 96 113 710 550 745 615 81 791 236 204 418 516 694 117 215 769 711 226 434 667 353 944 343 272 693 704 186 337 14 69 695 439 675 778 352 348 345 26 731 758 112 670 793 519 697 155 281 255 902 945 314 240 218 189 908 369 173 903 792 781 97 197 507 793 968 383 856 4...

output:


result: