QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#372585 | #1854. Hamiltonian Path | ZhaoZiLong | AC ✓ | 44ms | 3928kb | C++20 | 905b | 2024-03-31 15:57:52 | 2024-03-31 15:57:53 |
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: 3908kb
input:
3 5 3 2 8 2 4 13 5 7
output:
2 0 3 1 4 -1 0 5 10 3 8 1 6 11 4 9 2 7 12
result:
ok T=3
Test #2:
score: 0
Accepted
time: 44ms
memory: 3908kb
input:
1 1000000 2 3
output:
1 3 0 2 4 6 8 5 7 9 11 13 10 12 14 16 18 15 17 19 21 23 20 22 24 26 28 25 27 29 31 33 30 32 34 36 38 35 37 39 41 43 40 42 44 46 48 45 47 49 51 53 50 52 54 56 58 55 57 59 61 63 60 62 64 66 68 65 67 69 71 73 70 72 74 76 78 75 77 79 81 83 80 82 84 86 88 85 87 89 91 93 90 92 94 96 98 95 97 99 101 103 10...
result:
ok T=1
Test #3:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
1 1000000 16 3
output:
-1
result:
ok T=1
Test #4:
score: 0
Accepted
time: 23ms
memory: 3888kb
input:
8202 64 8 13 46 9 37 54 53 46 60 3 56 61 23 57 54 15 8 66 6 18 62 12 28 65 64 8 55 27 19 62 39 23 59 58 27 66 10 23 64 9 56 70 3 20 54 13 5 65 26 63 67 22 62 70 32 37 68 40 4 60 17 55 55807 50524 9951 62 11 56 51 25 23 58 43 23 78 11 74 63 54 36 50 38 31 60 42 19 61 37 25 57 43 39 74 24 12 54 28 29 ...
output:
0 8 16 3 11 19 6 14 1 9 17 4 12 20 7 15 2 10 18 5 13 21 29 37 24 32 40 27 35 22 30 38 25 33 41 28 36 23 31 39 26 34 42 50 58 45 53 61 48 56 43 51 59 46 54 62 49 57 44 52 60 47 55 63 8 17 26 35 44 7 16 25 34 43 6 15 24 33 42 5 14 23 32 41 4 13 22 31 40 3 12 21 30 39 2 11 20 29 38 1 10 19 28 37 0 9 1...
result:
ok T=8202
Test #5:
score: 0
Accepted
time: 9ms
memory: 3788kb
input:
9120 59 22 7 54 14 39 53 32 47 54 11 16 58 16 13 53 26 24 45 8 37 49 31 19 59 46 13 61 34 60 48 25 23 52 6 51 42 29 14 54 26 27 55 43 22 50 30 19 52 46 32 58 17 42 52 4 14 54 27 26 56 19 10 63 36 14 52 11 40 61 33 28 55 32 23 66 16 51 47 19 29 47 13 20 65 49 15 46 7 39 46 5 11 56 17 40 55 3 23 67 31...
output:
0 22 15 8 1 23 16 9 2 24 17 10 3 25 18 11 4 26 19 12 5 27 20 13 6 28 21 14 7 29 51 44 37 30 52 45 38 31 53 46 39 32 54 47 40 33 55 48 41 34 56 49 42 35 57 50 43 36 58 0 14 28 42 3 17 31 45 6 20 34 48 9 23 37 51 12 26 40 1 15 29 43 4 18 32 46 7 21 35 49 10 24 38 52 13 27 41 2 16 30 44 5 19 33 47 8 2...
result:
ok T=9120
Test #6:
score: 0
Accepted
time: 16ms
memory: 3928kb
input:
8009 56 13 12 62 34 27 60 60 49 69 11 23 68 6 49 57 22 35 78 24 39 66 55 48 62 48 44 63 60 33 64 40 28 68 34 35 68 2 15 55 30 52 71 7 5 59 47 12 55 17 11 76 9 67 62 58 5 55 4 23 62 6 25 80 27 36 42 40 3 51 14 37 58 12 17 64 25 31 57 14 43 70 44 27 79 78 69 67 53 13 57 6 23 54 30 23 71 16 43 62 58 58...
output:
-1 0 34 7 41 14 48 21 55 28 1 35 8 42 15 49 22 56 29 2 36 9 43 16 50 23 57 30 3 37 10 44 17 51 24 58 31 4 38 11 45 18 52 25 59 32 5 39 12 46 19 53 26 60 33 6 40 13 47 20 54 27 61 -1 0 11 22 33 10 21 32 9 20 31 8 19 30 7 18 29 6 17 28 5 16 27 4 15 26 3 14 25 2 13 24 1 12 23 34 45 56 67 44 55 66 43 5...
result:
ok T=8009
Test #7:
score: 0
Accepted
time: 21ms
memory: 3808kb
input:
5873 82 21 5 84 72 20 96 25 42 90 61 76 74 48 22 80 53 27 77 4 27 82 49 34 89 19 25 77 38 49 85 11 32 79 63 16 84 2 19 86 12 17 86 5 81 81 49 42 96 32 32 70 47 48 86 21 12 77 23 16 89 74 20 93 10 21 101 32 14 90 59 30 83 78 5 78 15 64 86 61 54 84 37 47 86 51 55 73 36 11 90 47 25 92 87 10 73 13 23 86...
output:
-1 -1 -1 -1 -1 52 25 78 51 24 77 50 23 76 49 22 75 48 21 74 47 20 73 46 19 72 45 18 71 44 17 70 43 16 69 42 15 68 41 14 67 40 13 66 39 12 65 38 11 64 37 10 63 36 9 62 35 8 61 34 7 60 33 6 59 32 5 58 31 4 57 30 3 56 29 2 55 28 1 54 27 0 53 26 79 -1 48 14 63 29 78 44 10 59 25 74 40 6 55 21 70 36 2 51...
result:
ok T=5873
Test #8:
score: 0
Accepted
time: 34ms
memory: 3792kb
input:
9253 59 12 47 44 34 34 56 53 2 49 19 41 47 12 17 52 48 5 48 33 41 53 35 18 54 28 27 45 37 8 61 59 35 54 29 22 48 13 11 59 15 43 53 16 11 53 29 30 47 8 39 46 46 15 44 28 43 54 46 42 41 17 4 50 19 30 51 50 10 58 33 44 42 30 27 54 13 46 54 50 19 46 36 11 58 45 44 53 5 49 53 10 38 61 51 24 52 40 19 48 4...
output:
11 23 35 47 0 12 24 36 48 1 13 25 37 49 2 14 26 38 50 3 15 27 39 51 4 16 28 40 52 5 17 29 41 53 6 18 30 42 54 7 19 31 43 55 8 20 32 44 56 9 21 33 45 57 10 22 34 46 58 -1 0 53 51 49 47 45 43 41 39 37 35 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 54 52 50 48 46 44 42 40 38 36 34 32 30 28 26 24 22 ...
result:
ok T=9253
Test #9:
score: 0
Accepted
time: 27ms
memory: 3872kb
input:
5102 114 56 72 107 18 89 89 5 28 108 74 35 101 49 56 110 28 16 81 5 81 93 43 49 81 81 52 106 96 73 82 66 52 90 22 83 91 3 7 115 9 10 97 27 15 107 61 46 87 31 55 107 20 27 106 25 43 114 29 84 104 88 11 109 41 67 95 85 55 101 93 58 92 9 22 105 25 81 123 78 44 102 73 28 106 19 16 82 50 31 98 41 56 95 8...
output:
-1 17 35 53 71 89 0 18 36 54 72 90 1 19 37 55 73 91 2 20 38 56 74 92 3 21 39 57 75 93 4 22 40 58 76 94 5 23 41 59 77 95 6 24 42 60 78 96 7 25 43 61 79 97 8 26 44 62 80 98 9 27 45 63 81 99 10 28 46 64 82 100 11 29 47 65 83 101 12 30 48 66 84 102 13 31 49 67 85 103 14 32 50 68 86 104 15 33 51 69 87 10...
result:
ok T=5102
Test #10:
score: 0
Accepted
time: 22ms
memory: 3908kb
input:
8206 57 14 6 69 7 27 56 6 22 61 30 44 66 16 34 67 33 35 64 2 29 62 37 29 60 47 14 62 19 44 68 67 2 59 27 32 60 50 25 53 31 21 63 8 23 75 16 60 60 17 43 46 14 31 65 59 7 57 35 28 47 8 39 61 29 32 71 61 9 73 19 24 52 46 14 55 40 28 59 31 29 61 14 17 56 21 34 54 6 47 73 5 48 70 42 13 59 23 7 73 51 60 5...
output:
-1 0 7 14 21 28 1 8 15 22 29 2 9 16 23 30 3 10 17 24 31 4 11 18 25 32 5 12 19 26 33 6 13 20 27 34 41 48 55 62 35 42 49 56 63 36 43 50 57 64 37 44 51 58 65 38 45 52 59 66 39 46 53 60 67 40 47 54 61 68 -1 -1 -1 32 65 30 63 28 61 26 59 24 57 22 55 20 53 18 51 16 49 14 47 12 45 10 43 8 41 6 39 4 37 2 3...
result:
ok T=8206
Test #11:
score: 0
Accepted
time: 24ms
memory: 3788kb
input:
7456 72 15 42 61 21 5 72 54 55 63 16 5 50 40 48 68 15 22 53 43 11 58 21 5 65 21 43 69 50 9 68 31 36 60 6 15 64 13 8 63 30 37 73 36 37 70 55 14 61 3 2 72 61 37 63 13 18 63 45 41 72 53 18 61 5 7 57 55 33 61 52 9 67 59 55 69 29 39 70 8 61 55 6 34 65 55 9 63 48 44 70 59 26 55 19 18 65 25 39 64 45 32 63 ...
output:
-1 -1 -1 15 10 5 0 16 11 6 1 17 12 7 2 18 13 8 3 19 14 9 4 20 36 31 26 21 37 32 27 22 38 33 28 23 39 34 29 24 40 35 30 25 41 57 52 47 42 58 53 48 43 59 54 49 44 60 55 50 45 61 56 51 46 62 -1 -1 42 31 20 9 52 41 30 19 8 51 40 29 18 7 50 39 28 17 6 49 38 27 16 5 48 37 26 15 4 47 36 25 14 3 46 35 24 1...
result:
ok T=7456
Test #12:
score: 0
Accepted
time: 8ms
memory: 3852kb
input:
6656 69 41 32 67 20 11 75 54 61 81 69 53 84 50 53 69 35 33 79 62 17 77 69 8 62 18 11 69 6 11 73 29 43 85 24 75 76 14 75 74 23 50 67 17 5 72 59 64 80 51 31 73 28 21 71 39 32 75 21 49 81 66 80 87 57 39 86 83 2 75 35 30 76 26 49 84 78 7 81 41 40 85 78 37 60 25 40 73 67 5 69 61 7 82 57 36 58 49 4 82 51 ...
output:
-1 -1 -1 -1 -1 0 35 2 37 4 39 6 41 8 43 10 45 12 47 14 49 16 51 18 53 20 55 22 57 24 59 26 61 28 63 30 65 32 67 34 1 36 3 38 5 40 7 42 9 44 11 46 13 48 15 50 17 52 19 54 21 56 23 58 25 60 27 62 29 64 31 66 33 68 61 44 27 10 72 55 38 21 4 66 49 32 15 77 60 43 26 9 71 54 37 20 3 65 48 31 14 76 59 42 ...
result:
ok T=6656
Test #13:
score: 0
Accepted
time: 23ms
memory: 3772kb
input:
5920 90 9 80 76 26 27 91 4 5 82 11 9 89 50 76 89 13 75 55522 44908 10615 105 104 8 91 34 11 90 49 69 110 92 24 89 2 61 94 19 74 84 17 11 77 53 25 97 24 25 79 8 5 74 29 46 83 12 28 70 14 9 95 47 48 89 56 89 87 75 7 85 83 4 103 24 88 78 57 31 83 53 59 85 5 7 87 51 37 98 21 76 86 36 33 82 52 29 99 11 9...
output:
0 9 18 27 36 45 54 63 72 81 1 10 19 28 37 46 55 64 73 82 2 11 20 29 38 47 56 65 74 83 3 12 21 30 39 48 57 66 75 84 4 13 22 31 40 49 58 67 76 85 5 14 23 32 41 50 59 68 77 86 6 15 24 33 42 51 60 69 78 87 7 16 25 34 43 52 61 70 79 88 8 17 26 35 44 53 62 71 80 89 -1 0 4 8 3 7 2 6 1 5 9 13 17 12 16 11 1...
result:
ok T=5920
Test #14:
score: 0
Accepted
time: 24ms
memory: 3804kb
input:
7380 82 25 74 63 35 60 72 5 3 74 24 49 71 68 37 59 19 40 61 47 52 68 46 68 56 20 35 52 27 26 56 42 22 60 50 11 61 24 7 69 2 15 65 42 64 67 17 50 55 35 2 79 2 11 65 14 51 67 61 44 64 25 39 68 11 5 79 30 67 67 52 15 63 54 20 75 44 9 70 3 32 74 27 28 72 60 11 73 29 7 74 13 61 79 12 67 66 10 44 60 57 31...
output:
-1 -1 4 1 6 3 0 5 2 7 12 9 14 11 8 13 10 15 20 17 22 19 16 21 18 23 28 25 30 27 24 29 26 31 36 33 38 35 32 37 34 39 44 41 46 43 40 45 42 47 52 49 54 51 48 53 50 55 60 57 62 59 56 61 58 63 68 65 70 67 64 69 66 71 0 24 48 72 23 47 71 22 46 70 21 45 69 20 44 68 19 43 67 18 42 66 17 41 65 16 40 64 15 3...
result:
ok T=7380
Test #15:
score: 0
Accepted
time: 23ms
memory: 3732kb
input:
6287 85 4 3 82 54 25 99 56 43 73 8 65 80 7 33 83 4 52 81 42 65 97 53 44 76 13 12 95 57 44 86 5 12 76 22 47 84 75 45 94 82 65 104 49 2 83 23 59 89 12 22 94 70 64 64 61 2 98 35 64 82 3 38 69 25 9 77 5 21 72 58 3 87 70 15 73 69 4 70 13 69 82 57 11 94 93 39 98 71 40 74 48 57 80 12 67 75 19 25 88 13 79 7...
output:
0 4 1 5 2 6 3 7 11 8 12 9 13 10 14 18 15 19 16 20 17 21 25 22 26 23 27 24 28 32 29 33 30 34 31 35 39 36 40 37 41 38 42 46 43 47 44 48 45 49 53 50 54 51 55 52 56 60 57 61 58 62 59 63 67 64 68 65 69 66 70 74 71 75 72 76 73 77 81 78 82 79 83 80 84 -1 55 12 68 25 81 38 94 51 8 64 21 77 34 90 47 4 60 17...
result:
ok T=6287
Test #16:
score: 0
Accepted
time: 22ms
memory: 3908kb
input:
5175 106 50 3 74 55 9 75 17 21 87 83 83 83 9 74 78 64 15 93 73 21 110 90 19 104 68 37 100 77 40 100 91 9 93 11 35 89 71 19 96 43 5 91 80 44 106 34 19 79 71 19 96 74 21 104 24 79 93 93 31 100 45 89 83 46 37 106 14 35 93 86 64 95 13 35 98 36 97 94 24 44 100 33 3 84 31 11 83 60 70 101 17 39 81 45 37 10...
output:
49 46 43 40 37 34 31 28 25 22 19 16 13 10 7 4 1 51 48 45 42 39 36 33 30 27 24 21 18 15 12 9 6 3 0 50 47 44 41 38 35 32 29 26 23 20 17 14 11 8 5 2 52 102 99 96 93 90 87 84 81 78 75 72 69 66 63 60 57 54 104 101 98 95 92 89 86 83 80 77 74 71 68 65 62 59 56 53 103 100 97 94 91 88 85 82 79 76 73 70 67 64...
result:
ok T=5175
Test #17:
score: 0
Accepted
time: 38ms
memory: 3736kb
input:
5956 76 47 29 95 29 66 84 5 65 98 39 10 84 13 29 76 58 33 83 36 5 73 29 43 83 44 39 83 57 32 90 39 50 70 40 5 76 61 2 81 8 11 94 15 30 79 23 68 78 53 24 92 43 50 85 6 34 74 1 45 95 68 27 91 23 68 94 78 17 73 36 55 100 28 29 95 7 73 78 55 62 82 28 55 95 66 29 98 21 63 81 77 73 94 2 29 78 32 55 93 87 ...
output:
46 17 64 35 6 53 24 71 42 13 60 31 2 49 20 67 38 9 56 27 74 45 16 63 34 5 52 23 70 41 12 59 30 1 48 19 66 37 8 55 26 73 44 15 62 33 4 51 22 69 40 11 58 29 0 47 18 65 36 7 54 25 72 43 14 61 32 3 50 21 68 39 10 57 28 75 28 57 86 20 49 78 12 41 70 4 33 62 91 25 54 83 17 46 75 9 38 67 1 30 59 88 22 51 ...
result:
ok T=5956
Test #18:
score: 0
Accepted
time: 12ms
memory: 3844kb
input:
6233 78 66 73 66 54 13 95 79 36 100 3 72 79 39 41 95 29 67 82 74 44 77 4 24 74 32 69 79 76 67 82 13 14 82 17 5 78 62 53 81 66 57 92 16 75 88 87 48 71 5 7 86 31 62 75 47 27 99 73 60 80 6 65 82 4 5 90 53 37 92 51 34 96 58 39 92 83 18 71 49 59 77 9 65 88 11 78 77 1 21 75 41 35 75 23 51 59 12 17 77 24 5...
output:
-1 53 40 27 14 1 55 42 29 16 3 57 44 31 18 5 59 46 33 20 7 61 48 35 22 9 63 50 37 24 11 65 52 39 26 13 0 54 41 28 15 2 56 43 30 17 4 58 45 32 19 6 60 47 34 21 8 62 49 36 23 10 64 51 38 25 12 -1 -1 38 77 36 75 34 73 32 71 30 69 28 67 26 65 24 63 22 61 20 59 18 57 16 55 14 53 12 51 10 49 8 47 6 45 4 ...
result:
ok T=6233
Test #19:
score: 0
Accepted
time: 34ms
memory: 3920kb
input:
9514 52 5 29 51 19 12 48 23 3 47 13 32 51 33 17 50 30 6 57 6 23 45 33 13 69 50 27 58 13 46 55 4 5 58 24 15 54 15 19 48 38 9 46 3 44 51 35 38 59 37 29 50 33 16 50 41 29 57 38 42 47 12 11 50 38 11 63 55 60 57 14 8 56 19 36 57 22 16 53 4 35 51 15 29 48 6 43 47 13 7 50 10 41 57 48 34 47 17 39 41 1 7 42 ...
output:
-1 -1 -1 -1 0 33 16 49 32 15 48 31 14 47 30 13 46 29 12 45 28 11 44 27 10 43 26 9 42 25 8 41 24 7 40 23 6 39 22 5 38 21 4 37 20 3 36 19 2 35 18 1 34 17 50 -1 5 11 17 23 0 6 12 18 24 1 7 13 19 25 2 8 14 20 26 3 9 15 21 27 4 10 16 22 28 34 40 46 52 29 35 41 47 53 30 36 42 48 54 31 37 43 49 55 32 38 4...
result:
ok T=9514
Test #20:
score: 0
Accepted
time: 22ms
memory: 3884kb
input:
8626 58 13 45 59 28 30 58 24 11 56 12 26 58 20 9 75 23 14 59 51 7 45 34 16 59 21 37 45 15 31 58 17 2 54 41 13 59 2 27 59 26 7 55 8 19 59 4 55 59 14 8 53 36 38 61 19 41 53 45 31 58 2 15 48 42 27 63 53 26 70 62 55 54 50 3 69 29 6 42 39 18 68 3 31 47 34 19 63 53 46 59 55 3 59 43 55 65 44 36 53 12 29 63...
output:
12 25 38 51 6 19 32 45 0 13 26 39 52 7 20 33 46 1 14 27 40 53 8 21 34 47 2 15 28 41 54 9 22 35 48 3 16 29 42 55 10 23 36 49 4 17 30 43 56 11 24 37 50 5 18 31 44 57 -1 -1 -1 19 10 1 21 12 3 23 14 5 25 16 7 27 18 9 0 20 11 2 22 13 4 24 15 6 26 17 8 28 48 39 30 50 41 32 52 43 34 54 45 36 56 47 38 29 4...
result:
ok T=8626
Test #21:
score: 0
Accepted
time: 25ms
memory: 3804kb
input:
8221 77 44 15 64 48 17 53 8 22 70 62 7 60 41 20 65 27 14 67 11 6 63 12 56 64 63 16 43 2 43 53 37 33 52 23 3 56 20 21 48 8 5 69 11 58 65 23 59 55 47 7 59 39 6 51 31 21 75 17 58 59 11 47 61 16 40 46 10 23 58 55 4 62 8 23 69 11 42 50 7 21 68 15 66 61 21 52 63 31 32 59 3 55 66 11 27 75 65 9 47 43 5 59 1...
output:
-1 47 30 13 61 44 27 10 58 41 24 7 55 38 21 4 52 35 18 1 49 32 15 63 46 29 12 60 43 26 9 57 40 23 6 54 37 20 3 51 34 17 0 48 31 14 62 45 28 11 59 42 25 8 56 39 22 5 53 36 19 2 50 33 16 -1 0 62 55 48 41 34 27 20 13 6 68 61 54 47 40 33 26 19 12 5 67 60 53 46 39 32 25 18 11 4 66 59 52 45 38 31 24 17 1...
result:
ok T=8221
Test #22:
score: 0
Accepted
time: 9ms
memory: 3788kb
input:
7949 63 56 48 63 30 19 70 6 29 64 12 53 66 13 54 62 18 33 75 5 32 62 36 25 59 46 13 65 19 45 74 3 71 68 22 47 68 4 65 74 22 62 64 32 25 60 38 48 76 31 44 68 9 46 80 67 14 57 28 25 48 23 24 56 25 32 64 60 30 73 5 19 74 8 17 59 27 2 79 23 41 68 68 35 73 17 24 51 40 24 67 17 49 65 2 63 72 28 45 57 29 4...
output:
-1 -1 5 11 17 23 29 0 6 12 18 24 30 1 7 13 19 25 31 2 8 14 20 26 32 3 9 15 21 27 33 4 10 16 22 28 34 40 46 52 58 64 35 41 47 53 59 65 36 42 48 54 60 66 37 43 49 55 61 67 38 44 50 56 62 68 39 45 51 57 63 69 11 23 35 47 59 6 18 30 42 54 1 13 25 37 49 61 8 20 32 44 56 3 15 27 39 51 63 10 22 34 46 58 5...
result:
ok T=7949
Test #23:
score: 0
Accepted
time: 12ms
memory: 3888kb
input:
5677 105 48 5 90 13 2 95 68 58 88 23 10 91 9 83 77 29 10 92 27 64 85 37 47 88 78 87 79 73 8 103 95 100 92 4 87 82 34 47 87 9 2 80 76 42 89 59 74 88 82 32 83 51 29 78 6 25 66 5 6 95 31 63 94 56 64 94 8 93 88 22 65 85 5 16 76 2 23 92 13 10 69 29 5 91 31 15 89 48 57 98 95 46 100 49 75 96 29 22 92 60 76...
output:
47 42 37 32 27 22 17 12 7 2 50 45 40 35 30 25 20 15 10 5 0 48 43 38 33 28 23 18 13 8 3 51 46 41 36 31 26 21 16 11 6 1 49 44 39 34 29 24 19 14 9 4 52 100 95 90 85 80 75 70 65 60 55 103 98 93 88 83 78 73 68 63 58 53 101 96 91 86 81 76 71 66 61 56 104 99 94 89 84 79 74 69 64 59 54 102 97 92 87 82 77 72...
result:
ok T=5677
Test #24:
score: 0
Accepted
time: 19ms
memory: 3784kb
input:
7302 71 50 69 72 29 44 76 8 14 73 69 5 70 35 69 71 63 8 66 38 19 69 37 32 64 50 13 75 70 55 65 45 23 74 6 67 80 16 11 76 14 32 75 46 38 78 25 52 71 28 64 67 48 19 59 35 22 68 59 45 62 56 5 75 34 19 56 5 14 72 3 68 69 34 24 65 33 32 72 58 45 66 15 52 83 15 15 76 75 23 72 6 65 73 22 51 71 48 45 79 8 3...
output:
-1 28 57 13 42 71 27 56 12 41 70 26 55 11 40 69 25 54 10 39 68 24 53 9 38 67 23 52 8 37 66 22 51 7 36 65 21 50 6 35 64 20 49 5 34 63 19 48 4 33 62 18 47 3 32 61 17 46 2 31 60 16 45 1 30 59 15 44 0 29 58 14 43 -1 68 63 58 53 48 43 38 33 28 23 18 13 8 3 72 67 62 57 52 47 42 37 32 27 22 17 12 7 2 71 6...
result:
ok T=7302
Test #25:
score: 0
Accepted
time: 21ms
memory: 3888kb
input:
8731 58 5 49 59 19 40 59 14 17 60 20 39 51 3 2 64 50 49 70 69 58 62 8 14 47 2 10 45 7 2 55211 16 27 54 29 25 53 18 35 53 23 10 73 9 64 60 39 4 57 15 43 49 15 34 52 17 36 56 41 16 50 40 28 51 32 19 62 43 20 44 22 21 60 11 9 48 47 23 58 14 15 55 47 8 65 50 64 52 45 7 73 13 60 48 20 41 44 7 36 69 50 19...
output:
-1 18 37 56 16 35 54 14 33 52 12 31 50 10 29 48 8 27 46 6 25 44 4 23 42 2 21 40 0 19 38 57 17 36 55 15 34 53 13 32 51 11 30 49 9 28 47 7 26 45 5 24 43 3 22 41 1 20 39 58 -1 0 20 40 1 21 41 2 22 42 3 23 43 4 24 44 5 25 45 6 26 46 7 27 47 8 28 48 9 29 49 10 30 50 11 31 51 12 32 52 13 33 53 14 34 54 1...
result:
ok T=8731
Test #26:
score: 0
Accepted
time: 29ms
memory: 3800kb
input:
5110 98 23 74 84 58 15 103 13 21 93 60 46 82 46 35 101 4 97 115 108 7 108 91 18 81 24 37 124 66 59 85 67 19 80 6 73 88 6 43 103 89 14 103 21 83 113 12 40 97 2 58 93 37 9 109 53 57 103 49 55 101 2 99 85 16 80 99 79 86 95 53 43 101 94 76 120 110 63 111 3 55 94 24 7 94 64 75 103 17 35 111 46 9 102 2 89...
output:
0 23 46 69 92 18 41 64 87 13 36 59 82 8 31 54 77 3 26 49 72 95 21 44 67 90 16 39 62 85 11 34 57 80 6 29 52 75 1 24 47 70 93 19 42 65 88 14 37 60 83 9 32 55 78 4 27 50 73 96 22 45 68 91 17 40 63 86 12 35 58 81 7 30 53 76 2 25 48 71 94 20 43 66 89 15 38 61 84 10 33 56 79 5 28 51 74 97 -1 0 13 26 5 18...
result:
ok T=5110
Test #27:
score: 0
Accepted
time: 25ms
memory: 3840kb
input:
9658 51 30 24 50 11 40 70 20 40 59 51 36 51 47 3 53 8 24 42 32 9 45 41 20 49 40 40 60 2 60 63 13 51 56 5 2 43 7 4 64 12 64 60 29 31 57 30 23 59 2 13 58 50 56 55 4 23 52 31 20 43 35 33 50 16 35 64 37 46 53 19 7 50 36 41 38 8 33 57 15 4 53 8 31 50 30 19 58 50 15 57 4 15 60 40 36 48 18 4 59 16 13 45 6 ...
output:
-1 10 21 32 43 3 14 25 36 47 7 18 29 40 0 11 22 33 44 4 15 26 37 48 8 19 30 41 1 12 23 34 45 5 16 27 38 49 9 20 31 42 2 13 24 35 46 6 17 28 39 -1 -1 0 47 44 41 38 35 32 29 26 23 20 17 14 11 8 5 2 49 46 43 40 37 34 31 28 25 22 19 16 13 10 7 4 1 48 45 42 39 36 33 30 27 24 21 18 15 12 9 6 3 50 -1 0 3...
result:
ok T=9658
Test #28:
score: 0
Accepted
time: 8ms
memory: 3896kb
input:
6432 81 29 12 81 2 7 99 26 83 78 33 46 89 68 71 92 22 62 87 3 19 83 31 10 78 65 12 81 5 80 69 15 2 88 41 62 76 13 2 71 54 17 79 2 51 79 61 18 73 6 31 72 55 18 80 7 2 77 7 12 87 68 14 74 38 12 74 11 26 77 28 11 71 38 53 83 28 55 66 51 53 71 14 27 69 43 27 77 54 27 69 11 6 81 73 10 77 9 4 83 75 59 76 ...
output:
28 16 4 33 21 9 38 26 14 2 31 19 7 36 24 12 0 29 17 5 34 22 10 39 27 15 3 32 20 8 37 25 13 1 30 18 6 35 23 11 40 69 57 45 74 62 50 79 67 55 43 72 60 48 77 65 53 41 70 58 46 75 63 51 80 68 56 44 73 61 49 78 66 54 42 71 59 47 76 64 52 1 3 5 7 0 2 4 6 8 10 12 14 16 9 11 13 15 17 19 21 23 25 18 20 22 2...
result:
ok T=6432
Test #29:
score: 0
Accepted
time: 25ms
memory: 3844kb
input:
6677 72 61 43 84 19 65 74 16 9 65 9 4 84 35 30 70 27 13 83 5 54 80 7 9 76 9 67 77 49 4 78 3 25 75 24 28 76 2 13 73 25 60 74 58 29 70 3 68 90 7 38 68 55 56 72 1 39 85 37 47 70 9 26 93 19 28 71 41 56 88 67 41 76 6 48 80 58 9 67 44 58 67 23 45 71 8 63 82 33 65 72 12 65 86 76 11 57 5 23 88 71 53 78 32 7...
output:
-1 18 37 56 75 10 29 48 67 2 21 40 59 78 13 32 51 70 5 24 43 62 81 16 35 54 73 8 27 46 65 0 19 38 57 76 11 30 49 68 3 22 41 60 79 14 33 52 71 6 25 44 63 82 17 36 55 74 9 28 47 66 1 20 39 58 77 12 31 50 69 4 23 42 61 80 15 34 53 72 7 26 45 64 83 15 6 22 13 4 20 11 2 18 9 0 16 7 23 14 5 21 12 3 19 10...
result:
ok T=6677
Test #30:
score: 0
Accepted
time: 33ms
memory: 3744kb
input:
9861 49 5 43 50 24 47 42 31 35 55 51 4 48 48 20 50 17 17 51 37 15 56 52 26 38 13 6 54 22 6 50 8 17 54 17 52 50 35 14 43 40 3 52 2 25 52 35 17 44 27 41 54 15 50 48 19 29 52 5 17 72 19 5 44 2 29 53 9 45 35 14 25 46 25 29 46 2 32 39 17 9 57 25 33 49 5 49 59 28 14 53 5 4 66 36 37 44 9 25 43 37 14 54 29 ...
output:
0 5 10 15 20 25 30 35 40 45 2 7 12 17 22 27 32 37 42 47 4 9 14 19 24 29 34 39 44 1 6 11 16 21 26 31 36 41 46 3 8 13 18 23 28 33 38 43 48 -1 -1 50 46 42 38 34 30 26 22 18 14 10 6 2 53 49 45 41 37 33 29 25 21 17 13 9 5 1 52 48 44 40 36 32 28 24 20 16 12 8 4 0 51 47 43 39 35 31 27 23 19 15 11 7 3 54 ...
result:
ok T=9861
Test #31:
score: 0
Accepted
time: 2ms
memory: 3804kb
input:
5525 1 1 1 2 1 1 2 1 2 2 2 1 2 2 2 3 1 1 3 1 2 3 1 3 3 2 1 3 2 2 3 2 3 3 3 1 3 3 2 3 3 3 4 1 1 4 1 2 4 1 3 4 1 4 4 2 1 4 2 2 4 2 3 4 2 4 4 3 1 4 3 2 4 3 3 4 3 4 4 4 1 4 4 2 4 4 3 4 4 4 5 1 1 5 1 2 5 1 3 5 1 4 5 1 5 5 2 1 5 2 2 5 2 3 5 2 4 5 2 5 5 3 1 5 3 2 5 3 3 5 3 4 5 3 5 5 4 1 5 4 2 5 4 3 5 4 4 5...
output:
0 0 1 0 1 1 0 -1 0 1 2 0 1 2 0 1 2 2 1 0 -1 -1 2 1 0 -1 -1 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 3 2 1 0 -1 1 3 0 2 -1 3 2 1 0 2 0 3 1 -1 -1 3 2 1 0 -1 -1 -1 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 4 3 2 1 0 -1 1 3 0 2 4 -1 -1 4 3 2 1 0 2 0 3 1 4 -1 -1 -1 4 3 2 1 0 -1...
result:
ok T=5525
Test #32:
score: 0
Accepted
time: 2ms
memory: 3744kb
input:
9385 26 1 1 26 1 2 26 1 3 26 1 4 26 1 5 26 1 6 26 1 7 26 1 8 26 1 9 26 1 10 26 1 11 26 1 12 26 1 13 26 1 14 26 1 15 26 1 16 26 1 17 26 1 18 26 1 19 26 1 20 26 1 21 26 1 22 26 1 23 26 1 24 26 1 25 26 1 26 26 2 1 26 2 2 26 2 3 26 2 4 26 2 5 26 2 6 26 2 7 26 2 8 26 2 9 26 2 10 26 2 11 26 2 12 26 2 13 2...
output:
0 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 0 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 0 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 0 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 0 1 2 3 4 5 6 7 8 9 10 1...
result:
ok T=9385
Test #33:
score: 0
Accepted
time: 3ms
memory: 3876kb
input:
8911 36 1 1 36 1 2 36 1 3 36 1 4 36 1 5 36 1 6 36 1 7 36 1 8 36 1 9 36 1 10 36 1 11 36 1 12 36 1 13 36 1 14 36 1 15 36 1 16 36 1 17 36 1 18 36 1 19 36 1 20 36 1 21 36 1 22 36 1 23 36 1 24 36 1 25 36 1 26 36 1 27 36 1 28 36 1 29 36 1 30 36 1 31 36 1 32 36 1 33 36 1 34 36 1 35 36 1 36 36 2 1 36 2 2 36...
output:
0 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 0 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 0 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 0 1...
result:
ok T=8911
Test #34:
score: 0
Accepted
time: 4ms
memory: 3912kb
input:
9690 42 1 1 42 1 2 42 1 3 42 1 4 42 1 5 42 1 6 42 1 7 42 1 8 42 1 9 42 1 10 42 1 11 42 1 12 42 1 13 42 1 14 42 1 15 42 1 16 42 1 17 42 1 18 42 1 19 42 1 20 42 1 21 42 1 22 42 1 23 42 1 24 42 1 25 42 1 26 42 1 27 42 1 28 42 1 29 42 1 30 42 1 31 42 1 32 42 1 33 42 1 34 42 1 35 42 1 36 42 1 37 42 1 38 ...
output:
0 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 0 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 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2...
result:
ok T=9690
Test #35:
score: 0
Accepted
time: 4ms
memory: 3876kb
input:
9414 47 1 1 47 1 2 47 1 3 47 1 4 47 1 5 47 1 6 47 1 7 47 1 8 47 1 9 47 1 10 47 1 11 47 1 12 47 1 13 47 1 14 47 1 15 47 1 16 47 1 17 47 1 18 47 1 19 47 1 20 47 1 21 47 1 22 47 1 23 47 1 24 47 1 25 47 1 26 47 1 27 47 1 28 47 1 29 47 1 30 47 1 31 47 1 32 47 1 33 47 1 34 47 1 35 47 1 36 47 1 37 47 1 38 ...
output:
0 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 0 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 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1...
result:
ok T=9414