Cody

Solution 2017202

Submitted on 13 Nov 2019 by Weiyang Zhang
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
nmax = 10; pmax = 52; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 0 y = 1 pmax = 1 y = 2 pmax = 2 y = 3 pmax = 16 y = 4 pmax = 16 y = 5 pmax = 16 y = 6 pmax = 16 y = 7 pmax = 52 y = 8 pmax = 52 y = 9 pmax = 52 y = 10 pmax = 52

2   Pass
nmax = 30; pmax = 9232; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 0 y = 1 pmax = 1 y = 2 pmax = 2 y = 3 pmax = 16 y = 4 pmax = 16 y = 5 pmax = 16 y = 6 pmax = 16 y = 7 pmax = 52 y = 8 pmax = 52 y = 9 pmax = 52 y = 10 pmax = 52 y = 11 pmax = 52 y = 12 pmax = 52 y = 13 pmax = 52 y = 14 pmax = 52 y = 15 pmax = 160 y = 16 pmax = 160 y = 17 pmax = 160 y = 18 pmax = 160 y = 19 pmax = 160 y = 20 pmax = 160 y = 21 pmax = 160 y = 22 pmax = 160 y = 23 pmax = 160 y = 24 pmax = 160 y = 25 pmax = 160 y = 26 pmax = 160 y = 27 pmax = 9232 y = 28 pmax = 9232 y = 29 pmax = 9232 y = 30 pmax = 9232

3   Pass
nmax = 100; pmax = 9232; assert(isequal(peakOfPeaks(nmax),pmax))

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

4   Pass
nmax = 1000; pmax = 250504; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 0 y = 1 pmax = 1 y = 2 pmax = 2 y = 3 pmax = 16 y = 4 pmax = 16 y = 5 pmax = 16 y = 6 pmax = 16 y = 7 pmax = 52 y = 8 pmax = 52 y = 9 pmax = 52 y = 10 pmax = 52 y = 11 pmax = 52 y = 12 pmax = 52 y = 13 pmax = 52 y = 14 pmax = 52 y = 15 pmax = 160 y = 16 pmax = 160 y = 17 pmax = 160 y = 18 pmax = 160 y = 19 pmax = 160 y = 20 pmax = 160 y = 21 pmax = 160 y = 22 pmax = 160 y = 23 pmax = 160 y = 24 pmax = 160 y = 25 pmax = 160 y = 26 pmax = 160 y = 27 pmax = 9232 y = 28 pmax = 9232 y = 29 pmax = 9232 y = 30 pmax = 9232 y = 31 pmax = 9232 y = 32 pmax = 9232 y = 33 pmax = 9232 y = 34 pmax = 9232 y = 35 pmax = 9232 y = 36 pmax = 9232 y = 37 pmax = 9232 y = 38 pmax = 9232 y = 39 pmax = 9232 y = 40 pmax = 9232 y = 41 pmax = 9232 y = 42 pmax = 9232 y = 43 pmax = 9232 y = 44 pmax = 9232 y = 45 pmax = 9232 y = 46 pmax = 9232 y = 47 pmax = 9232 y = 48 pmax = 9232 y = 49 pmax = 9232 y = 50 pmax = 9232 y = 51 pmax = 9232 y = 52 pmax = 9232 y = 53 pmax = 9232 y = 54 pmax = 9232 y = 55 pmax = 9232 y = 56 pmax = 9232 y = 57 pmax = 9232 y = 58 pmax = 9232 y = 59 pmax = 9232 y = 60 pmax = 9232 y = 61 pmax = 9232 y = 62 pmax = 9232 y = 63 pmax = 9232 y = 64 pmax = 9232 y = 65 pmax = 9232 y = 66 pmax = 9232 y = 67 pmax = 9232 y = 68 pmax = 9232 y = 69 pmax = 9232 y = 70 pmax = 9232 y = 71 pmax = 9232 y = 72 pmax = 9232 y = 73 pmax = 9232 y = 74 pmax = 9232 y = 75 pmax = 9232 y = 76 pmax = 9232 y = 77 pmax = 9232 y = 78 pmax = 9232 y = 79 pmax = 9232 y = 80 pmax = 9232 y = 81 pmax = 9232 y = 82 pmax = 9232 y = 83 pmax = 9232 y = 84 pmax = 9232 y = 85 pmax = 9232 y = 86 pmax = 9232 y = 87 pmax = 9232 y = 88 pmax = 9232 y = 89 pmax = 9232 y = 90 pmax = 9232 y = 91 pmax = 9232 y = 92 pmax = 9232 y = 93 pmax = 9232 y = 94 pmax = 9232 y = 95 pmax = 9232 y = 96 pmax = 9232 y = 97 pmax = 9232 y = 98 pmax = 9232 y = 99 pmax = 9232 y = 100 pmax = 9232 y = 101 pmax = 9232 y = 102 pmax = 9232 y = 103 pmax = 9232 y = 104 pmax = 9232 y = 105 pmax = 9232 y = 106 pmax = 9232 y = 107 pmax = 9232 y = 108 pmax = 9232 y = 109 pmax = 9232 y = 110 pmax = 9232 y = 111 pmax = 9232 y = 112 pmax = 9232 y = 113 pmax = 9232 y = 114 pmax = 9232 y = 115 pmax = 9232 y = 116 pmax = 9232 y = 117 pmax = 9232 y = 118 pmax = 9232 y = 119 pmax = 9232 y = 120 pmax = 9232 y = 121 pmax = 9232 y = 122 pmax = 9232 y = 123 pmax = 9232 y = 124 pmax = 9232 y = 125 pmax = 9232 y = 126 pmax = 9232 y = 127 pmax = 9232 y = 128 pmax = 9232 y = 129 pmax = 9232 y = 130 pmax = 9232 y = 131 pmax = 9232 y = 132 pmax = 9232 y = 133 pmax = 9232 y = 134 pmax = 9232 y = 135 pmax = 9232 y = 136 pmax = 9232 y = 137 pmax = 9232 y = 138 pmax = 9232 y = 139 pmax = 9232 y = 140 pmax = 9232 y = 141 pmax = 9232 y = 142 pmax = 9232 y = 143 pmax = 9232 y = 144 pmax = 9232 y = 145 pmax = 9232 y = 146 pmax = 9232 y = 147 pmax = 9232 y = 148 pmax = 9232 y = 149 pmax = 9232 y = 150 pmax = 9232 y = 151 pmax = 9232 y = 152 pmax = 9232 y = 153 pmax = 9232 y = 154 pmax = 9232 y = 155 pmax = 9232 y = 156 pmax = 9232 y = 157 pmax = 9232 y = 158 pmax = 9232 y = 159 pmax = 9232 y = 160 pmax = 9232 y = 161 pmax = 9232 y = 162 pmax = 9232 y = 163 pmax = 9232 y = 164 pmax = 9232 y = 165 pmax = 9232 y = 166 pmax = 9232 y = 167 pmax = 9232 y = 168 pmax = 9232 y = 169 pmax = 9232 y = 170 pmax = 9232 y = 171 pmax = 9232 y = 172 pmax = 9232 y = 173 pmax = 9232 y = 174 pmax = 9232 y = 175 pmax = 9232 y = 176 pmax = 9232 y = 177 pmax = 9232 y = 178 pmax = 9232 y = 179 pmax = 9232 y = 180 pmax = 9232 y = 181 pmax = 9232 y = 182 pmax = 9232 y = 183 pmax = 9232 y = 184 pmax = 9232 y = 185 pmax = 9232 y = 186 pmax = 9232 y = 187 pmax = 9232 y = 188 pmax = 9232 y = 189 pmax = 9232 y = 190 pmax = 9232 y = 191 pmax = 9232 y = 192 pmax = 9232 y = 193 pmax = 9232 y = 194 pmax = 9232 y = 195 pmax = 9232 y = 196 pmax = 9232 y = 197 pmax = 9232 y = 198 pmax = 9232 y = 199 pmax = 9232 y = 200 pmax = 9232 y = 201 pmax = 9232 y = 202 pmax = 9232 y = 203 pmax = 9232 y = 204 pmax = 9232 y = 205 pmax = 9232 y = 206 pmax = 9232 y = 207 pmax = 9232 y = 208 pmax = 9232 y = 209 pmax = 9232 y = 210 pmax = 9232 y = 211 pmax = 9232 y = 212 pmax = 9232 y = 213 pmax = 9232 y = 214 pmax = 9232 y = 215 pmax = 9232 y = 216 pmax = 9232 y = 217 pmax = 9232 y = 218 pmax = 9232 y = 219 pmax = 9232 y = 220 pmax = 9232 y = 221 pmax = 9232 y = 222 pmax = 9232 y = 223 pmax = 9232 y = 224 pmax = 9232 y = 225 pmax = 9232 y = 226 pmax = 9232 y = 227 pmax = 9232 y = 228 pmax = 9232 y = 229 pmax = 9232 y = 230 pmax = 9232 y = 231 pmax = 9232 y = 232 pmax = 9232 y = 233 pmax = 9232 y = 234 pmax = 9232 y = 235 pmax = 9232 y = 236 pmax = 9232 y = 237 pmax = 9232 y = 238 pmax = 9232 y = 239 pmax = 9232 y = 240 pmax = 9232 y = 241 pmax = 9232 y = 242 pmax = 9232 y = 243 pmax = 9232 y = 244 pmax = 9232 y = 245 pmax = 9232 y = 246 pmax = 9232 y = 247 pmax = 9232 y = 248 pmax = 9232 y = 249 pmax = 9232 y = 250 pmax = 9232 y = 251 pmax = 9232 y = 252 pmax = 9232 y = 253 pmax = 9232 y = 254 pmax = 9232 y = 255 pmax = 13120 y = 256 pmax = 13120 y = 257 pmax = 13120 y = 258 pmax = 13120 y = 259 pmax = 13120 y = 260 pmax = 13120 y = 261 pmax = 13120 y = 262 pmax = 13120 y = 263 pmax = 13120 y = 264 pmax = 13120 y = 265 pmax = 13120 y = 266 pmax = 13120 y = 267 pmax = 13120 y = 268 pmax = 13120 y = 269 pmax = 13120 y = 270 pmax = 13120 y = 271 pmax = 13120 y = 272 pmax = 13120 y = 273 pmax = 13120 y = 274 pmax = 13120 y...

5   Pass
nmax = 2000; pmax = 1276936; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 0 y = 1 pmax = 1 y = 2 pmax = 2 y = 3 pmax = 16 y = 4 pmax = 16 y = 5 pmax = 16 y = 6 pmax = 16 y = 7 pmax = 52 y = 8 pmax = 52 y = 9 pmax = 52 y = 10 pmax = 52 y = 11 pmax = 52 y = 12 pmax = 52 y = 13 pmax = 52 y = 14 pmax = 52 y = 15 pmax = 160 y = 16 pmax = 160 y = 17 pmax = 160 y = 18 pmax = 160 y = 19 pmax = 160 y = 20 pmax = 160 y = 21 pmax = 160 y = 22 pmax = 160 y = 23 pmax = 160 y = 24 pmax = 160 y = 25 pmax = 160 y = 26 pmax = 160 y = 27 pmax = 9232 y = 28 pmax = 9232 y = 29 pmax = 9232 y = 30 pmax = 9232 y = 31 pmax = 9232 y = 32 pmax = 9232 y = 33 pmax = 9232 y = 34 pmax = 9232 y = 35 pmax = 9232 y = 36 pmax = 9232 y = 37 pmax = 9232 y = 38 pmax = 9232 y = 39 pmax = 9232 y = 40 pmax = 9232 y = 41 pmax = 9232 y = 42 pmax = 9232 y = 43 pmax = 9232 y = 44 pmax = 9232 y = 45 pmax = 9232 y = 46 pmax = 9232 y = 47 pmax = 9232 y = 48 pmax = 9232 y = 49 pmax = 9232 y = 50 pmax = 9232 y = 51 pmax = 9232 y = 52 pmax = 9232 y = 53 pmax = 9232 y = 54 pmax = 9232 y = 55 pmax = 9232 y = 56 pmax = 9232 y = 57 pmax = 9232 y = 58 pmax = 9232 y = 59 pmax = 9232 y = 60 pmax = 9232 y = 61 pmax = 9232 y = 62 pmax = 9232 y = 63 pmax = 9232 y = 64 pmax = 9232 y = 65 pmax = 9232 y = 66 pmax = 9232 y = 67 pmax = 9232 y = 68 pmax = 9232 y = 69 pmax = 9232 y = 70 pmax = 9232 y = 71 pmax = 9232 y = 72 pmax = 9232 y = 73 pmax = 9232 y = 74 pmax = 9232 y = 75 pmax = 9232 y = 76 pmax = 9232 y = 77 pmax = 9232 y = 78 pmax = 9232 y = 79 pmax = 9232 y = 80 pmax = 9232 y = 81 pmax = 9232 y = 82 pmax = 9232 y = 83 pmax = 9232 y = 84 pmax = 9232 y = 85 pmax = 9232 y = 86 pmax = 9232 y = 87 pmax = 9232 y = 88 pmax = 9232 y = 89 pmax = 9232 y = 90 pmax = 9232 y = 91 pmax = 9232 y = 92 pmax = 9232 y = 93 pmax = 9232 y = 94 pmax = 9232 y = 95 pmax = 9232 y = 96 pmax = 9232 y = 97 pmax = 9232 y = 98 pmax = 9232 y = 99 pmax = 9232 y = 100 pmax = 9232 y = 101 pmax = 9232 y = 102 pmax = 9232 y = 103 pmax = 9232 y = 104 pmax = 9232 y = 105 pmax = 9232 y = 106 pmax = 9232 y = 107 pmax = 9232 y = 108 pmax = 9232 y = 109 pmax = 9232 y = 110 pmax = 9232 y = 111 pmax = 9232 y = 112 pmax = 9232 y = 113 pmax = 9232 y = 114 pmax = 9232 y = 115 pmax = 9232 y = 116 pmax = 9232 y = 117 pmax = 9232 y = 118 pmax = 9232 y = 119 pmax = 9232 y = 120 pmax = 9232 y = 121 pmax = 9232 y = 122 pmax = 9232 y = 123 pmax = 9232 y = 124 pmax = 9232 y = 125 pmax = 9232 y = 126 pmax = 9232 y = 127 pmax = 9232 y = 128 pmax = 9232 y = 129 pmax = 9232 y = 130 pmax = 9232 y = 131 pmax = 9232 y = 132 pmax = 9232 y = 133 pmax = 9232 y = 134 pmax = 9232 y = 135 pmax = 9232 y = 136 pmax = 9232 y = 137 pmax = 9232 y = 138 pmax = 9232 y = 139 pmax = 9232 y = 140 pmax = 9232 y = 141 pmax = 9232 y = 142 pmax = 9232 y = 143 pmax = 9232 y = 144 pmax = 9232 y = 145 pmax = 9232 y = 146 pmax = 9232 y = 147 pmax = 9232 y = 148 pmax = 9232 y = 149 pmax = 9232 y = 150 pmax = 9232 y = 151 pmax = 9232 y = 152 pmax = 9232 y = 153 pmax = 9232 y = 154 pmax = 9232 y = 155 pmax = 9232 y = 156 pmax = 9232 y = 157 pmax = 9232 y = 158 pmax = 9232 y = 159 pmax = 9232 y = 160 pmax = 9232 y = 161 pmax = 9232 y = 162 pmax = 9232 y = 163 pmax = 9232 y = 164 pmax = 9232 y = 165 pmax = 9232 y = 166 pmax = 9232 y = 167 pmax = 9232 y = 168 pmax = 9232 y = 169 pmax = 9232 y = 170 pmax = 9232 y = 171 pmax = 9232 y = 172 pmax = 9232 y = 173 pmax = 9232 y = 174 pmax = 9232 y = 175 pmax = 9232 y = 176 pmax = 9232 y = 177 pmax = 9232 y = 178 pmax = 9232 y = 179 pmax = 9232 y = 180 pmax = 9232 y = 181 pmax = 9232 y = 182 pmax = 9232 y = 183 pmax = 9232 y = 184 pmax = 9232 y = 185 pmax = 9232 y = 186 pmax = 9232 y = 187 pmax = 9232 y = 188 pmax = 9232 y = 189 pmax = 9232 y = 190 pmax = 9232 y = 191 pmax = 9232 y = 192 pmax = 9232 y = 193 pmax = 9232 y = 194 pmax = 9232 y = 195 pmax = 9232 y = 196 pmax = 9232 y = 197 pmax = 9232 y = 198 pmax = 9232 y = 199 pmax = 9232 y = 200 pmax = 9232 y = 201 pmax = 9232 y = 202 pmax = 9232 y = 203 pmax = 9232 y = 204 pmax = 9232 y = 205 pmax = 9232 y = 206 pmax = 9232 y = 207 pmax = 9232 y = 208 pmax = 9232 y = 209 pmax = 9232 y = 210 pmax = 9232 y = 211 pmax = 9232 y = 212 pmax = 9232 y = 213 pmax = 9232 y = 214 pmax = 9232 y = 215 pmax = 9232 y = 216 pmax = 9232 y = 217 pmax = 9232 y = 218 pmax = 9232 y = 219 pmax = 9232 y = 220 pmax = 9232 y = 221 pmax = 9232 y = 222 pmax = 9232 y = 223 pmax = 9232 y = 224 pmax = 9232 y = 225 pmax = 9232 y = 226 pmax = 9232 y = 227 pmax = 9232 y = 228 pmax = 9232 y = 229 pmax = 9232 y = 230 pmax = 9232 y = 231 pmax = 9232 y = 232 pmax = 9232 y = 233 pmax = 9232 y = 234 pmax = 9232 y = 235 pmax = 9232 y = 236 pmax = 9232 y = 237 pmax = 9232 y = 238 pmax = 9232 y = 239 pmax = 9232 y = 240 pmax = 9232 y = 241 pmax = 9232 y = 242 pmax = 9232 y = 243 pmax = 9232 y = 244 pmax = 9232 y = 245 pmax = 9232 y = 246 pmax = 9232 y = 247 pmax = 9232 y = 248 pmax = 9232 y = 249 pmax = 9232 y = 250 pmax = 9232 y = 251 pmax = 9232 y = 252 pmax = 9232 y = 253 pmax = 9232 y = 254 pmax = 9232 y = 255 pmax = 13120 y = 256 pmax = 13120 y = 257 pmax = 13120 y = 258 pmax = 13120 y = 259 pmax = 13120 y = 260 pmax = 13120 y = 261 pmax = 13120 y = 262 pmax = 13120 y = 263 pmax = 13120 y = 264 pmax = 13120 y = 265 pmax = 13120 y = 266 pmax = 13120 y = 267 pmax = 13120 y = 268 pmax = 13120 y = 269 pmax = 13120 y = 270 pmax = 13120 y = 271 pmax = 13120 y = 272 pmax = 13120 y = 273 pmax = 13120 y = 274 pmax = 13120 y...

6   Pass
nmax = 4500; pmax = 6810136; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 0 y = 1 pmax = 1 y = 2 pmax = 2 y = 3 pmax = 16 y = 4 pmax = 16 y = 5 pmax = 16 y = 6 pmax = 16 y = 7 pmax = 52 y = 8 pmax = 52 y = 9 pmax = 52 y = 10 pmax = 52 y = 11 pmax = 52 y = 12 pmax = 52 y = 13 pmax = 52 y = 14 pmax = 52 y = 15 pmax = 160 y = 16 pmax = 160 y = 17 pmax = 160 y = 18 pmax = 160 y = 19 pmax = 160 y = 20 pmax = 160 y = 21 pmax = 160 y = 22 pmax = 160 y = 23 pmax = 160 y = 24 pmax = 160 y = 25 pmax = 160 y = 26 pmax = 160 y = 27 pmax = 9232 y = 28 pmax = 9232 y = 29 pmax = 9232 y = 30 pmax = 9232 y = 31 pmax = 9232 y = 32 pmax = 9232 y = 33 pmax = 9232 y = 34 pmax = 9232 y = 35 pmax = 9232 y = 36 pmax = 9232 y = 37 pmax = 9232 y = 38 pmax = 9232 y = 39 pmax = 9232 y = 40 pmax = 9232 y = 41 pmax = 9232 y = 42 pmax = 9232 y = 43 pmax = 9232 y = 44 pmax = 9232 y = 45 pmax = 9232 y = 46 pmax = 9232 y = 47 pmax = 9232 y = 48 pmax = 9232 y = 49 pmax = 9232 y = 50 pmax = 9232 y = 51 pmax = 9232 y = 52 pmax = 9232 y = 53 pmax = 9232 y = 54 pmax = 9232 y = 55 pmax = 9232 y = 56 pmax = 9232 y = 57 pmax = 9232 y = 58 pmax = 9232 y = 59 pmax = 9232 y = 60 pmax = 9232 y = 61 pmax = 9232 y = 62 pmax = 9232 y = 63 pmax = 9232 y = 64 pmax = 9232 y = 65 pmax = 9232 y = 66 pmax = 9232 y = 67 pmax = 9232 y = 68 pmax = 9232 y = 69 pmax = 9232 y = 70 pmax = 9232 y = 71 pmax = 9232 y = 72 pmax = 9232 y = 73 pmax = 9232 y = 74 pmax = 9232 y = 75 pmax = 9232 y = 76 pmax = 9232 y = 77 pmax = 9232 y = 78 pmax = 9232 y = 79 pmax = 9232 y = 80 pmax = 9232 y = 81 pmax = 9232 y = 82 pmax = 9232 y = 83 pmax = 9232 y = 84 pmax = 9232 y = 85 pmax = 9232 y = 86 pmax = 9232 y = 87 pmax = 9232 y = 88 pmax = 9232 y = 89 pmax = 9232 y = 90 pmax = 9232 y = 91 pmax = 9232 y = 92 pmax = 9232 y = 93 pmax = 9232 y = 94 pmax = 9232 y = 95 pmax = 9232 y = 96 pmax = 9232 y = 97 pmax = 9232 y = 98 pmax = 9232 y = 99 pmax = 9232 y = 100 pmax = 9232 y = 101 pmax = 9232 y = 102 pmax = 9232 y = 103 pmax = 9232 y = 104 pmax = 9232 y = 105 pmax = 9232 y = 106 pmax = 9232 y = 107 pmax = 9232 y = 108 pmax = 9232 y = 109 pmax = 9232 y = 110 pmax = 9232 y = 111 pmax = 9232 y = 112 pmax = 9232 y = 113 pmax = 9232 y = 114 pmax = 9232 y = 115 pmax = 9232 y = 116 pmax = 9232 y = 117 pmax = 9232 y = 118 pmax = 9232 y = 119 pmax = 9232 y = 120 pmax = 9232 y = 121 pmax = 9232 y = 122 pmax = 9232 y = 123 pmax = 9232 y = 124 pmax = 9232 y = 125 pmax = 9232 y = 126 pmax = 9232 y = 127 pmax = 9232 y = 128 pmax = 9232 y = 129 pmax = 9232 y = 130 pmax = 9232 y = 131 pmax = 9232 y = 132 pmax = 9232 y = 133 pmax = 9232 y = 134 pmax = 9232 y = 135 pmax = 9232 y = 136 pmax = 9232 y = 137 pmax = 9232 y = 138 pmax = 9232 y = 139 pmax = 9232 y = 140 pmax = 9232 y = 141 pmax = 9232 y = 142 pmax = 9232 y = 143 pmax = 9232 y = 144 pmax = 9232 y = 145 pmax = 9232 y = 146 pmax = 9232 y = 147 pmax = 9232 y = 148 pmax = 9232 y = 149 pmax = 9232 y = 150 pmax = 9232 y = 151 pmax = 9232 y = 152 pmax = 9232 y = 153 pmax = 9232 y = 154 pmax = 9232 y = 155 pmax = 9232 y = 156 pmax = 9232 y = 157 pmax = 9232 y = 158 pmax = 9232 y = 159 pmax = 9232 y = 160 pmax = 9232 y = 161 pmax = 9232 y = 162 pmax = 9232 y = 163 pmax = 9232 y = 164 pmax = 9232 y = 165 pmax = 9232 y = 166 pmax = 9232 y = 167 pmax = 9232 y = 168 pmax = 9232 y = 169 pmax = 9232 y = 170 pmax = 9232 y = 171 pmax = 9232 y = 172 pmax = 9232 y = 173 pmax = 9232 y = 174 pmax = 9232 y = 175 pmax = 9232 y = 176 pmax = 9232 y = 177 pmax = 9232 y = 178 pmax = 9232 y = 179 pmax = 9232 y = 180 pmax = 9232 y = 181 pmax = 9232 y = 182 pmax = 9232 y = 183 pmax = 9232 y = 184 pmax = 9232 y = 185 pmax = 9232 y = 186 pmax = 9232 y = 187 pmax = 9232 y = 188 pmax = 9232 y = 189 pmax = 9232 y = 190 pmax = 9232 y = 191 pmax = 9232 y = 192 pmax = 9232 y = 193 pmax = 9232 y = 194 pmax = 9232 y = 195 pmax = 9232 y = 196 pmax = 9232 y = 197 pmax = 9232 y = 198 pmax = 9232 y = 199 pmax = 9232 y = 200 pmax = 9232 y = 201 pmax = 9232 y = 202 pmax = 9232 y = 203 pmax = 9232 y = 204 pmax = 9232 y = 205 pmax = 9232 y = 206 pmax = 9232 y = 207 pmax = 9232 y = 208 pmax = 9232 y = 209 pmax = 9232 y = 210 pmax = 9232 y = 211 pmax = 9232 y = 212 pmax = 9232 y = 213 pmax = 9232 y = 214 pmax = 9232 y = 215 pmax = 9232 y = 216 pmax = 9232 y = 217 pmax = 9232 y = 218 pmax = 9232 y = 219 pmax = 9232 y = 220 pmax = 9232 y = 221 pmax = 9232 y = 222 pmax = 9232 y = 223 pmax = 9232 y = 224 pmax = 9232 y = 225 pmax = 9232 y = 226 pmax = 9232 y = 227 pmax = 9232 y = 228 pmax = 9232 y = 229 pmax = 9232 y = 230 pmax = 9232 y = 231 pmax = 9232 y = 232 pmax = 9232 y = 233 pmax = 9232 y = 234 pmax = 9232 y = 235 pmax = 9232 y = 236 pmax = 9232 y = 237 pmax = 9232 y = 238 pmax = 9232 y = 239 pmax = 9232 y = 240 pmax = 9232 y = 241 pmax = 9232 y = 242 pmax = 9232 y = 243 pmax = 9232 y = 244 pmax = 9232 y = 245 pmax = 9232 y = 246 pmax = 9232 y = 247 pmax = 9232 y = 248 pmax = 9232 y = 249 pmax = 9232 y = 250 pmax = 9232 y = 251 pmax = 9232 y = 252 pmax = 9232 y = 253 pmax = 9232 y = 254 pmax = 9232 y = 255 pmax = 13120 y = 256 pmax = 13120 y = 257 pmax = 13120 y = 258 pmax = 13120 y = 259 pmax = 13120 y = 260 pmax = 13120 y = 261 pmax = 13120 y = 262 pmax = 13120 y = 263 pmax = 13120 y = 264 pmax = 13120 y = 265 pmax = 13120 y = 266 pmax = 13120 y = 267 pmax = 13120 y = 268 pmax = 13120 y = 269 pmax = 13120 y = 270 pmax = 13120 y = 271 pmax = 13120 y = 272 pmax = 13120 y = 273 pmax = 13120 y = 274 pmax = 13120 y...

7   Pass
nmax = 8120; pmax = 8153620; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 0 y = 1 pmax = 1 y = 2 pmax = 2 y = 3 pmax = 16 y = 4 pmax = 16 y = 5 pmax = 16 y = 6 pmax = 16 y = 7 pmax = 52 y = 8 pmax = 52 y = 9 pmax = 52 y = 10 pmax = 52 y = 11 pmax = 52 y = 12 pmax = 52 y = 13 pmax = 52 y = 14 pmax = 52 y = 15 pmax = 160 y = 16 pmax = 160 y = 17 pmax = 160 y = 18 pmax = 160 y = 19 pmax = 160 y = 20 pmax = 160 y = 21 pmax = 160 y = 22 pmax = 160 y = 23 pmax = 160 y = 24 pmax = 160 y = 25 pmax = 160 y = 26 pmax = 160 y = 27 pmax = 9232 y = 28 pmax = 9232 y = 29 pmax = 9232 y = 30 pmax = 9232 y = 31 pmax = 9232 y = 32 pmax = 9232 y = 33 pmax = 9232 y = 34 pmax = 9232 y = 35 pmax = 9232 y = 36 pmax = 9232 y = 37 pmax = 9232 y = 38 pmax = 9232 y = 39 pmax = 9232 y = 40 pmax = 9232 y = 41 pmax = 9232 y = 42 pmax = 9232 y = 43 pmax = 9232 y = 44 pmax = 9232 y = 45 pmax = 9232 y = 46 pmax = 9232 y = 47 pmax = 9232 y = 48 pmax = 9232 y = 49 pmax = 9232 y = 50 pmax = 9232 y = 51 pmax = 9232 y = 52 pmax = 9232 y = 53 pmax = 9232 y = 54 pmax = 9232 y = 55 pmax = 9232 y = 56 pmax = 9232 y = 57 pmax = 9232 y = 58 pmax = 9232 y = 59 pmax = 9232 y = 60 pmax = 9232 y = 61 pmax = 9232 y = 62 pmax = 9232 y = 63 pmax = 9232 y = 64 pmax = 9232 y = 65 pmax = 9232 y = 66 pmax = 9232 y = 67 pmax = 9232 y = 68 pmax = 9232 y = 69 pmax = 9232 y = 70 pmax = 9232 y = 71 pmax = 9232 y = 72 pmax = 9232 y = 73 pmax = 9232 y = 74 pmax = 9232 y = 75 pmax = 9232 y = 76 pmax = 9232 y = 77 pmax = 9232 y = 78 pmax = 9232 y = 79 pmax = 9232 y = 80 pmax = 9232 y = 81 pmax = 9232 y = 82 pmax = 9232 y = 83 pmax = 9232 y = 84 pmax = 9232 y = 85 pmax = 9232 y = 86 pmax = 9232 y = 87 pmax = 9232 y = 88 pmax = 9232 y = 89 pmax = 9232 y = 90 pmax = 9232 y = 91 pmax = 9232 y = 92 pmax = 9232 y = 93 pmax = 9232 y = 94 pmax = 9232 y = 95 pmax = 9232 y = 96 pmax = 9232 y = 97 pmax = 9232 y = 98 pmax = 9232 y = 99 pmax = 9232 y = 100 pmax = 9232 y = 101 pmax = 9232 y = 102 pmax = 9232 y = 103 pmax = 9232 y = 104 pmax = 9232 y = 105 pmax = 9232 y = 106 pmax = 9232 y = 107 pmax = 9232 y = 108 pmax = 9232 y = 109 pmax = 9232 y = 110 pmax = 9232 y = 111 pmax = 9232 y = 112 pmax = 9232 y = 113 pmax = 9232 y = 114 pmax = 9232 y = 115 pmax = 9232 y = 116 pmax = 9232 y = 117 pmax = 9232 y = 118 pmax = 9232 y = 119 pmax = 9232 y = 120 pmax = 9232 y = 121 pmax = 9232 y = 122 pmax = 9232 y = 123 pmax = 9232 y = 124 pmax = 9232 y = 125 pmax = 9232 y = 126 pmax = 9232 y = 127 pmax = 9232 y = 128 pmax = 9232 y = 129 pmax = 9232 y = 130 pmax = 9232 y = 131 pmax = 9232 y = 132 pmax = 9232 y = 133 pmax = 9232 y = 134 pmax = 9232 y = 135 pmax = 9232 y = 136 pmax = 9232 y = 137 pmax = 9232 y = 138 pmax = 9232 y = 139 pmax = 9232 y = 140 pmax = 9232 y = 141 pmax = 9232 y = 142 pmax = 9232 y = 143 pmax = 9232 y = 144 pmax = 9232 y = 145 pmax = 9232 y = 146 pmax = 9232 y = 147 pmax = 9232 y = 148 pmax = 9232 y = 149 pmax = 9232 y = 150 pmax = 9232 y = 151 pmax = 9232 y = 152 pmax = 9232 y = 153 pmax = 9232 y = 154 pmax = 9232 y = 155 pmax = 9232 y = 156 pmax = 9232 y = 157 pmax = 9232 y = 158 pmax = 9232 y = 159 pmax = 9232 y = 160 pmax = 9232 y = 161 pmax = 9232 y = 162 pmax = 9232 y = 163 pmax = 9232 y = 164 pmax = 9232 y = 165 pmax = 9232 y = 166 pmax = 9232 y = 167 pmax = 9232 y = 168 pmax = 9232 y = 169 pmax = 9232 y = 170 pmax = 9232 y = 171 pmax = 9232 y = 172 pmax = 9232 y = 173 pmax = 9232 y = 174 pmax = 9232 y = 175 pmax = 9232 y = 176 pmax = 9232 y = 177 pmax = 9232 y = 178 pmax = 9232 y = 179 pmax = 9232 y = 180 pmax = 9232 y = 181 pmax = 9232 y = 182 pmax = 9232 y = 183 pmax = 9232 y = 184 pmax = 9232 y = 185 pmax = 9232 y = 186 pmax = 9232 y = 187 pmax = 9232 y = 188 pmax = 9232 y = 189 pmax = 9232 y = 190 pmax = 9232 y = 191 pmax = 9232 y = 192 pmax = 9232 y = 193 pmax = 9232 y = 194 pmax = 9232 y = 195 pmax = 9232 y = 196 pmax = 9232 y = 197 pmax = 9232 y = 198 pmax = 9232 y = 199 pmax = 9232 y = 200 pmax = 9232 y = 201 pmax = 9232 y = 202 pmax = 9232 y = 203 pmax = 9232 y = 204 pmax = 9232 y = 205 pmax = 9232 y = 206 pmax = 9232 y = 207 pmax = 9232 y = 208 pmax = 9232 y = 209 pmax = 9232 y = 210 pmax = 9232 y = 211 pmax = 9232 y = 212 pmax = 9232 y = 213 pmax = 9232 y = 214 pmax = 9232 y = 215 pmax = 9232 y = 216 pmax = 9232 y = 217 pmax = 9232 y = 218 pmax = 9232 y = 219 pmax = 9232 y = 220 pmax = 9232 y = 221 pmax = 9232 y = 222 pmax = 9232 y = 223 pmax = 9232 y = 224 pmax = 9232 y = 225 pmax = 9232 y = 226 pmax = 9232 y = 227 pmax = 9232 y = 228 pmax = 9232 y = 229 pmax = 9232 y = 230 pmax = 9232 y = 231 pmax = 9232 y = 232 pmax = 9232 y = 233 pmax = 9232 y = 234 pmax = 9232 y = 235 pmax = 9232 y = 236 pmax = 9232 y = 237 pmax = 9232 y = 238 pmax = 9232 y = 239 pmax = 9232 y = 240 pmax = 9232 y = 241 pmax = 9232 y = 242 pmax = 9232 y = 243 pmax = 9232 y = 244 pmax = 9232 y = 245 pmax = 9232 y = 246 pmax = 9232 y = 247 pmax = 9232 y = 248 pmax = 9232 y = 249 pmax = 9232 y = 250 pmax = 9232 y = 251 pmax = 9232 y = 252 pmax = 9232 y = 253 pmax = 9232 y = 254 pmax = 9232 y = 255 pmax = 13120 y = 256 pmax = 13120 y = 257 pmax = 13120 y = 258 pmax = 13120 y = 259 pmax = 13120 y = 260 pmax = 13120 y = 261 pmax = 13120 y = 262 pmax = 13120 y = 263 pmax = 13120 y = 264 pmax = 13120 y = 265 pmax = 13120 y = 266 pmax = 13120 y = 267 pmax = 13120 y = 268 pmax = 13120 y = 269 pmax = 13120 y = 270 pmax = 13120 y = 271 pmax = 13120 y = 272 pmax = 13120 y = 273 pmax = 13120 y = 274 pmax = 13120 y...

8   Pass
nmax = 9998; pmax = 27114424; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 0 y = 1 pmax = 1 y = 2 pmax = 2 y = 3 pmax = 16 y = 4 pmax = 16 y = 5 pmax = 16 y = 6 pmax = 16 y = 7 pmax = 52 y = 8 pmax = 52 y = 9 pmax = 52 y = 10 pmax = 52 y = 11 pmax = 52 y = 12 pmax = 52 y = 13 pmax = 52 y = 14 pmax = 52 y = 15 pmax = 160 y = 16 pmax = 160 y = 17 pmax = 160 y = 18 pmax = 160 y = 19 pmax = 160 y = 20 pmax = 160 y = 21 pmax = 160 y = 22 pmax = 160 y = 23 pmax = 160 y = 24 pmax = 160 y = 25 pmax = 160 y = 26 pmax = 160 y = 27 pmax = 9232 y = 28 pmax = 9232 y = 29 pmax = 9232 y = 30 pmax = 9232 y = 31 pmax = 9232 y = 32 pmax = 9232 y = 33 pmax = 9232 y = 34 pmax = 9232 y = 35 pmax = 9232 y = 36 pmax = 9232 y = 37 pmax = 9232 y = 38 pmax = 9232 y = 39 pmax = 9232 y = 40 pmax = 9232 y = 41 pmax = 9232 y = 42 pmax = 9232 y = 43 pmax = 9232 y = 44 pmax = 9232 y = 45 pmax = 9232 y = 46 pmax = 9232 y = 47 pmax = 9232 y = 48 pmax = 9232 y = 49 pmax = 9232 y = 50 pmax = 9232 y = 51 pmax = 9232 y = 52 pmax = 9232 y = 53 pmax = 9232 y = 54 pmax = 9232 y = 55 pmax = 9232 y = 56 pmax = 9232 y = 57 pmax = 9232 y = 58 pmax = 9232 y = 59 pmax = 9232 y = 60 pmax = 9232 y = 61 pmax = 9232 y = 62 pmax = 9232 y = 63 pmax = 9232 y = 64 pmax = 9232 y = 65 pmax = 9232 y = 66 pmax = 9232 y = 67 pmax = 9232 y = 68 pmax = 9232 y = 69 pmax = 9232 y = 70 pmax = 9232 y = 71 pmax = 9232 y = 72 pmax = 9232 y = 73 pmax = 9232 y = 74 pmax = 9232 y = 75 pmax = 9232 y = 76 pmax = 9232 y = 77 pmax = 9232 y = 78 pmax = 9232 y = 79 pmax = 9232 y = 80 pmax = 9232 y = 81 pmax = 9232 y = 82 pmax = 9232 y = 83 pmax = 9232 y = 84 pmax = 9232 y = 85 pmax = 9232 y = 86 pmax = 9232 y = 87 pmax = 9232 y = 88 pmax = 9232 y = 89 pmax = 9232 y = 90 pmax = 9232 y = 91 pmax = 9232 y = 92 pmax = 9232 y = 93 pmax = 9232 y = 94 pmax = 9232 y = 95 pmax = 9232 y = 96 pmax = 9232 y = 97 pmax = 9232 y = 98 pmax = 9232 y = 99 pmax = 9232 y = 100 pmax = 9232 y = 101 pmax = 9232 y = 102 pmax = 9232 y = 103 pmax = 9232 y = 104 pmax = 9232 y = 105 pmax = 9232 y = 106 pmax = 9232 y = 107 pmax = 9232 y = 108 pmax = 9232 y = 109 pmax = 9232 y = 110 pmax = 9232 y = 111 pmax = 9232 y = 112 pmax = 9232 y = 113 pmax = 9232 y = 114 pmax = 9232 y = 115 pmax = 9232 y = 116 pmax = 9232 y = 117 pmax = 9232 y = 118 pmax = 9232 y = 119 pmax = 9232 y = 120 pmax = 9232 y = 121 pmax = 9232 y = 122 pmax = 9232 y = 123 pmax = 9232 y = 124 pmax = 9232 y = 125 pmax = 9232 y = 126 pmax = 9232 y = 127 pmax = 9232 y = 128 pmax = 9232 y = 129 pmax = 9232 y = 130 pmax = 9232 y = 131 pmax = 9232 y = 132 pmax = 9232 y = 133 pmax = 9232 y = 134 pmax = 9232 y = 135 pmax = 9232 y = 136 pmax = 9232 y = 137 pmax = 9232 y = 138 pmax = 9232 y = 139 pmax = 9232 y = 140 pmax = 9232 y = 141 pmax = 9232 y = 142 pmax = 9232 y = 143 pmax = 9232 y = 144 pmax = 9232 y = 145 pmax = 9232 y = 146 pmax = 9232 y = 147 pmax = 9232 y = 148 pmax = 9232 y = 149 pmax = 9232 y = 150 pmax = 9232 y = 151 pmax = 9232 y = 152 pmax = 9232 y = 153 pmax = 9232 y = 154 pmax = 9232 y = 155 pmax = 9232 y = 156 pmax = 9232 y = 157 pmax = 9232 y = 158 pmax = 9232 y = 159 pmax = 9232 y = 160 pmax = 9232 y = 161 pmax = 9232 y = 162 pmax = 9232 y = 163 pmax = 9232 y = 164 pmax = 9232 y = 165 pmax = 9232 y = 166 pmax = 9232 y = 167 pmax = 9232 y = 168 pmax = 9232 y = 169 pmax = 9232 y = 170 pmax = 9232 y = 171 pmax = 9232 y = 172 pmax = 9232 y = 173 pmax = 9232 y = 174 pmax = 9232 y = 175 pmax = 9232 y = 176 pmax = 9232 y = 177 pmax = 9232 y = 178 pmax = 9232 y = 179 pmax = 9232 y = 180 pmax = 9232 y = 181 pmax = 9232 y = 182 pmax = 9232 y = 183 pmax = 9232 y = 184 pmax = 9232 y = 185 pmax = 9232 y = 186 pmax = 9232 y = 187 pmax = 9232 y = 188 pmax = 9232 y = 189 pmax = 9232 y = 190 pmax = 9232 y = 191 pmax = 9232 y = 192 pmax = 9232 y = 193 pmax = 9232 y = 194 pmax = 9232 y = 195 pmax = 9232 y = 196 pmax = 9232 y = 197 pmax = 9232 y = 198 pmax = 9232 y = 199 pmax = 9232 y = 200 pmax = 9232 y = 201 pmax = 9232 y = 202 pmax = 9232 y = 203 pmax = 9232 y = 204 pmax = 9232 y = 205 pmax = 9232 y = 206 pmax = 9232 y = 207 pmax = 9232 y = 208 pmax = 9232 y = 209 pmax = 9232 y = 210 pmax = 9232 y = 211 pmax = 9232 y = 212 pmax = 9232 y = 213 pmax = 9232 y = 214 pmax = 9232 y = 215 pmax = 9232 y = 216 pmax = 9232 y = 217 pmax = 9232 y = 218 pmax = 9232 y = 219 pmax = 9232 y = 220 pmax = 9232 y = 221 pmax = 9232 y = 222 pmax = 9232 y = 223 pmax = 9232 y = 224 pmax = 9232 y = 225 pmax = 9232 y = 226 pmax = 9232 y = 227 pmax = 9232 y = 228 pmax = 9232 y = 229 pmax = 9232 y = 230 pmax = 9232 y = 231 pmax = 9232 y = 232 pmax = 9232 y = 233 pmax = 9232 y = 234 pmax = 9232 y = 235 pmax = 9232 y = 236 pmax = 9232 y = 237 pmax = 9232 y = 238 pmax = 9232 y = 239 pmax = 9232 y = 240 pmax = 9232 y = 241 pmax = 9232 y = 242 pmax = 9232 y = 243 pmax = 9232 y = 244 pmax = 9232 y = 245 pmax = 9232 y = 246 pmax = 9232 y = 247 pmax = 9232 y = 248 pmax = 9232 y = 249 pmax = 9232 y = 250 pmax = 9232 y = 251 pmax = 9232 y = 252 pmax = 9232 y = 253 pmax = 9232 y = 254 pmax = 9232 y = 255 pmax = 13120 y = 256 pmax = 13120 y = 257 pmax = 13120 y = 258 pmax = 13120 y = 259 pmax = 13120 y = 260 pmax = 13120 y = 261 pmax = 13120 y = 262 pmax = 13120 y = 263 pmax = 13120 y = 264 pmax = 13120 y = 265 pmax = 13120 y = 266 pmax = 13120 y = 267 pmax = 13120 y = 268 pmax = 13120 y = 269 pmax = 13120 y = 270 pmax = 13120 y = 271 pmax = 13120 y = 272 pmax = 13120 y = 273 pmax = 13120 y = 274 pmax = 13120 y...

Suggested Problems

More from this Author95