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