QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#175429 | #7126. Control point | HuangHanSheng | AC ✓ | 29ms | 35696kb | C++17 | 3.5kb | 2023-09-10 18:02:18 | 2023-09-10 18:02:18 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 35536kb
input:
3 1 1 1 1 2 2 3
output:
6
result:
ok 1 number(s): "6"
Test #2:
score: 0
Accepted
time: 1ms
memory: 35476kb
input:
4 1 2 1 1 2 2 3 2 4
output:
15
result:
ok 1 number(s): "15"
Test #3:
score: 0
Accepted
time: 2ms
memory: 35588kb
input:
10 10 0 1 4 6 9 8 5 3 7 10 2 5 10 10 9 7 5 5 8 3 2 6 10 2 8 1 6 10 4
output:
1
result:
ok 1 number(s): "1"
Test #4:
score: 0
Accepted
time: 1ms
memory: 35444kb
input:
10 10 0 2 7 10 3 5 8 6 1 4 9 10 5 4 5 4 8 4 7 5 2 10 1 10 6 3 1 1 9
output:
1
result:
ok 1 number(s): "1"
Test #5:
score: 0
Accepted
time: 3ms
memory: 35528kb
input:
10 2 3 9 6 1 7 7 9 7 4 3 8 9 3 6 2 5 3 6 4 4 10
output:
1015
result:
ok 1 number(s): "1015"
Test #6:
score: 0
Accepted
time: 1ms
memory: 35444kb
input:
10 3 1 6 10 1 10 8 6 9 8 3 7 2 5 3 2 4 2 8 3 1 6 4
output:
504
result:
ok 1 number(s): "504"
Test #7:
score: 0
Accepted
time: 2ms
memory: 35520kb
input:
10 7 3 3 6 5 7 9 10 1 8 4 1 2 9 1 9 5 1 8 10 2 7 3 6 9 3 2
output:
978
result:
ok 1 number(s): "978"
Test #8:
score: 0
Accepted
time: 1ms
memory: 35584kb
input:
10 10 5 6 2 10 4 5 7 3 8 1 9 1 5 10 3 6 3 4 5 10 7 7 8 7 9 2 10 9 1
output:
1013
result:
ok 1 number(s): "1013"
Test #9:
score: 0
Accepted
time: 1ms
memory: 35460kb
input:
10 2 0 8 9 4 3 2 1 6 1 3 7 8 7 3 10 3 5 2 10 9 8
output:
256
result:
ok 1 number(s): "256"
Test #10:
score: 0
Accepted
time: 3ms
memory: 35592kb
input:
10 3 2 10 4 1 3 2 7 4 7 10 2 8 5 10 7 6 9 5 1 10 3 10
output:
936
result:
ok 1 number(s): "936"
Test #11:
score: 0
Accepted
time: 3ms
memory: 35580kb
input:
10 3 1 6 8 5 6 5 2 8 1 3 3 9 1 7 6 2 4 10 7 2 10 3
output:
576
result:
ok 1 number(s): "576"
Test #12:
score: 0
Accepted
time: 1ms
memory: 35456kb
input:
10 7 3 7 1 5 3 6 2 9 4 8 8 5 2 1 10 3 5 6 10 6 7 6 9 6 7 1
output:
948
result:
ok 1 number(s): "948"
Test #13:
score: 0
Accepted
time: 5ms
memory: 35408kb
input:
10 6 2 3 4 9 10 5 6 3 5 8 1 4 6 4 9 6 7 2 8 6 10 4 8 1 5
output:
798
result:
ok 1 number(s): "798"
Test #14:
score: 0
Accepted
time: 1ms
memory: 35536kb
input:
10 8 1 8 9 4 1 7 2 6 3 5 8 10 3 1 3 2 1 6 2 2 4 7 10 1 8 9 4
output:
345
result:
ok 1 number(s): "345"
Test #15:
score: 0
Accepted
time: 1ms
memory: 35532kb
input:
10 2 2 1 8 5 7 6 3 8 2 5 4 8 1 9 1 10 7 9 5 6 7
output:
960
result:
ok 1 number(s): "960"
Test #16:
score: 0
Accepted
time: 6ms
memory: 35528kb
input:
10 3 3 6 8 2 9 8 7 9 5 4 2 10 8 10 2 5 10 6 6 3 1 7
output:
1016
result:
ok 1 number(s): "1016"
Test #17:
score: 0
Accepted
time: 1ms
memory: 35524kb
input:
10 4 3 5 4 8 10 5 1 3 4 2 4 7 9 4 8 5 6 2 10 8 5 3 7
output:
988
result:
ok 1 number(s): "988"
Test #18:
score: 0
Accepted
time: 1ms
memory: 35400kb
input:
10 3 2 2 9 8 6 4 3 5 3 8 9 4 7 9 8 7 4 10 9 2 10 1
output:
936
result:
ok 1 number(s): "936"
Test #19:
score: 0
Accepted
time: 1ms
memory: 35532kb
input:
10 2 1 4 2 2 5 5 3 5 7 1 8 1 2 10 5 6 3 1 4 10 9
output:
704
result:
ok 1 number(s): "704"
Test #20:
score: 0
Accepted
time: 0ms
memory: 35584kb
input:
10 7 3 1 5 7 8 4 9 10 8 5 7 3 10 3 2 6 1 7 9 5 2 4 5 10 7 4
output:
978
result:
ok 1 number(s): "978"
Test #21:
score: 0
Accepted
time: 1ms
memory: 35544kb
input:
10 2 3 10 2 4 9 6 4 5 1 1 6 10 8 4 8 7 1 9 2 3 8
output:
984
result:
ok 1 number(s): "984"
Test #22:
score: 0
Accepted
time: 1ms
memory: 35460kb
input:
10 5 0 5 4 8 10 1 4 3 3 9 6 4 2 1 4 10 1 5 5 9 8 5 7 9
output:
32
result:
ok 1 number(s): "32"
Test #23:
score: 0
Accepted
time: 1ms
memory: 35588kb
input:
100 40 2 17 41 19 23 46 16 10 31 82 12 77 32 11 71 83 25 98 18 34 59 13 73 80 65 37 22 6 2 24 5 94 42 51 63 52 92 97 26 93 38 20 93 58 32 38 53 17 63 88 70 45 78 40 30 97 12 3 89 64 67 16 28 15 57 74 87 30 61 64 45 99 74 89 13 3 82 68 70 69 11 45 25 17 39 92 46 2 74 63 47 71 62 41 62 81 67 95 47 68 ...
output:
615514582
result:
ok 1 number(s): "615514582"
Test #24:
score: 0
Accepted
time: 3ms
memory: 35540kb
input:
100 66 2 22 78 19 70 81 33 15 72 40 51 18 62 36 24 37 20 97 65 89 75 14 55 23 53 1 67 50 99 54 76 41 16 44 60 2 90 7 28 79 43 47 64 71 27 25 8 46 92 95 80 31 100 42 96 86 66 52 63 98 4 56 91 34 83 85 3 51 55 48 15 5 78 40 3 13 95 58 79 81 47 7 98 10 89 48 86 91 25 79 27 77 97 8 10 18 27 63 55 91 6 6...
output:
304771880
result:
ok 1 number(s): "304771880"
Test #25:
score: 0
Accepted
time: 1ms
memory: 35536kb
input:
100 11 16 75 28 8 98 60 16 40 89 90 39 44 51 88 83 81 23 91 5 9 52 34 38 50 98 96 43 81 66 44 67 11 2 59 93 27 11 47 59 35 6 1 33 34 93 60 22 61 82 1 19 57 78 76 76 37 45 23 77 69 89 74 18 100 73 25 89 2 22 53 57 47 14 98 71 73 85 51 54 75 28 32 97 100 6 32 13 89 72 92 18 96 96 45 83 26 95 65 95 52 ...
output:
557998047
result:
ok 1 number(s): "557998047"
Test #26:
score: 0
Accepted
time: 3ms
memory: 35564kb
input:
100 54 3 7 58 100 45 75 97 65 42 50 94 56 9 59 85 21 53 47 36 99 8 46 3 43 72 96 38 19 27 30 62 6 67 88 2 24 28 86 12 48 64 78 39 60 81 23 33 98 55 31 35 14 10 18 17 93 10 88 16 15 44 98 33 69 77 88 5 53 66 36 97 98 18 64 71 59 8 29 36 61 83 39 74 21 10 79 65 85 15 62 34 71 39 99 98 62 100 96 70 49 ...
output:
831134594
result:
ok 1 number(s): "831134594"
Test #27:
score: 0
Accepted
time: 0ms
memory: 35536kb
input:
100 24 11 66 42 54 29 26 77 62 10 21 40 46 11 73 60 43 52 97 35 48 80 93 76 24 86 25 74 5 38 91 71 64 45 45 43 76 72 9 7 59 44 89 42 94 37 57 63 55 19 47 82 24 87 86 72 11 55 24 60 21 97 68 11 81 41 78 32 78 51 10 29 90 52 79 81 38 49 78 3 16 52 93 69 16 24 8 64 66 19 15 6 1 84 80 48 23 97 5 93 15 5...
output:
903952384
result:
ok 1 number(s): "903952384"
Test #28:
score: 0
Accepted
time: 1ms
memory: 35592kb
input:
100 13 0 81 29 78 73 66 100 99 95 44 5 30 3 84 58 48 76 47 72 62 72 18 14 33 71 67 48 79 92 3 52 76 56 78 13 78 86 80 21 100 49 63 32 89 76 23 92 66 88 13 89 95 76 12 73 98 13 53 8 50 48 44 24 41 60 14 71 51 60 38 24 74 8 82 55 34 4 93 36 42 8 6 16 79 43 96 68 30 5 45 85 84 54 78 14 26 11 28 35 67 5...
output:
570065479
result:
ok 1 number(s): "570065479"
Test #29:
score: 0
Accepted
time: 1ms
memory: 35456kb
input:
100 73 28 61 59 38 77 32 86 16 3 34 93 70 20 18 53 19 11 13 24 37 81 52 98 4 62 28 5 72 82 42 46 100 2 7 54 87 78 64 25 47 31 43 9 80 39 6 79 51 58 67 44 27 89 99 65 68 21 26 35 57 56 74 60 84 1 36 85 71 45 95 17 29 97 40 75 8 14 48 59 58 14 15 82 41 77 39 3 10 74 45 29 48 34 88 100 91 30 1 95 83 36...
output:
710938870
result:
ok 1 number(s): "710938870"
Test #30:
score: 0
Accepted
time: 1ms
memory: 35596kb
input:
100 7 11 86 60 10 25 90 63 88 48 41 59 3 73 12 81 86 53 47 70 100 26 22 84 33 25 72 44 70 20 10 85 78 16 45 1 17 92 91 57 72 63 69 8 41 65 25 71 42 75 26 73 21 81 62 28 96 2 4 13 43 21 6 76 32 56 94 54 4 6 23 100 33 24 97 29 86 10 60 80 30 58 46 65 77 64 21 21 42 30 46 5 61 6 88 59 65 17 51 83 61 94...
output:
7322346
result:
ok 1 number(s): "7322346"
Test #31:
score: 0
Accepted
time: 1ms
memory: 35540kb
input:
100 14 6 95 77 36 2 67 75 89 7 82 98 83 68 50 71 52 20 52 32 85 72 34 31 55 59 91 54 62 23 53 59 46 34 91 93 76 37 23 16 60 80 9 86 89 61 51 64 67 48 42 72 45 19 47 23 92 24 75 10 96 19 79 46 11 1 42 7 88 56 22 18 27 94 96 47 36 78 84 39 25 93 77 100 89 13 99 17 41 88 84 8 84 4 48 30 23 68 36 84 65 ...
output:
337666527
result:
ok 1 number(s): "337666527"
Test #32:
score: 0
Accepted
time: 3ms
memory: 35536kb
input:
100 94 20 74 55 49 66 71 45 91 10 26 86 29 63 47 28 88 32 24 37 11 12 36 14 34 23 58 33 94 8 59 30 41 42 79 20 100 68 89 72 85 44 4 52 82 67 75 18 56 51 78 95 13 16 69 99 27 48 97 87 17 92 7 15 98 31 53 40 84 3 90 46 5 22 70 50 80 39 65 25 81 57 35 54 61 19 62 96 9 1 21 43 83 2 6 64 86 68 44 3 41 42...
output:
717081463
result:
ok 1 number(s): "717081463"
Test #33:
score: 0
Accepted
time: 3ms
memory: 35528kb
input:
100 50 5 19 40 74 86 52 35 24 98 66 72 76 88 87 60 10 95 61 81 53 9 13 80 7 77 5 89 4 55 79 18 92 84 73 93 46 97 47 39 29 22 26 50 90 12 59 1 38 14 33 57 60 35 35 40 23 58 65 90 98 64 79 33 4 54 42 46 63 54 48 37 1 34 94 73 91 72 34 44 40 47 66 93 17 71 52 30 85 70 63 74 92 9 26 22 68 63 31 3 54 98 ...
output:
16690055
result:
ok 1 number(s): "16690055"
Test #34:
score: 0
Accepted
time: 1ms
memory: 35448kb
input:
100 49 10 51 59 92 74 9 75 1 34 91 78 66 30 11 32 89 97 80 3 19 54 17 82 12 73 79 4 22 18 83 43 10 27 58 88 2 47 81 100 40 44 55 5 24 99 60 70 52 6 31 24 20 43 99 31 89 9 78 12 38 28 92 88 93 75 84 81 78 63 65 14 35 57 69 26 13 62 65 89 21 89 83 14 61 54 25 82 36 47 70 79 51 12 80 91 51 45 58 99 49 ...
output:
835234945
result:
ok 1 number(s): "835234945"
Test #35:
score: 0
Accepted
time: 1ms
memory: 35596kb
input:
100 99 3 36 24 57 89 85 94 9 25 52 75 87 82 58 46 66 26 54 63 59 21 18 79 64 60 93 97 38 90 32 31 69 30 61 62 4 68 22 14 11 41 37 76 95 65 80 2 10 84 7 39 12 28 42 23 88 81 51 96 19 50 35 47 100 86 34 92 53 6 33 40 67 13 73 29 1 49 43 20 83 15 8 55 91 44 70 16 71 99 56 3 77 27 98 74 78 45 17 72 5 48...
output:
217659984
result:
ok 1 number(s): "217659984"
Test #36:
score: 0
Accepted
time: 1ms
memory: 35384kb
input:
100 75 9 90 4 82 46 97 35 49 74 95 68 62 91 84 50 2 19 53 16 23 66 9 64 85 33 17 55 5 96 13 41 51 37 99 27 7 32 92 65 63 44 31 61 79 3 28 70 30 83 78 69 52 54 87 60 45 10 12 77 86 8 40 1 59 73 6 93 29 25 72 11 94 80 39 57 81 60 98 47 71 16 72 35 73 2 77 43 73 69 31 77 82 98 50 31 58 26 23 75 74 39 5...
output:
852798953
result:
ok 1 number(s): "852798953"
Test #37:
score: 0
Accepted
time: 3ms
memory: 35528kb
input:
100 79 6 87 35 53 34 78 70 22 92 74 47 88 20 57 93 11 97 67 83 84 49 64 66 19 12 60 98 32 27 96 25 31 91 1 46 13 21 42 44 79 85 94 15 6 38 45 86 75 39 61 43 62 55 29 41 59 76 26 24 33 2 68 3 63 58 90 100 4 80 10 95 69 48 9 18 82 30 16 50 99 54 27 94 48 33 72 69 55 57 69 26 63 13 59 56 47 1 86 60 95 ...
output:
678472326
result:
ok 1 number(s): "678472326"
Test #38:
score: 0
Accepted
time: 1ms
memory: 35484kb
input:
100 5 3 31 29 24 60 30 84 25 64 55 23 82 65 36 40 86 52 80 4 14 47 35 91 27 12 27 79 65 20 22 28 78 19 31 9 83 6 29 7 31 28 10 46 89 57 1 94 49 32 5 69 34 11 54 98 38 13 57 93 11 6 95 42 55 28 51 33 64 96 26 43 80 56 9 92 96 71 81 63 47 18 38 1 20 22 52 96 77 27 7 56 15 53 45 85 59 97 56 31 17 38 23...
output:
397415744
result:
ok 1 number(s): "397415744"
Test #39:
score: 0
Accepted
time: 0ms
memory: 35588kb
input:
100 24 37 72 95 37 40 93 39 73 4 5 26 80 90 98 46 25 100 77 68 64 65 17 30 55 57 14 89 55 16 74 26 63 10 51 93 41 30 4 47 79 46 70 36 54 49 84 85 99 13 97 27 53 100 58 89 50 23 98 87 49 24 80 46 43 88 8 67 35 90 78 32 60 91 54 37 78 91 13 46 53 90 4 39 2 4 33 31 12 19 48 66 54 3 71 22 25 96 45 69 65...
output:
703741526
result:
ok 1 number(s): "703741526"
Test #40:
score: 0
Accepted
time: 1ms
memory: 35540kb
input:
100 15 7 53 40 11 46 14 83 85 32 58 13 9 75 99 92 89 54 26 80 34 84 40 30 55 63 46 58 10 75 93 3 31 21 58 6 91 60 38 71 97 78 9 64 35 23 51 53 70 77 44 18 68 32 47 23 94 5 90 80 92 5 64 37 81 48 55 66 93 92 20 15 45 60 54 64 88 83 88 91 61 14 81 48 53 15 24 41 15 15 86 3 5 95 100 28 32 50 23 32 36 4...
output:
647127230
result:
ok 1 number(s): "647127230"
Test #41:
score: 0
Accepted
time: 2ms
memory: 35536kb
input:
100 19 5 59 39 54 89 78 26 43 55 76 86 33 30 44 20 77 74 51 57 100 98 19 11 37 4 100 10 14 45 91 13 11 2 28 26 36 61 44 2 31 24 89 73 76 64 23 14 65 37 53 33 56 4 49 34 28 64 31 77 29 100 20 46 23 41 33 57 68 76 1 47 64 3 15 60 21 12 22 45 99 93 21 97 82 74 71 25 41 42 49 77 7 100 81 48 62 50 95 12 ...
output:
894025689
result:
ok 1 number(s): "894025689"
Test #42:
score: 0
Accepted
time: 3ms
memory: 35588kb
input:
100 71 6 90 3 6 74 69 38 49 25 63 97 19 7 52 1 37 23 54 92 64 33 62 21 42 30 28 39 51 17 40 14 65 58 45 81 13 43 31 56 78 95 47 83 93 88 61 11 48 35 5 84 72 59 2 73 75 26 76 12 99 50 100 86 89 87 9 67 71 55 77 57 15 88 100 33 9 16 46 46 88 48 10 41 31 51 47 50 68 83 98 6 17 42 21 47 31 87 50 66 18 6...
output:
818712211
result:
ok 1 number(s): "818712211"
Test #43:
score: 0
Accepted
time: 0ms
memory: 35656kb
input:
2000 988 20 1858 640 1245 838 218 202 832 1582 1202 1657 1001 609 1249 747 1169 1346 1241 291 369 772 1335 1150 272 1597 1574 1154 696 227 1629 1540 146 324 809 1671 1824 1601 1292 1873 572 1844 626 430 220 1962 298 1825 1375 1097 945 188 570 216 990 543 315 1353 1613 209 320 576 486 1414 753 1034 1...
output:
929617110
result:
ok 1 number(s): "929617110"
Test #44:
score: 0
Accepted
time: 0ms
memory: 35604kb
input:
2000 563 5 891 1447 1572 1296 701 1918 1227 251 263 1239 457 269 1034 1951 1426 973 1018 311 674 643 1511 600 1843 255 516 1304 1501 148 731 1707 819 1035 1803 1004 1362 1950 188 1762 183 1343 621 711 1783 1943 1267 610 178 284 559 540 1899 1680 382 163 1860 201 1300 624 566 759 609 1299 424 363 123...
output:
609444692
result:
ok 1 number(s): "609444692"
Test #45:
score: 0
Accepted
time: 1ms
memory: 35664kb
input:
2000 1579 1 1896 21 983 476 1269 1199 1097 1553 810 1755 1942 1437 1168 1050 773 1130 846 871 1436 66 1769 182 1320 1040 1160 217 151 468 1944 1032 1034 1465 758 141 854 350 226 1379 853 1158 1374 1490 167 737 1925 7 393 1574 293 1129 37 138 1604 1180 245 635 1211 408 631 367 754 75 1787 521 827 623...
output:
278815000
result:
ok 1 number(s): "278815000"
Test #46:
score: 0
Accepted
time: 1ms
memory: 35688kb
input:
2000 1738 21 179 1693 1057 1701 800 397 862 187 1947 1634 1377 1155 801 511 774 180 1812 1092 1502 254 346 1598 451 134 956 163 1375 921 1976 881 1723 832 1223 1064 1463 1520 70 1312 1202 994 919 1847 1605 395 510 1205 743 630 902 532 1742 1483 1881 1204 407 639 1320 1519 1529 318 1461 289 368 1867 ...
output:
254647005
result:
ok 1 number(s): "254647005"
Test #47:
score: 0
Accepted
time: 1ms
memory: 35684kb
input:
2000 1111 0 1869 1789 1966 363 1328 1315 41 972 1413 565 1053 1528 866 1317 558 100 608 234 1962 576 1078 1430 1162 689 1211 1556 198 1190 1736 615 75 1494 404 341 1091 1889 449 386 910 1542 123 1521 380 1247 1490 136 1186 1717 945 147 131 1865 670 816 1934 1550 538 1225 1762 1289 442 1819 1886 648 ...
output:
687495011
result:
ok 1 number(s): "687495011"
Test #48:
score: 0
Accepted
time: 1ms
memory: 35400kb
input:
1 0 0
output:
2
result:
ok 1 number(s): "2"
Test #49:
score: 0
Accepted
time: 29ms
memory: 35696kb
input:
2000 18 1999 1579 710 1523 770 247 251 127 558 1061 473 1314 1750 545 111 1330 1901 1767 1730 1784 338 1859 1605 1105 598 1690 1201 739 1599 384 1076 1443 213 497 211 646 1813 1714 58 1611 347 456 730 1461 264 25 729 332 599 808 1565 1133 1496 712 1662 1224 536 876 1092 1922 245 1425 343 184 260 118...
output:
749218515
result:
ok 1 number(s): "749218515"