Cody

Solution 1941945

Submitted on 18 Sep 2019 by Charles Juenger
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
s1 = 'North Carolina Tennessee Texas Nebraska Maine'; s2 = ' Tennessee Texas Maine'; assert(isequal(s2,refcn(s1)))

s1 = ' North Carolina Tennessee Texas Nebraska Maine ' a = 1 7 16 26 32 41 47 s1 = ' Carolina Tennessee Texas Nebraska Maine ' s1 = ' Narolina Tennessee Texas Nebraska Maine ' a = -5 1 10 20 26 35 41 s1 = ' Tennessee Texas Nebraska Maine ' a = -13 -7 2 12 18 27 33 s1 = ' Tennessee Texas Maine ' a = -21 -15 -6 4 10 19 25 s2 = ' Tennessee Texas Maine'

2   Pass
s1 = 'Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota'; s2 = ' '; assert(isequal(s2,refcn(s1)))

s1 = ' Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota ' a = 1 10 17 21 31 35 42 46 53 57 62 68 77 83 90 s1 = ' Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota ' a = -7 2 9 13 23 27 34 38 45 49 54 60 69 75 82 s1 = ' New Hampshire New Jersey New Mexico New York North Carolina North Dakota ' a = -13 -4 3 7 17 21 28 32 39 43 48 54 63 69 76 s1 = ' Hampshire New Jersey New Mexico New York North Carolina North Dakota ' s1 = ' Nampshire New Jersey New Mexico New York North Carolina North Dakota ' a = -17 -8 -1 3 13 17 24 28 35 39 44 50 59 65 72 s1 = ' New Jersey New Mexico New York North Carolina North Dakota ' a = -26 -17 -10 -6 4 8 15 19 26 30 35 41 50 56 63 s1 = ' Jersey New Mexico New York North Carolina North Dakota ' s1 = ' Nersey New Mexico New York North Carolina North Dakota ' a = -30 -21 -14 -10 0 4 11 15 22 26 31 37 46 52 59 s1 = ' New Mexico New York North Carolina North Dakota ' a = -36 -27 -20 -16 -6 -2 5 9 16 20 25 31 40 46 53 s1 = ' Mexico New York North Carolina North Dakota ' s1 = ' Nexico New York North Carolina North Dakota ' a = -40 -31 -24 -20 -10 -6 1 5 12 16 21 27 36 42 49 s1 = ' New York North Carolina North Dakota ' a = -46 -37 -30 -26 -16 -12 -5 -1 6 10 15 21 30 36 43 s1 = ' York North Carolina North Dakota ' s1 = ' Nork North Carolina North Dakota ' a = -50 -41 -34 -30 -20 -16 -9 -5 2 6 11 17 26 32 39 s1 = ' North Carolina North Dakota ' a = -54 -45 -38 -34 -24 -20 -13 -9 -2 2 7 13 22 28 35 s1 = ' Carolina North Dakota ' s1 = ' Narolina North Dakota ' a = -60 -51 -44 -40 -30 -26 -19 -15 -8 -4 1 7 16 22 29 s1 = ' North Dakota ' a = -68 -59 -52 -48 -38 -34 -27 -23 -16 -12 -7 -1 8 14 21 s1 = ' Dakota ' s1 = ' Nakota ' a = -74 -65 -58 -54 -44 -40 -33 -29 -22 -18 -13 -7 2 8 15 s1 = ' ' a = -80 -71 -64 -60 -50 -46 -39 -35 -28 -24 -19 -13 -4 2 9 s2 = ' '

3   Pass
s1 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming'; s2 = 'Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming'; assert(isequal(s2,refcn(s1)))

s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' a = Columns 1 through 30 1 9 16 24 33 44 53 65 74 82 90 97 103 112 120 125 132 141 151 157 166 180 189 199 211 220 228 237 244 248 Columns 31 through 60 258 262 269 273 280 284 289 295 304 310 317 322 331 338 351 357 364 370 379 385 392 402 408 413 421 430 441 446 455 465 Column 61 473 s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' a = Columns 1 through 30 -7 1 8 16 25 36 45 57 66 74 82 89 95 104 112 117 124 133 143 149 158 172 181 191 203 212 220 229 236 240 Columns 31 through 60 250 254 261 265 272 276 281 287 296 302 309 314 323 330 343 349 356 362 371 377 384 394 400 405 413 422 433 438 447 457 Column 61 465 s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' a = Columns 1 through 30 -13 -5 2 10 19 30 39 51 60 68 76 83 89 98 106 111 118 127 137 143 152 166 175 185 197 206 214 223 230 234 Columns 31 through 60 244 248 255 259 266 270 275 281 290 296 303 308 317 324 337 343 350 356 365 371 378 388 394 399 407 416 427 432 441 451 Column 61 459 s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' a = Columns 1 through 30 -17 -9 -2 6 15 26 35 47 56 64 72 79 85 94 102 107 114 123 133 139 148 162 171 181 193 202 210 219 226 230 Columns 31 through 60 240 244 251 255 262 266 271 277 286 292 299 304 313 320 333 339 346 352 361 367 374 384 390 395 403 412 423 428 437 447 Column 61 455 s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' a = Columns 1 through 30 -26 -18 -11 -3 6 17 26 38 47 55 63 70 76 85 93 98 105 114 124 130 139 153 162 172 184 193 201 210 217 221 Columns 31 through 60 231 235 242 246 253 257 262 268 277 283 290 295 304 311 324 330 337 343 352 358 365 375 381 386 394 403 414 419 428 438 Column 61 446 s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' a = Columns 1 through 30 -30 -22 -15 -7 2 13 22 34 43 51 59 66 72 81 89 94 101 110 120 126 135 149 158 168 180 189 197 206 213 217 Columns 31 through 60 227 231 238 242 249 253 258 264 273 279 286 291 300 307 320 326 333 339 348 354 361 371 377 382 390 399 410 415 424 434 Column 61 442 s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' a = Columns 1 through 30 -36 -28 -21 -13 -4 7 16 28 37 45 53 60 66 75 83 88 95 104 114 120 129 143 152 162 174 183 191 200 207 211 Columns 31 through 60 221 225 232 236 243 247 252 258 267 273 280 285 294 301 314 320 327 333 342 348 355 365 371 376 384 393 404 409 418 428 Column 61 436 s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' a = Columns 1 through 30 -40 -32 -25 -17 -8 3 12 24 33 41 49 56 62 71 79 84 91 100 110 116 125 139 148 158 170 179 187 196 203 207 Columns 31 through 60 217 221 228 232 239 243 248 254 263 269 276 281 290 297 310 316 323 329 338 344 351 361 367 372 380 389 400 405 414 424 Column 61 432 s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' a = Columns 1 through 30 -46 -38 -31 -23 -14 -3 6 18 27 35 43 50 56 65 73 78 85 94 104 110 119 133 142 152 164 173 181 190 197 201 Columns 31 through 60 211 215 222 226 233 237 242 248 257 263 270 275 284 291 304 310 317 323 332 338 345 355 361 366 374 383 394 399 408 418 Column 61 426 s1 = ' Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming ' s1 = ' Alabama Alaska Arizona Arkansas California Color...

Suggested Problems

More from this Author95