QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#356892#962. Thanks to MikeMirzayanovAlston_WanAC ✓30ms5620kbC++142.0kb2024-03-18 15:02:522024-03-18 15:02:54

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3768kb

input:

4
3 1 2 4

output:

11
4 1 1 1 1 
4 1 1 1 1 
4 1 1 1 1 
4 1 1 1 1 
4 1 1 1 1 
4 1 1 1 1 
4 1 1 1 1 
2 3 1 
4 1 1 1 1 
3 1 1 2 
4 1 1 1 1 

result:

ok OK

Test #2:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

6
6 5 4 3 2 1

output:

9
6 1 1 1 1 1 1 
6 1 1 1 1 1 1 
6 1 1 1 1 1 1 
6 1 1 1 1 1 1 
6 1 1 1 1 1 1 
6 1 1 1 1 1 1 
6 1 1 1 1 1 1 
6 1 1 1 1 1 1 
6 1 1 1 1 1 1 

result:

ok OK

Test #3:

score: 0
Accepted
time: 1ms
memory: 3728kb

input:

1
1

output:

0

result:

ok OK

Test #4:

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

input:

10
3 8 7 4 6 2 9 10 1 5

output:

15
10 1 1 1 1 1 1 1 1 1 1 
10 1 1 1 1 1 1 1 1 1 1 
10 1 1 1 1 1 1 1 1 1 1 
10 1 1 1 1 1 1 1 1 1 1 
10 1 1 1 1 1 1 1 1 1 1 
10 1 1 1 1 1 1 1 1 1 1 
2 8 2 
7 2 1 3 1 1 1 1 
4 2 4 3 1 
4 5 3 1 1 
9 2 1 1 1 1 1 1 1 1 
8 1 1 1 1 3 1 1 1 
6 2 4 1 1 1 1 
7 2 1 1 2 1 1 2 
10 1 1 1 1 1 1 1 1 1 1 

result:

ok OK

Test #5:

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

input:

20
2 13 11 1 19 12 15 3 9 4 14 18 17 7 16 8 6 10 5 20

output:

21
20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
4 5 6 8 1 
2 19 1 
20 1 1 1 1 1 1...

result:

ok OK

Test #6:

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

input:

50
42 29 21 50 27 23 7 43 46 13 37 1 35 31 30 32 44 19 11 38 10 20 33 15 25 40 48 12 34 28 36 14 8 2 9 24 16 39 17 49 26 41 18 3 4 45 47 6 22 5

output:

26
50 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 
50 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 
50 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 ...

result:

ok OK

Test #7:

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

input:

100
21 42 70 62 37 99 52 55 38 12 95 23 48 18 9 88 30 49 40 60 47 67 27 63 79 75 16 81 22 58 20 2 56 89 76 98 26 14 72 51 7 39 45 54 50 3 13 90 24 33 91 93 15 87 73 25 41 64 29 100 10 28 36 94 46 32 82 61 6 59 69 35 57 80 74 77 17 86 71 66 84 11 96 85 43 65 68 31 44 34 92 1 53 4 97 19 8 78 5 83

output:

34
100 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 
100 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 ...

result:

ok OK

Test #8:

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

input:

120
120 72 23 35 8 87 24 94 101 61 21 18 112 111 73 36 7 105 118 64 40 56 108 1 66 76 77 33 119 53 31 9 89 86 50 96 85 70 30 102 81 13 10 49 78 114 117 57 20 2 98 115 59 43 16 45 63 44 116 54 58 32 68 26 97 5 27 46 4 107 22 95 47 62 17 51 84 74 25 34 104 91 39 106 12 103 79 11 90 109 3 15 88 38 71 4...

output:

34
120 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 
120 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 OK

Test #9:

score: 0
Accepted
time: 1ms
memory: 4016kb

input:

130
64 8 50 36 32 109 91 53 113 19 86 63 4 15 117 46 130 61 72 107 126 31 9 120 87 111 128 94 82 33 45 89 103 29 85 62 98 18 101 73 38 67 77 119 44 105 92 100 40 121 20 57 84 123 114 25 55 95 43 78 11 1 115 90 83 129 52 116 10 65 17 59 7 22 5 122 80 124 118 41 127 58 16 69 88 35 66 106 51 47 3 96 48...

output:

35
130 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 
130 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok OK

Test #10:

score: 0
Accepted
time: 1ms
memory: 3692kb

input:

200
104 2 22 101 71 156 31 51 154 27 105 102 162 21 113 192 114 64 176 174 198 76 53 6 14 79 130 72 99 38 25 95 175 112 43 39 63 88 187 47 137 77 26 80 56 11 186 151 172 91 144 116 152 55 52 48 199 7 189 98 128 40 178 121 45 32 194 191 134 103 197 82 181 37 59 42 168 61 12 136 115 97 20 180 145 46 1...

output:

38
200 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 1...

result:

ok OK

Test #11:

score: 0
Accepted
time: 2ms
memory: 4056kb

input:

1000
266 497 345 212 566 310 166 640 865 595 225 315 837 619 999 638 652 599 772 515 815 32 416 591 649 476 364 363 915 75 293 569 960 320 545 824 422 433 970 52 894 148 585 713 429 872 330 838 708 257 122 925 100 178 530 17 132 740 40 760 856 712 414 300 296 962 902 424 65 922 733 820 623 295 776 3...

output:

52
1000 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 ...

result:

ok OK

Test #12:

score: 0
Accepted
time: 5ms
memory: 4040kb

input:

3535
3521 780 1120 790 540 803 1342 3087 280 382 938 2398 1467 1959 645 1259 371 830 3399 1237 3356 3533 903 1721 2564 1545 3222 1184 1473 1970 1483 609 3349 571 536 591 1598 2380 1993 2527 71 1303 2278 1233 264 1262 3428 2133 307 1793 2678 2857 3029 3149 2197 876 1621 1418 1802 111 1394 406 3422 27...

output:

70
3535 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 ...

result:

ok OK

Test #13:

score: 0
Accepted
time: 6ms
memory: 4724kb

input:

9876
8940 3942 9482 6904 9011 3552 9362 3393 930 6486 6386 4279 8280 2433 550 4981 4612 6715 8963 9634 2788 3423 1318 8155 3248 4424 9048 5812 4975 4036 8318 8334 4224 2762 2535 8447 6668 3900 146 1979 2676 7813 5713 8529 1327 2747 906 6213 3706 5326 222 4290 1731 8908 6883 7754 8160 9383 7450 1760 ...

output:

88
9876 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 ...

result:

ok OK

Test #14:

score: 0
Accepted
time: 17ms
memory: 4580kb

input:

12999
9367 6922 2753 1285 354 11783 941 4220 2425 12409 4623 5616 8731 5155 7125 6530 6031 2039 1558 162 1656 9857 5346 12638 4184 8088 386 3880 2146 8445 12235 9436 7606 11663 10496 4755 333 3515 3845 8908 3514 7121 3886 10240 10569 10738 9244 9118 12185 6188 9822 2208 1814 10513 10381 2807 5889 17...

output:

88
12999 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...

result:

ok OK

Test #15:

score: 0
Accepted
time: 28ms
memory: 5348kb

input:

19875
1909 9118 6273 13408 8288 2787 3440 12186 3615 2075 14373 2287 7102 13197 9163 11896 1042 11024 14067 14824 1750 9712 152 7448 4766 3784 8935 2866 10542 12696 19254 10844 14519 13229 14677 6007 5599 3398 19092 10298 17650 16560 1877 7298 3206 18047 19498 5654 13110 16391 4555 15442 19393 9280 ...

output:

99
19875 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...

result:

ok OK

Test #16:

score: 0
Accepted
time: 30ms
memory: 5620kb

input:

20000
15515 4495 17804 9254 14476 11181 8570 17799 15408 18550 2853 19132 12707 12414 8288 5175 6837 11709 8577 13179 5171 3509 419 15496 10365 6791 11342 14312 2498 7334 5601 10178 3714 976 10077 8368 3916 541 7960 4202 9960 19251 4868 12089 12892 12474 9529 14071 15392 13185 9462 1300 12436 10390 ...

output:

100
20000 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 ...

result:

ok OK