QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#502906 | #8657. Keeping On Track | xiaowuc1 | AC ✓ | 2ms | 4148kb | C++17 | 2.0kb | 2024-08-03 15:27:20 | 2024-08-03 15:27:25 |
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: 0ms
memory: 3596kb
input:
6 0 1 1 2 2 3 2 4 4 5 4 6
output:
11 5
result:
ok single line: '11 5'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
2 2 1 0 1
output:
1 0
result:
ok single line: '1 0'
Test #3:
score: 0
Accepted
time: 1ms
memory: 4148kb
input:
3000 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52...
output:
2250000 0
result:
ok single line: '2250000 0'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
9 0 3 1 3 2 3 3 4 4 5 5 6 5 7 5 8 5 9
output:
26 21
result:
ok single line: '26 21'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
16 0 1 0 2 1 3 1 4 2 5 2 6 3 7 3 8 4 9 4 10 5 11 5 12 6 13 6 14 7 15 7 16
output:
79 39
result:
ok single line: '79 39'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
35 1 2 3 4 4 5 6 7 7 8 8 9 10 11 11 12 12 13 13 14 15 16 16 17 17 18 18 19 19 20 21 22 22 23 23 24 24 25 25 26 26 27 28 29 29 30 30 31 31 32 32 33 33 34 34 35 0 1 1 3 3 6 6 10 10 15 15 21 21 28
output:
375 150
result:
ok single line: '375 150'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
35 1 2 3 4 4 5 6 7 7 8 8 9 10 11 11 12 12 13 13 14 15 16 16 17 17 18 18 19 19 20 21 22 22 23 23 24 24 25 25 26 26 27 28 29 29 30 30 31 31 32 32 33 33 34 34 35 0 3 1 6 3 10 6 15 10 21 15 28 21 1
output:
354 174
result:
ok single line: '354 174'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
35 1 2 3 4 4 5 6 7 7 8 8 9 10 11 11 12 12 13 13 14 15 16 16 17 17 18 18 19 19 20 21 22 22 23 23 24 24 25 25 26 26 27 28 29 29 30 30 31 31 32 32 33 33 34 34 35 0 28 1 21 3 15 6 10 15 6 21 3 28 1
output:
372 174
result:
ok single line: '372 174'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
499 1 0 2 0 3 0 4 0 5 2 6 5 7 5 8 6 9 5 10 2 11 4 12 0 13 6 14 0 15 12 16 9 17 4 18 14 19 10 20 16 21 19 22 14 23 17 24 5 26 15 27 25 28 26 29 28 30 26 31 29 32 25 33 26 34 31 35 31 36 33 37 36 38 27 39 34 40 38 41 31 42 32 43 42 44 34 45 32 46 36 47 40 48 47 49 34 50 36 51 38 52 39 53 28 54 40 55 2...
output:
116589 114657
result:
ok single line: '116589 114657'
Test #10:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
999 581 577 781 766 179 173 367 361 70 69 721 691 296 264 772 769 978 974 710 703 743 737 632 613 56 54 820 817 870 867 90 64 213 211 969 927 569 542 806 805 499 498 829 827 405 402 428 426 115 102 744 740 413 398 107 102 225 215 999 998 165 158 836 835 919 913 894 882 963 940 53 37 338 302 776 772 ...
output:
479020 476520
result:
ok single line: '479020 476520'
Test #11:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
1999 447 440 1775 1741 1626 1613 1797 1789 223 222 775 774 1461 1430 672 658 1404 1392 1239 1237 1622 1615 549 548 1143 1138 756 745 1828 1812 307 280 413 381 284 282 718 712 683 681 724 722 154 138 1993 1978 1569 1561 467 461 1021 1020 100 93 1901 1887 667 663 1637 1634 1988 1983 121 115 431 418 59...
output:
1961695 1959294
result:
ok single line: '1961695 1959294'
Test #12:
score: 0
Accepted
time: 2ms
memory: 3848kb
input:
9840 0 1 0 2 0 3 1 4 1 5 1 6 2 7 2 8 2 9 3 10 3 11 3 12 4 13 4 14 4 15 5 16 5 17 5 18 6 19 6 20 6 21 7 22 7 23 7 24 8 25 8 26 8 27 9 28 9 29 9 30 10 31 10 32 10 33 11 34 11 35 11 36 12 37 12 38 12 39 13 40 13 41 13 42 14 43 14 44 14 45 15 46 15 47 15 48 16 49 16 50 16 51 17 52 17 53 17 54 18 55 18 5...
output:
32275200 21516800
result:
ok single line: '32275200 21516800'
Test #13:
score: 0
Accepted
time: 2ms
memory: 3892kb
input:
9840 0 1 0 2 0 3 1 4 1 5 1 6 2 7 2 8 2 9 3 10 3 11 3 12 4 13 4 14 4 15 5 16 5 17 5 18 6 19 6 20 6 21 7 22 7 23 7 24 8 25 8 26 8 27 9 28 9 29 9 30 10 31 10 32 10 33 11 34 11 35 11 36 12 37 12 38 12 39 13 40 13 41 13 42 14 43 14 44 14 45 15 46 15 47 15 48 16 49 16 50 16 51 17 52 17 53 17 54 18 55 18 5...
output:
32275199 21513519
result:
ok single line: '32275199 21513519'
Test #14:
score: 0
Accepted
time: 2ms
memory: 4004kb
input:
10000 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 27 0 28 0 29 0 30 0 31 0 32 0 33 0 34 0 35 0 36 0 37 0 38 0 39 0 40 0 41 0 42 0 43 0 44 0 45 0 46 0 47 0 48 0 49 0 50 0 51 0 52 0 53 0 54 0 55 0 56 0 57 0 58 0 59 0 60 0 6...
output:
49995000 49994999
result:
ok single line: '49995000 49994999'
Test #15:
score: 0
Accepted
time: 2ms
memory: 4084kb
input:
10000 2627 0 2627 1 2627 2 2627 3 2627 4 2627 5 2627 6 2627 7 2627 8 2627 9 2627 10 2627 11 2627 12 2627 13 2627 14 2627 15 2627 16 2627 17 2627 18 2627 19 2627 20 2627 21 2627 22 2627 23 2627 24 2627 25 2627 26 2627 27 2627 28 2627 29 2627 30 2627 31 2627 32 2627 33 2627 34 2627 35 2627 36 2627 37 ...
output:
49995000 49994999
result:
ok single line: '49995000 49994999'
Test #16:
score: 0
Accepted
time: 2ms
memory: 3884kb
input:
9000 0 1 1 2 2 3 0 4 4 5 5 6 6 7 0 8 0 9 0 10 9 11 2 12 9 13 0 14 7 15 12 16 12 17 14 18 13 19 0 20 5 21 14 22 6 23 14 24 17 25 16 26 23 27 10 28 26 29 11 30 11 31 30 32 2 33 27 34 5 35 4 36 21 37 33 38 0 39 30 40 34 41 0 42 2 43 21 44 9 45 10 46 14 47 23 48 24 49 20 50 40 51 0 52 17 53 44 54 39 55 ...
output:
29475162 21721827
result:
ok single line: '29475162 21721827'
Test #17:
score: 0
Accepted
time: 2ms
memory: 3856kb
input:
8000 0 1 1 2 1 3 1 4 3 5 0 6 4 7 3 8 2 9 1 10 0 11 6 12 11 13 2 14 12 15 6 16 3 17 3 18 4 19 7 20 4 21 5 22 14 23 0 24 0 25 23 26 15 27 17 28 19 29 5 30 24 31 9 32 30 33 17 34 29 35 14 36 10 37 23 38 13 39 17 40 17 41 27 42 20 43 33 44 25 45 37 46 46 47 31 48 46 49 20 50 23 51 48 52 12 53 27 54 38 5...
output:
23830572 18270290
result:
ok single line: '23830572 18270290'
Test #18:
score: 0
Accepted
time: 2ms
memory: 3812kb
input:
9999 0 1 1 2 0 3 3 4 2 5 5 6 6 7 6 8 8 9 1 10 4 11 11 12 6 13 8 14 9 15 12 16 14 17 3 18 14 19 17 20 6 21 10 22 13 23 12 24 4 25 23 26 6 27 20 28 12 29 29 30 18 31 28 32 7 33 26 34 19 35 4 36 22 37 36 38 7 39 24 40 30 41 13 42 27 43 20 44 34 45 29 46 9 47 30 48 13 49 17 50 6 51 6 52 19 53 29 54 11 5...
output:
32061564 17501904
result:
ok single line: '32061564 17501904'
Test #19:
score: 0
Accepted
time: 2ms
memory: 3856kb
input:
10000 0 1 0 2 1 3 2 4 3 5 1 6 0 7 0 8 7 9 5 10 1 11 1 12 8 13 11 14 0 15 15 16 7 17 7 18 3 19 4 20 15 21 18 22 9 23 14 24 8 25 4 26 19 27 13 28 17 29 21 30 1 31 24 32 24 33 23 34 13 35 13 36 6 37 18 38 24 39 24 40 7 41 29 42 5 43 37 44 36 45 33 46 4 47 41 48 4 49 23 50 20 51 22 52 14 53 16 54 0 55 1...
output:
39026783 31851601
result:
ok single line: '39026783 31851601'