QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#517190 | #1668. Guide | MaMengQi | AC ✓ | 2ms | 4124kb | C++20 | 1.5kb | 2024-08-13 09:56:20 | 2024-08-13 09:56:20 |
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: 4112kb
input:
3 6 2 1 1 2 2 3 6 6 1 1 2 2 3 6 4 1 2 3 4 5
output:
1 1 3 8 1 2 5 2 4 2 1 3 6 3 1 2 3 4
result:
ok All testcases are passed!
Test #2:
score: 0
Accepted
time: 0ms
memory: 3772kb
input:
3 1 1 2 1 1 2 2 1
output:
0 1 0 1 1 1 2
result:
ok All testcases are passed!
Test #3:
score: 0
Accepted
time: 0ms
memory: 4076kb
input:
10 10 1 1 2 1 4 4 1 6 5 2 10 2 1 2 1 4 4 1 6 5 2 10 3 1 2 1 4 4 1 6 5 2 10 4 1 2 1 4 4 1 6 5 2 10 5 1 2 1 4 4 1 6 5 2 10 6 1 2 1 4 4 1 6 5 2 10 7 1 2 1 4 4 1 6 5 2 10 8 1 2 1 4 4 1 6 5 2 10 9 1 2 1 4 4 1 6 5 2 10 10 1 2 1 4 4 1 6 5 2
output:
0 1 1 1 4 2 1 4 6 3 1 4 6 8 5 1 2 1 4 6 8 7 1 2 1 4 5 4 6 8 9 1 2 10 2 1 4 5 4 6 8 11 1 2 10 2 1 4 5 9 5 4 6 8 13 1 7 1 2 10 2 1 4 5 9 5 4 6 8 15 1 7 1 2 10 2 3 2 1 4 5 9 5 4 6 8
result:
ok All testcases are passed!
Test #4:
score: 0
Accepted
time: 1ms
memory: 4112kb
input:
100 100 1 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 100 2 1 1 2...
output:
0 1 1 1 3 2 1 3 6 3 1 3 6 12 4 1 3 6 12 25 5 1 3 6 12 25 50 6 1 3 6 12 25 50 100 8 1 2 1 3 6 12 25 50 100 10 1 2 5 2 1 3 6 12 25 50 100 12 1 2 5 2 4 2 1 3 6 12 25 50 100 14 1 2 5 11 5 2 4 2 1 3 6 12 25 50 100 16 1 2 5 11 5 10 5 2 4 2 1 3 6 12 25 50 100 18 1 2 5 11 5 10 5 2 4 9 4 2 1 3 6 ...
result:
ok All testcases are passed!
Test #5:
score: 0
Accepted
time: 1ms
memory: 4124kb
input:
100 100 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 10...
output:
0 1 1 1 2 2 1 2 3 3 1 2 3 4 4 1 2 3 4 5 5 1 2 3 4 5 6 6 1 2 3 4 5 6 7 7 1 2 3 4 5 6 7 8 8 1 2 3 4 5 6 7 8 9 9 1 2 3 4 5 6 7 8 9 10 10 1 2 3 4 5 6 7 8 9 10 11 11 1 2 3 4 5 6 7 8 9 10 11 12 12 1 2 3 4 5 6 7 8 9 10 11 12 13 13 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 1 2 3 4 5 6 7 8 9 10 11 12...
result:
ok All testcases are passed!
Test #6:
score: 0
Accepted
time: 2ms
memory: 3788kb
input:
100 100 1 1 1 3 3 5 5 7 7 9 9 11 11 13 13 15 15 17 17 19 19 21 21 23 23 25 25 27 27 29 29 31 31 33 33 35 35 37 37 39 39 41 41 43 43 45 45 47 47 49 49 51 51 53 53 55 55 57 57 59 59 61 61 63 63 65 65 67 67 69 69 71 71 73 73 75 75 77 77 79 79 81 81 83 83 85 85 87 87 89 89 91 91 93 93 95 95 97 97 99 100...
output:
0 1 1 1 3 2 1 3 5 3 1 3 5 7 4 1 3 5 7 9 5 1 3 5 7 9 11 6 1 3 5 7 9 11 13 7 1 3 5 7 9 11 13 15 8 1 3 5 7 9 11 13 15 17 9 1 3 5 7 9 11 13 15 17 19 10 1 3 5 7 9 11 13 15 17 19 21 11 1 3 5 7 9 11 13 15 17 19 21 23 12 1 3 5 7 9 11 13 15 17 19 21 23 25 13 1 3 5 7 9 11 13 15 17 19 21 23 25 27 ...
result:
ok All testcases are passed!
Test #7:
score: 0
Accepted
time: 1ms
memory: 4080kb
input:
100 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 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
0 1 1 1 100 3 1 99 1 100 5 1 99 1 98 1 100 7 1 99 1 98 1 97 1 100 9 1 99 1 98 1 97 1 96 1 100 11 1 99 1 98 1 97 1 96 1 95 1 100 13 1 99 1 98 1 97 1 96 1 95 1 94 1 100 15 1 99 1 98 1 97 1 96 1 95 1 94 1 93 1 100 17 1 99 1 98 1 97 1 96 1 95 1 94 1 93 1 92 1 100 19 1 99 1 98 1 97 1 96 1 95 1 ...
result:
ok All testcases are passed!
Test #8:
score: 0
Accepted
time: 0ms
memory: 4076kb
input:
100 100 1 1 2 2 1 3 3 5 4 3 1 5 3 4 2 14 9 10 8 11 16 7 6 6 5 5 24 23 6 28 30 11 24 8 2 19 26 29 37 23 33 19 37 19 44 30 19 44 44 40 37 22 41 44 26 31 53 8 51 15 3 17 47 63 21 8 62 43 9 49 38 48 49 34 47 44 29 66 1 39 26 16 31 72 41 48 77 8 74 8 67 12 2 24 75 91 36 8 23 69 100 2 1 2 2 1 3 3 5 4 3 1 ...
output:
0 1 1 1 2 2 1 2 4 3 1 2 4 9 4 1 2 4 9 17 5 1 2 4 9 17 62 6 1 2 4 9 17 62 67 7 1 2 4 9 17 62 67 91 8 1 2 4 9 17 62 67 91 96 10 1 5 1 2 4 9 17 62 67 91 96 12 1 5 1 2 3 2 4 9 17 62 67 91 96 14 1 5 8 5 1 2 3 2 4 9 17 62 67 91 96 16 1 5 8 5 1 2 3 6 3 2 4 9 17 62 67 91 96 18 1 5 8 19 8 5 1 2 ...
result:
ok All testcases are passed!
Test #9:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
100 100 1 1 1 2 4 5 4 2 8 8 4 9 11 9 5 6 2 2 3 6 5 8 1 23 5 2 15 13 13 17 8 15 24 13 25 6 3 9 22 34 32 23 39 7 39 30 44 28 36 16 34 50 45 48 2 14 23 21 37 57 39 9 14 20 42 10 22 12 49 34 40 17 69 48 74 15 8 47 14 39 43 1 60 50 3 5 32 87 79 68 7 2 65 27 67 72 26 29 86 59 100 2 1 1 2 4 5 4 2 8 8 4 9 1...
output:
0 1 1 1 2 2 1 2 4 3 1 2 4 11 4 1 2 4 11 13 5 1 2 4 11 13 28 6 1 2 4 11 13 28 48 7 1 2 4 11 13 28 48 74 8 1 2 4 11 13 28 48 74 75 10 1 2 4 5 4 11 13 28 48 74 75 12 1 2 8 2 4 5 4 11 13 28 48 74 75 14 1 2 8 2 4 5 6 5 4 11 13 28 48 74 75 16 1 3 1 2 8 2 4 5 6 5 4 11 13 28 48 74 75 18 1 23 1 ...
result:
ok All testcases are passed!
Test #10:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
100 100 1 1 1 1 2 2 5 7 3 4 5 7 12 4 9 1 7 11 2 4 19 6 22 5 21 11 12 6 3 9 21 2 22 28 25 23 20 31 7 28 34 13 32 8 5 44 8 24 43 39 44 42 34 36 6 37 42 54 13 46 49 27 51 24 42 2 13 37 66 66 59 7 65 4 14 27 28 26 52 68 25 61 51 40 31 49 64 42 40 44 8 33 22 13 38 32 88 62 93 88 100 2 1 1 1 2 2 5 7 3 4 5...
output:
0 1 1 1 2 2 1 2 5 3 1 2 5 7 4 1 2 5 7 12 5 1 2 5 7 12 13 6 1 2 5 7 12 13 42 7 1 2 5 7 12 13 42 88 8 1 2 5 7 12 13 42 88 100 10 1 2 6 2 5 7 12 13 42 88 100 12 1 2 19 2 6 2 5 7 12 13 42 88 100 14 1 2 32 2 19 2 6 2 5 7 12 13 42 88 100 16 1 4 1 2 32 2 19 2 6 2 5 7 12 13 42 88 100 18 1 4 1 2...
result:
ok All testcases are passed!
Test #11:
score: 0
Accepted
time: 1ms
memory: 4072kb
input:
100 100 1 1 2 1 1 4 4 5 8 7 8 10 7 11 12 8 16 2 14 17 7 6 14 5 5 8 5 23 11 19 30 7 23 3 14 10 33 11 30 39 33 15 34 39 24 37 33 34 35 15 39 19 37 40 51 7 12 10 57 29 26 22 18 44 63 4 37 6 38 23 48 47 13 19 41 73 67 8 65 14 42 47 1 15 78 48 27 25 45 15 37 23 32 18 57 14 14 83 58 78 100 2 1 2 1 1 4 4 5...
output:
0 1 1 1 5 2 1 5 8 3 1 5 8 11 4 1 5 8 11 14 5 1 5 8 11 14 23 6 1 5 8 11 14 23 33 7 1 5 8 11 14 23 33 37 8 1 5 8 11 14 23 33 37 67 9 1 5 8 11 14 23 33 37 67 77 11 1 4 1 5 8 11 14 23 33 37 67 77 13 1 4 7 4 1 5 8 11 14 23 33 37 67 77 15 1 4 7 4 1 2 1 5 8 11 14 23 33 37 67 77 17 1 4 7 10 7 4...
result:
ok All testcases are passed!
Test #12:
score: 0
Accepted
time: 1ms
memory: 4076kb
input:
100 100 1 1 1 2 1 5 2 5 5 9 2 10 9 1 14 11 14 10 6 8 4 11 1 2 14 17 17 3 7 24 18 29 26 32 17 25 21 23 37 12 39 33 4 7 8 8 28 11 45 38 25 7 29 29 52 46 3 29 10 6 22 53 40 14 41 19 32 55 33 42 8 58 16 35 59 4 64 66 3 9 29 7 69 60 60 4 1 37 5 3 6 7 67 44 2 17 60 28 79 31 100 2 1 1 2 1 5 2 5 5 9 2 10 9 ...
output:
0 1 1 1 2 2 1 2 4 3 1 2 4 21 4 1 2 4 21 37 5 1 2 4 21 37 39 6 1 2 4 21 37 39 41 7 1 2 4 21 37 39 41 65 9 1 5 1 2 4 21 37 39 41 65 11 1 14 1 5 1 2 4 21 37 39 41 65 13 1 14 1 5 9 5 1 2 4 21 37 39 41 65 15 1 14 1 5 9 5 1 2 7 2 4 21 37 39 41 65 17 1 14 17 14 1 5 9 5 1 2 7 2 4 21 37 39 41 65 ...
result:
ok All testcases are passed!
Test #13:
score: 0
Accepted
time: 2ms
memory: 4108kb
input:
100 100 34 1 1 3 1 4 3 3 2 5 5 3 1 6 4 3 7 1 18 2 5 12 15 2 14 16 10 20 15 12 26 3 27 5 6 35 14 26 6 35 39 37 6 38 27 8 7 21 38 14 22 35 33 33 43 16 29 26 4 47 59 47 7 34 62 21 56 24 13 28 10 28 36 50 64 50 26 48 17 34 46 57 17 34 22 46 50 20 10 85 35 88 38 49 88 94 82 50 44 21 100 74 1 1 2 3 3 6 7 ...
output:
59 1 5 34 5 21 5 10 27 10 5 1 2 20 88 20 2 1 3 12 22 85 22 12 3 8 46 8 3 7 47 7 17 7 3 4 15 29 57 82 57 29 15 4 6 35 6 14 50 14 6 4 3 16 26 38 44 38 49 94 96 136 1 41 53 91 53 41 1 2 27 2 9 65 86 65 9 64 85 64 9 16 9 2 4 98 4 2 1 3 61 3 5 42 96 42 52 95 52 42 5 3 6 23 6 14 32 84 32 79 32 47 32 38 8...
result:
ok All testcases are passed!
Test #14:
score: 0
Accepted
time: 2ms
memory: 3880kb
input:
100 100 50 1 2 3 3 4 3 7 5 2 8 1 6 3 7 13 12 10 17 19 6 9 15 1 5 24 7 13 21 26 9 19 25 20 14 16 32 26 7 17 32 27 41 39 14 23 23 38 45 41 30 27 49 52 47 39 48 18 31 40 8 4 43 38 63 12 47 49 21 60 29 17 32 63 5 62 46 29 27 64 28 52 8 25 50 5 82 70 83 39 36 28 35 33 85 54 48 51 51 50 100 10 1 1 1 1 3 5...
output:
90 1 24 26 38 64 38 48 38 26 30 51 30 26 24 1 2 10 2 3 14 45 14 35 14 3 7 39 7 27 52 82 52 54 52 27 7 15 23 46 23 15 7 8 83 8 7 3 5 25 33 25 5 9 5 3 4 62 4 6 21 29 21 6 13 28 13 16 36 16 13 6 4 3 2 1 12 17 40 60 70 60 40 17 19 32 41 43 41 50 85 95 9 1 3 6 11 14 19 26 42 48 86 126 1 2 63 97 63 2 20...
result:
ok All testcases are passed!
Test #15:
score: 0
Accepted
time: 2ms
memory: 3816kb
input:
100 100 29 1 2 2 2 1 3 5 1 6 1 7 2 7 11 4 5 1 11 13 15 10 9 1 6 20 26 3 28 15 17 25 26 25 29 3 8 6 14 1 40 29 1 27 33 16 3 1 37 17 27 29 25 4 23 22 34 32 16 23 45 60 9 58 20 15 7 18 61 16 19 58 52 21 32 33 25 10 68 9 44 37 39 82 13 4 45 53 88 32 66 18 5 38 78 36 70 7 16 40 100 98 1 2 1 3 4 5 7 4 5 8...
output:
48 1 18 1 11 15 11 1 9 1 6 25 53 25 32 25 6 10 6 1 2 5 8 37 8 5 2 4 16 4 2 3 28 29 28 3 7 14 7 3 2 13 20 26 27 26 33 45 61 69 182 1 44 1 22 78 22 1 19 61 19 45 72 84 72 74 72 45 19 29 94 29 39 81 39 29 19 1 12 98 12 92 12 38 93 38 12 1 4 24 25 85 25 30 25 26 28 26 25 24 4 9 40 9 4 6 32 52 100 52 69...
result:
ok All testcases are passed!
Test #16:
score: 0
Accepted
time: 2ms
memory: 3816kb
input:
100 100 78 1 2 1 4 4 5 1 4 5 6 1 9 7 8 12 14 16 16 12 20 14 22 1 9 22 3 25 17 12 20 25 8 26 6 24 29 23 26 12 26 18 26 22 8 26 30 27 2 30 11 10 32 31 2 49 24 27 39 4 34 36 29 40 25 4 51 21 50 59 17 25 42 15 8 15 24 54 61 39 42 9 48 75 10 58 70 36 23 59 89 81 6 82 85 52 52 14 25 99 100 69 1 1 3 3 3 1 ...
output:
144 1 24 77 24 36 88 36 24 1 12 40 12 30 50 69 50 30 12 20 31 54 78 54 31 20 21 68 21 20 12 16 18 42 81 92 81 42 73 42 18 16 12 1 8 75 84 75 8 15 76 15 74 15 8 1 2 49 2 3 27 58 86 58 27 48 83 48 27 3 2 1 4 66 4 9 82 94 82 9 25 99 100 99 25 72 25 32 25 9 4 6 93 6 11 51 67 51 11 6 4 5 10 85 95 85 10 5...
result:
ok All testcases are passed!
Test #17:
score: 0
Accepted
time: 2ms
memory: 3816kb
input:
100 100 56 1 2 2 3 3 4 1 8 8 9 5 4 12 10 4 7 7 10 6 8 15 14 2 9 19 20 25 24 21 21 31 9 33 28 34 21 3 33 24 26 22 28 10 28 18 16 11 43 6 8 13 36 35 32 19 50 24 33 46 11 30 57 60 46 9 12 58 21 44 19 66 62 30 13 61 63 35 25 63 27 75 78 52 57 58 34 19 28 30 29 16 68 87 77 33 42 35 88 89 100 57 1 1 1 1 4...
output:
102 1 8 21 31 32 31 21 30 62 30 21 8 10 44 10 19 88 19 26 19 10 15 22 42 22 15 10 8 9 66 9 33 34 87 34 36 34 33 9 25 28 89 100 89 28 43 28 35 78 35 28 25 9 11 61 11 9 8 1 2 24 58 68 58 24 29 24 2 4 16 4 13 75 13 52 13 4 7 18 46 60 46 18 7 4 2 3 5 12 14 12 5 3 6 20 27 20 6 50 57 63 77 95 103 1 10 1 ...
result:
ok All testcases are passed!