QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#74650#2264. Secrets of Legendary TreasureflywatreAC ✓4ms3816kbC++141023b2023-02-03 09:42:442023-02-03 09:42:47

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 3760kb

input:

100 100
1 2 3 4 6 10 11 14 17 18 19 21 24 25 26 27 29 32 34 35 36 37 39 40 44 49 52 53 55 59 65 66 67 68 73 74 81 82 83 85 86 88 89 90 96 98 99 102 103 104 106 107 108 116 117 118 121 124 127 128 129 130 131 132 134 137 138 139 141 145 148 149 152 153 154 156 157 158 161 162 163 167 169 170 173 174 ...

output:

1 2 3 4 6 10 11 14 17 18 19 21 24 25 26 27 29 32 34 35 36 37 39 40 44 49 52 53 55 59 65 66 67 68 73 74 81 82 83 85 86 88 89 90 96 98 99 102 103 104 106 107 108 116 117 118 121 124 127 128 129 130 131 132 134 137 138 139 141 145 148 149 152 153 154 156 157 158 161 162 163 167 169 170 173 174 175 177 ...

result:

ok correct

Test #2:

score: 0
Accepted
time: 2ms
memory: 3572kb

input:

99 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 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 100
37

output:

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 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 100 
37 

result:

ok correct

Test #3:

score: 0
Accepted
time: 2ms
memory: 3532kb

input:

90 96
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 92
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

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 92 
90 91 93 94 95 96 97 98 99 100 101 102...

result:

ok correct

Test #4:

score: 0
Accepted
time: 2ms
memory: 3728kb

input:

97 83
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

1 2 3 4 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 ...

result:

ok correct

Test #5:

score: 0
Accepted
time: 2ms
memory: 3640kb

input:

92 90
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
89 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

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 90 91 92 93 
89 94 95 96 97 98 99 100 101 102...

result:

ok correct

Test #6:

score: 0
Accepted
time: 1ms
memory: 3588kb

input:

96 100
97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172...

result:

ok correct

Test #7:

score: 0
Accepted
time: 2ms
memory: 3560kb

input:

87 98
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 87
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

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 100 101 102...

result:

ok correct

Test #8:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

83 83
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 ...

result:

ok correct

Test #9:

score: 0
Accepted
time: 2ms
memory: 3756kb

input:

94 89
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
95 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

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 100 101 102...

result:

ok correct

Test #10:

score: 0
Accepted
time: 2ms
memory: 3512kb

input:

95 99
100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 ...

result:

ok correct

Test #11:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

90 99
0 0 6 0 0 0 16 0 19 0 21 23 27 29 31 34 35 37 0 44 46 0 49 0 53 54 0 0 0 0 65 66 67 0 71 0 74 75 0 77 0 79 80 82 84 85 0 0 95 97 102 0 105 0 109 0 111 112 0 115 116 120 0 124 127 0 130 134 0 137 141 0 144 148 150 151 153 0 160 165 0 0 171 0 0 0 185 0 187 188
1 0 5 8 11 12 0 14 15 18 22 0 0 0 0...

output:

2 3 6 7 9 10 16 17 19 20 21 23 27 29 31 34 35 37 38 44 46 47 49 50 53 54 57 58 59 61 65 66 67 68 71 72 74 75 76 77 78 79 80 82 84 85 92 94 95 97 102 104 105 106 109 110 111 112 113 115 116 120 121 124 127 128 130 134 135 137 141 142 144 148 150 151 153 154 160 165 166 167 171 179 180 181 185 186 187...

result:

ok correct

Test #12:

score: 0
Accepted
time: 2ms
memory: 3560kb

input:

51 92
4 7 8 11 0 0 26 29 0 44 0 0 50 0 57 0 61 65 67 70 0 78 0 80 82 0 86 89 90 91 95 100 103 104 0 0 108 109 112 0 116 0 118 0 0 125 130 131 134 137 141
0 2 3 5 6 9 10 12 13 0 15 0 18 19 0 22 23 24 0 27 0 30 31 0 34 35 36 0 0 39 40 41 42 0 0 0 49 0 52 53 54 56 58 59 62 0 0 66 0 69 72 73 0 0 76 77 8...

output:

4 7 8 11 16 20 26 29 32 44 45 46 50 55 57 60 61 65 67 70 71 78 79 80 82 84 86 89 90 91 95 100 103 104 105 106 108 109 112 113 116 117 118 119 122 125 130 131 134 137 141 
1 2 3 5 6 9 10 12 13 14 15 17 18 19 21 22 23 24 25 27 28 30 31 33 34 35 36 37 38 39 40 41 42 43 47 48 49 51 52 53 54 56 58 59 62 ...

result:

ok correct

Test #13:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

79 87
0 0 4 5 7 10 0 12 0 17 24 27 28 0 30 31 32 0 0 0 0 0 43 45 0 50 51 54 56 62 63 65 67 0 70 71 0 0 75 0 0 80 0 89 91 92 0 0 102 104 0 106 107 108 110 112 117 119 120 0 123 125 132 135 0 139 140 141 142 0 0 145 0 149 0 154 0 157 0
1 0 8 9 13 15 16 0 19 20 21 0 0 25 26 0 35 0 38 42 44 0 0 0 0 53 5...

output:

2 3 4 5 7 10 11 12 14 17 24 27 28 29 30 31 32 33 36 39 40 41 43 45 46 50 51 54 56 62 63 65 67 68 70 71 72 73 75 76 78 80 81 89 91 92 96 100 102 104 105 106 107 108 110 112 117 119 120 121 123 125 132 135 138 139 140 141 142 143 144 145 146 149 150 154 155 157 160 
1 6 8 9 13 15 16 18 19 20 21 22 23 ...

result:

ok correct

Test #14:

score: 0
Accepted
time: 2ms
memory: 3524kb

input:

53 85
0 5 7 8 22 0 27 0 0 33 34 0 40 0 45 48 51 0 55 57 0 59 63 64 0 69 0 0 80 81 0 84 0 88 0 103 104 105 106 0 113 0 116 117 121 122 0 127 130 0 135 137 0
0 2 3 6 0 0 0 0 13 14 0 0 17 0 19 20 21 23 0 26 29 0 0 35 36 37 0 0 0 0 46 47 49 0 0 54 56 60 61 0 0 0 0 70 71 73 75 76 77 78 79 83 0 87 89 0 91...

output:

4 5 7 8 22 24 27 28 30 33 34 38 40 41 45 48 51 52 55 57 58 59 63 64 65 69 72 74 80 81 82 84 85 88 101 103 104 105 106 109 113 115 116 117 121 122 124 127 130 132 135 137 138 
1 2 3 6 9 10 11 12 13 14 15 16 17 18 19 20 21 23 25 26 29 31 32 35 36 37 39 42 43 44 46 47 49 50 53 54 56 60 61 62 66 67 68 7...

result:

ok correct

Test #15:

score: 0
Accepted
time: 2ms
memory: 3704kb

input:

71 72
0 0 0 0 10 13 0 16 18 0 20 22 0 24 25 26 28 29 0 31 40 42 0 0 0 47 48 0 51 52 55 0 57 0 67 0 69 70 71 0 0 0 83 0 0 0 0 93 95 0 100 105 0 107 0 109 110 112 0 0 120 122 0 0 126 128 129 132 133 142 0
0 3 0 6 0 11 12 0 17 21 27 32 33 0 0 36 37 38 39 0 0 0 53 0 58 0 60 61 62 63 64 65 0 73 74 75 0 7...

output:

1 4 7 8 10 13 14 16 18 19 20 22 23 24 25 26 28 29 30 31 40 42 43 44 45 47 48 49 51 52 55 56 57 66 67 68 69 70 71 76 79 80 83 86 87 89 90 93 95 98 100 105 106 107 108 109 110 112 114 119 120 122 123 124 126 128 129 132 133 142 143 
2 3 5 6 9 11 12 15 17 21 27 32 33 34 35 36 37 38 39 41 46 50 53 54 58...

result:

ok correct

Test #16:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

78 58
0 0 0 0 9 0 0 0 16 0 0 19 21 0 0 24 0 26 0 0 0 0 38 0 0 42 45 0 50 53 0 0 0 0 0 0 66 0 0 71 0 0 74 0 0 78 0 0 82 0 0 0 0 0 91 0 0 0 0 0 0 0 0 0 0 0 0 0 120 121 0 0 125 0 0 0 0 0
0 0 0 0 0 13 0 0 28 0 0 0 0 35 0 41 43 0 0 0 0 0 0 0 59 0 0 0 64 0 0 0 0 0 0 0 0 0 97 0 100 0 0 106 0 0 109 113 0 0 ...

output:

1 2 3 4 9 10 11 14 16 17 18 19 21 22 23 24 25 26 27 29 30 36 38 39 40 42 45 46 50 53 54 55 56 57 60 65 66 67 68 71 72 73 74 75 76 78 79 80 82 83 84 85 86 87 91 92 93 94 98 101 102 103 110 111 112 114 115 116 120 121 123 124 125 127 130 131 132 133 
5 6 7 8 12 13 15 20 28 31 32 33 34 35 37 41 43 44 4...

result:

ok correct

Test #17:

score: 0
Accepted
time: 2ms
memory: 3488kb

input:

83 82
0 0 0 0 0 0 0 0 23 0 0 29 0 0 0 39 0 0 0 43 0 0 0 0 0 51 0 0 0 0 0 0 65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 98 0 0 102 103 0 107 0 0 110 0 0 0 0 120 0 0 123 0 0 0 0 0 0 136 0 0 0 0 148 0 0 0 0 161 165
0 0 0 0 11 0 0 0 0 0 0 0 0 0 25 0 28 0 32 0 0 0 0 44 0 0 55 0 0 0 0 0 0 67 0 69 0 0 0 81 0 0 0 85 0 0...

output:

1 2 3 4 5 6 12 13 23 24 26 29 30 33 34 39 40 41 42 43 45 46 47 48 49 51 52 53 56 57 58 59 65 70 71 72 73 74 75 76 77 86 87 88 89 93 94 98 99 100 102 103 104 107 108 109 110 111 112 118 119 120 121 122 123 125 126 127 128 129 130 136 142 143 144 146 148 149 150 151 152 161 165 
7 8 9 10 11 14 15 16 1...

result:

ok correct

Test #18:

score: 0
Accepted
time: 2ms
memory: 3492kb

input:

84 77
0 0 6 0 9 10 14 0 18 0 0 32 0 0 0 42 47 0 50 51 0 0 55 0 0 0 0 0 0 73 0 0 0 0 80 0 0 83 0 0 0 87 0 0 0 0 96 0 0 0 102 0 104 0 0 108 110 112 0 0 0 0 119 0 121 122 0 0 0 0 0 0 0 0 0 0 0 145 148 153 156 157 0 159
0 0 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0 0 0 31 34 0 0 39 0 0 0 0 0 0 0 0 0 0 0 0 0 64 0 0...

output:

1 2 6 7 9 10 14 15 18 21 22 32 33 35 36 42 47 48 50 51 52 53 55 56 57 58 65 66 67 73 74 75 76 77 80 81 82 83 84 85 86 87 88 92 93 94 96 98 99 100 102 103 104 105 107 108 110 112 113 114 116 117 119 120 121 122 123 124 128 132 133 134 135 136 137 138 143 145 148 153 156 157 158 159 
3 4 5 8 11 12 13 ...

result:

ok correct

Test #19:

score: 0
Accepted
time: 2ms
memory: 3532kb

input:

56 51
0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 50 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 74 0 0 80 81 0 0 0 87 0 0 93 0 0 0 0 101 103 104 0
0 0 0 0 10 11 0 0 0 19 0 0 0 0 0 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 52 0 57 0 0 71 0 0 0 0 83 0 0 0 0 0 0 0 0 105 0

output:

1 2 5 6 7 12 13 14 15 20 21 22 23 24 31 32 33 34 35 36 50 53 54 55 58 59 60 61 62 63 64 65 66 67 68 72 74 75 76 80 81 82 84 85 87 88 89 93 94 95 96 97 101 103 104 106 
3 4 8 9 10 11 16 17 18 19 25 26 27 28 29 30 37 38 39 40 41 42 43 44 45 46 47 48 49 51 52 56 57 69 70 71 73 77 78 79 83 86 90 91 92 9...

result:

ok correct

Test #20:

score: 0
Accepted
time: 1ms
memory: 3564kb

input:

100 81
0 0 0 0 10 11 0 0 0 0 17 0 0 0 23 0 0 29 0 0 34 0 0 0 0 0 0 0 48 0 0 0 0 0 0 0 0 0 0 0 0 69 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 115 0 120 0 122 0 124 0 0 0 0 0 133 0 0 141 0 0 0 0 151 0 0 156 0 0 0 161 0 0 0 0 0 0 0 176 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 56 57 0 0 0 0 0 0 0 0...

output:

1 2 3 4 10 11 12 13 14 15 17 18 19 20 23 24 25 29 30 31 34 35 36 37 38 39 40 41 48 49 50 51 52 58 59 60 61 62 63 64 65 69 70 71 72 73 74 81 82 89 90 91 92 93 99 100 101 102 105 106 107 111 115 116 120 121 122 123 124 125 129 130 131 132 133 135 136 141 142 145 146 148 151 152 153 156 157 158 159 161...

result:

ok correct

Test #21:

score: 0
Accepted
time: 2ms
memory: 3624kb

input:

77 92
1 2 3 4 6 10 0 13 15 17 19 21 23 25 30 31 34 37 41 43 45 49 51 52 56 57 58 62 63 65 69 71 72 74 75 78 83 84 86 89 90 92 95 96 100 0 103 104 107 108 110 111 113 114 116 118 119 0 123 124 0 126 127 128 133 134 136 141 142 143 146 148 153 156 160 162 166
5 7 8 9 11 14 16 18 20 22 24 0 27 28 29 32...

output:

1 2 3 4 6 10 12 13 15 17 19 21 23 25 30 31 34 37 41 43 45 49 51 52 56 57 58 62 63 65 69 71 72 74 75 78 83 84 86 89 90 92 95 96 100 102 103 104 107 108 110 111 113 114 116 118 119 121 123 124 125 126 127 128 133 134 136 141 142 143 146 148 153 156 160 162 166 
5 7 8 9 11 14 16 18 20 22 24 26 27 28 29...

result:

ok correct

Test #22:

score: 0
Accepted
time: 2ms
memory: 3740kb

input:

75 92
2 4 8 13 14 16 17 20 23 27 31 35 37 38 40 43 44 49 50 51 54 55 0 57 60 61 62 63 65 71 73 74 76 82 85 88 89 90 91 92 93 95 0 99 100 101 107 108 109 113 116 119 122 124 130 133 134 135 138 139 143 145 146 147 148 151 0 154 155 157 158 159 160 164 166
1 3 5 6 7 9 10 11 12 15 18 19 21 22 0 25 26 2...

output:

2 4 8 13 14 16 17 20 23 27 31 35 37 38 40 43 44 49 50 51 54 55 56 57 60 61 62 63 65 71 73 74 76 82 85 88 89 90 91 92 93 95 97 99 100 101 107 108 109 113 116 119 122 124 130 133 134 135 138 139 143 145 146 147 148 151 152 154 155 157 158 159 160 164 166 
1 3 5 6 7 9 10 11 12 15 18 19 21 22 24 25 26 2...

result:

ok correct

Test #23:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

99 61
0 0 6 0 0 0 12 0 0 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 50 0 0 0 55 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 0 0 0 0 0 0 0 0 0 0 0 141 0 0 0 0 0 148 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 102 ...

output:

1 2 6 7 8 9 12 13 14 15 16 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 50 51 52 53 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 103 104 105 106 107 108 109 110 111 112 113 114 124 125 126 128 129 130 131 132 133 134 135 136 141 142 143 144 145 146 148 15...

result:

ok correct

Test #24:

score: 0
Accepted
time: 2ms
memory: 3548kb

input:

70 79
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 98 0 0 0 0 0 0 0 0 0 0 0 0 0 135 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 51 0 0 0 0 0 0 62 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 114 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 52 53 54 55 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 98 99 100 101 102 103 104 115 116 117 118 119 120 121 135 136 137 138 139 140 141 142 143 
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...

result:

ok correct

Test #25:

score: 0
Accepted
time: 2ms
memory: 3508kb

input:

5 5
0 0 6 0 0
0 0 3 0 0

output:

4 5 6 7 8 
1 2 3 9 10 

result:

ok correct

Test #26:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

2 2
1 0
0 4

output:

1 2 
3 4 

result:

ok correct

Test #27:

score: 0
Accepted
time: 2ms
memory: 3572kb

input:

6 3
0 0 0 5 0 0
3 0 7

output:

1 2 4 5 8 9 
3 6 7 

result:

ok correct

Test #28:

score: 0
Accepted
time: 0ms
memory: 3680kb

input:

5 5
3 0 0 0 8
1 0 0 0 10

output:

3 4 5 6 8 
1 2 7 9 10 

result:

ok correct

Test #29:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

97 97
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

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 100 101 102...

result:

ok correct

Test #30:

score: 0
Accepted
time: 4ms
memory: 3816kb

input:

99 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0

output:

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 
100 

result:

ok correct

Test #31:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

1 98
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

output:

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 

result:

ok correct