Cody

# Problem 42754. Odd elimination

Solution 1250452

Submitted on 12 Aug 2017 by Matthew Van Vlack
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
n = 9; y_correct = 6; assert(isequal(odd_elimination(n),y_correct))

L2R = logical 1 y = 2 4 6 8 L2R = logical 0 y = 8 6 4 2 y = 6 2 y = 2 6 L2R = logical 1 y = 6

2   Pass
n = 1000; y_correct = 510; assert(isequal(odd_elimination(n),y_correct))

L2R = logical 1 y = Columns 1 through 14 2 4 6 8 10 12 14 16 18 20 22 24 26 28 Columns 15 through 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 Columns 29 through 42 58 60 62 64 66 68 70 72 74 76 78 80 82 84 Columns 43 through 56 86 88 90 92 94 96 98 100 102 104 106 108 110 112 Columns 57 through 70 114 116 118 120 122 124 126 128 130 132 134 136 138 140 Columns 71 through 84 142 144 146 148 150 152 154 156 158 160 162 164 166 168 Columns 85 through 98 170 172 174 176 178 180 182 184 186 188 190 192 194 196 Columns 99 through 112 198 200 202 204 206 208 210 212 214 216 218 220 222 224 Columns 113 through 126 226 228 230 232 234 236 238 240 242 244 246 248 250 252 Columns 127 through 140 254 256 258 260 262 264 266 268 270 272 274 276 278 280 Columns 141 through 154 282 284 286 288 290 292 294 296 298 300 302 304 306 308 Columns 155 through 168 310 312 314 316 318 320 322 324 326 328 330 332 334 336 Columns 169 through 182 338 340 342 344 346 348 350 352 354 356 358 360 362 364 Columns 183 through 196 366 368 370 372 374 376 378 380 382 384 386 388 390 392 Columns 197 through 210 394 396 398 400 402 404 406 408 410 412 414 416 418 420 Columns 211 through 224 422 424 426 428 430 432 434 436 438 440 442 444 446 448 Columns 225 through 238 450 452 454 456 458 460 462 464 466 468 470 472 474 476 Columns 239 through 252 478 480 482 484 486 488 490 492 494 496 498 500 502 504 Columns 253 through 266 506 508 510 512 514 516 518 520 522 524 526 528 530 532 Columns 267 through 280 534 536 538 540 542 544 546 548 550 552 554 556 558 560 Columns 281 through 294 562 564 566 568 570 572 574 576 578 580 582 584 586 588 Columns 295 through 308 590 592 594 596 598 600 602 604 606 608 610 612 614 616 Columns 309 through 322 618 620 622 624 626 628 630 632 634 636 638 640 642 644 Columns 323 through 336 646 648 650 652 654 656 658 660 662 664 666 668 670 672 Columns 337 through 350 674 676 678 680 682 684 686 688 690 692 694 696 698 700 Columns 351 through 364 702 704 706 708 710 712 714 716 718 720 722 724 726 728 Columns 365 through 378 730 732 734 736 738 740 742 744 746 748 750 752 754 756 Columns 379 through 392 758 760 762 764 766 768 770 772 774 776 778 780 782 784 Columns 393 through 406 786 788 790 792 794 796 798 800 802 804 806 808 810 812 Columns 407 through 420 814 816 818 820 822 824 826 828 830 832 834 836 838 840 Columns 421 through 434 842 844 846 848 850 852 854 856 858 860 862 864 866 868 Columns 435 through 448 870 872 874 876 878 880 882 884 886 888 890 892 894 896 Columns 449 through 462 898 900 902 904 906 908 910 912 914 916 918 920 922 924 Columns 463 through 476 926 928 930 932 934 936 938 940 942 944 946 948 950 952 Columns 477 through 490 954 956 958 960 962 964 966 968 970 972 974 976 978 980 Columns 491 through 500 982 984 986 988 990 992 994 996 998 1000 L2R = logical 0 y = Columns 1 through 14 1000 998 996 994 992 990 988 986 984 982 980 978 976 974 Columns 15 through 28 972 970 968 966 964 962 960 958 956 954 952 950 948 946 Columns 29 through 42 944 942 940 938 936 934 932 930 928 926 924 922 920 918 Columns 43 through 56 916 914 912 910 908 906 904 902 900 898 896 894 892 890 Columns 57 through 70 888 886 884 882 880 878 876 874 872 870 868 866 864 862 Columns 71 through 84 860 858 856 854 852 850 848 846 844 842 840 838 836 834 Columns 85 through 98 832 830 828 826 824 822 820 818 816 814 812 810 808 806 Columns 99 through 112 804 802 800 798 796 794 792 790 788 786 784 782 780 778 Columns 113 through 126 776 774 772 770 768 766 764 762 760 758 756 754 752 750 Columns 127 through 140 748 746 744 742 740 738 736 734 732 730 728 726 724 722 Columns 141 through 154 720 718 716 714 712 710 708 706 704 702 700 698 696 694 Columns 155 through 168 692 690 688 686 684 682 680 678 676 674 672 670 668 666 Columns 169 through 182 664 662 660 658 656 654 652 650 648 646 644 642 640 638 Columns 183 through 196 636 634 632 630 628 626 624 622 620 618 616 614 612 610 Columns 197 through 210 608 606 604 602 600 598 596 594 592 590 588 5...

3   Pass
n = 99; y_correct = 56; assert(isequal(odd_elimination(n),y_correct))

L2R = logical 1 y = Columns 1 through 29 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 30 through 49 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 L2R = logical 0 y = Columns 1 through 29 98 96 94 92 90 88 86 84 82 80 78 76 74 72 70 68 66 64 62 60 58 56 54 52 50 48 46 44 42 Columns 30 through 49 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 y = 96 92 88 84 80 76 72 68 64 60 56 52 48 44 40 36 32 28 24 20 16 12 8 4 y = 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 L2R = logical 1 y = 8 16 24 32 40 48 56 64 72 80 88 96 L2R = logical 0 y = 96 88 80 72 64 56 48 40 32 24 16 8 y = 88 72 56 40 24 8 y = 8 24 40 56 72 88 L2R = logical 1 y = 24 56 88 L2R = logical 0 y = 88 56 24 y = 56 y = 56

4   Pass
n = 5000; y_correct = 2014; assert(isequal(odd_elimination(n),y_correct))

L2R = logical 1 y = Columns 1 through 14 2 4 6 8 10 12 14 16 18 20 22 24 26 28 Columns 15 through 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 Columns 29 through 42 58 60 62 64 66 68 70 72 74 76 78 80 82 84 Columns 43 through 56 86 88 90 92 94 96 98 100 102 104 106 108 110 112 Columns 57 through 70 114 116 118 120 122 124 126 128 130 132 134 136 138 140 Columns 71 through 84 142 144 146 148 150 152 154 156 158 160 162 164 166 168 Columns 85 through 98 170 172 174 176 178 180 182 184 186 188 190 192 194 196 Columns 99 through 112 198 200 202 204 206 208 210 212 214 216 218 220 222 224 Columns 113 through 126 226 228 230 232 234 236 238 240 242 244 246 248 250 252 Columns 127 through 140 254 256 258 260 262 264 266 268 270 272 274 276 278 280 Columns 141 through 154 282 284 286 288 290 292 294 296 298 300 302 304 306 308 Columns 155 through 168 310 312 314 316 318 320 322 324 326 328 330 332 334 336 Columns 169 through 182 338 340 342 344 346 348 350 352 354 356 358 360 362 364 Columns 183 through 196 366 368 370 372 374 376 378 380 382 384 386 388 390 392 Columns 197 through 210 394 396 398 400 402 404 406 408 410 412 414 416 418 420 Columns 211 through 224 422 424 426 428 430 432 434 436 438 440 442 444 446 448 Columns 225 through 238 450 452 454 456 458 460 462 464 466 468 470 472 474 476 Columns 239 through 252 478 480 482 484 486 488 490 492 494 496 498 500 502 504 Columns 253 through 266 506 508 510 512 514 516 518 520 522 524 526 528 530 532 Columns 267 through 280 534 536 538 540 542 544 546 548 550 552 554 556 558 560 Columns 281 through 294 562 564 566 568 570 572 574 576 578 580 582 584 586 588 Columns 295 through 308 590 592 594 596 598 600 602 604 606 608 610 612 614 616 Columns 309 through 322 618 620 622 624 626 628 630 632 634 636 638 640 642 644 Columns 323 through 336 646 648 650 652 654 656 658 660 662 664 666 668 670 672 Columns 337 through 350 674 676 678 680 682 684 686 688 690 692 694 696 698 700 Columns 351 through 364 702 704 706 708 710 712 714 716 718 720 722 724 726 728 Columns 365 through 378 730 732 734 736 738 740 742 744 746 748 750 752 754 756 Columns 379 through 392 758 760 762 764 766 768 770 772 774 776 778 780 782 784 Columns 393 through 406 786 788 790 792 794 796 798 800 802 804 806 808 810 812 Columns 407 through 420 814 816 818 820 822 824 826 828 830 832 834 836 838 840 Columns 421 through 434 842 844 846 848 850 852 854 856 858 860 862 864 866 868 Columns 435 through 448 870 872 874 876 878 880 882 884 886 888 890 892 894 896 Columns 449 through 462 898 900 902 904 906 908 910 912 914 916 918 920 922 924 Columns 463 through 476 926 928 930 932 934 936 938 940 942 944 946 948 950 952 Columns 477 through 490 954 956 958 960 962 964 966 968 970 972 974 976 978 980 Columns 491 through 504 982 984 986 988 990 992 994 996 998 1000 1002 1004 1006 1008 Columns 505 through 518 1010 1012 1014 1016 1018 1020 1022 1024 1026 1028 1030 1032 1034 1036 Columns 519 through 532 1038 1040 1042 1044 1046 1048 1050 1052 1054 1056 1058 1060 1062 1064 Columns 533 through 546 1066 1068 1070 1072 1074 1076 1078 1080 1082 1084 1086 1088 1090 1092 Columns 547 through 560 1094 1096 1098 1100 1102 1104 1106 1108 1110 1112 1114 1116 1118 1120 Columns 561 through 574 1122 1124 1126 1128 1130 1132 1134 1136 1138 1140 1142 1144 1146 1148 Columns 575 through 588 1150 1152 1154 1156 1158 1160 1162 1164 1166 1168 1170 1172 1174 1176 Columns 589 through 602 1178 1180 1182 1184 1186 1188 1190 1192 1194 1196 1198 1200 1202 1204 Columns 603 through 616 1206 1208 1210 1212 1214 1216 1218 1220 1222 1224 1226 1228 1230 1232 Columns 617 through 630 1234 1236 1238 1240 1242 1244 1246 1248 1250 1252 1254 1256 1258 1260 Columns 631 through 644 1262 1264 1266 1268 1270 1272 1274 1276 1278 1280 1282 1284 1286 1288 Columns 645 through 658 1290 1292 1294 1296 1298 1300 1302 1304 1306 1308 1310 1312 1314 1316 Columns 659 through 672 1318 1320 1322 1324 1326 1328 1330 1332 1334 1336 1338 1340 1342 1344 Columns 673 through 686 1346 1348 1350 1352 1354 1356 1358 1360 1362 1364 1366 1368 1370 1372 Columns 687 through 700 1374 1376 1378 1380 1382 1384 1386 1388 1390 1392 1394 1396 1398 1400 Columns 701 through 714 1402 1404 1406 1408 1410 1412 1414 1416 1418 ...

5   Pass
n = 100000; y_correct = 55286; assert(isequal(odd_elimination(n),y_correct))

L2R = logical 1 y = Columns 1 through 14 2 4 6 8 10 12 14 16 18 20 22 24 26 28 Columns 15 through 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 Columns 29 through 42 58 60 62 64 66 68 70 72 74 76 78 80 82 84 Columns 43 through 56 86 88 90 92 94 96 98 100 102 104 106 108 110 112 Columns 57 through 70 114 116 118 120 122 124 126 128 130 132 134 136 138 140 Columns 71 through 84 142 144 146 148 150 152 154 156 158 160 162 164 166 168 Columns 85 through 98 170 172 174 176 178 180 182 184 186 188 190 192 194 196 Columns 99 through 112 198 200 202 204 206 208 210 212 214 216 218 220 222 224 Columns 113 through 126 226 228 230 232 234 236 238 240 242 244 246 248 250 252 Columns 127 through 140 254 256 258 260 262 264 266 268 270 272 274 276 278 280 Columns 141 through 154 282 284 286 288 290 292 294 296 298 300 302 304 306 308 Columns 155 through 168 310 312 314 316 318 320 322 324 326 328 330 332 334 336 Columns 169 through 182 338 340 342 344 346 348 350 352 354 356 358 360 362 364 Columns 183 through 196 366 368 370 372 374 376 378 380 382 384 386 388 390 392 Columns 197 through 210 394 396 398 400 402 404 406 408 410 412 414 416 418 420 Columns 211 through 224 422 424 426 428 430 432 434 436 438 440 442 444 446 448 Columns 225 through 238 450 452 454 456 458 460 462 464 466 468 470 472 474 476 Columns 239 through 252 478 480 482 484 486 488 490 492 494 496 498 500 502 504 Columns 253 through 266 506 508 510 512 514 516 518 520 522 524 526 528 530 532 Columns 267 through 280 534 536 538 540 542 544 546 548 550 552 554 556 558 560 Columns 281 through 294 562 564 566 568 570 572 574 576 578 580 582 584 586 588 Columns 295 through 308 590 592 594 596 598 600 602 604 606 608 610 612 614 616 Columns 309 through 322 618 620 622 624 626 628 630 632 634 636 638 640 642 644 Columns 323 through 336 646 648 650 652 654 656 658 660 662 664 666 668 670 672 Columns 337 through 350 674 676 678 680 682 684 686 688 690 692 694 696 698 700 Columns 351 through 364 702 704 706 708 710 712 714 716 718 720 722 724 726 728 Columns 365 through 378 730 732 734 736 738 740 742 744 746 748 750 752 754 756 Columns 379 through 392 758 760 762 764 766 768 770 772 774 776 778 780 782 784 Columns 393 through 406 786 788 790 792 794 796 798 800 802 804 806 808 810 812 Columns 407 through 420 814 816 818 820 822 824 826 828 830 832 834 836 838 840 Columns 421 through 434 842 844 846 848 850 852 854 856 858 860 862 864 866 868 Columns 435 through 448 870 872 874 876 878 880 882 884 886 888 890 892 894 896 Columns 449 through 462 898 900 902 904 906 908 910 912 914 916 918 920 922 924 Columns 463 through 476 926 928 930 932 934 936 938 940 942 944 946 948 950 952 Columns 477 through 490 954 956 958 960 962 964 966 968 970 972 974 976 978 980 Columns 491 through 504 982 984 986 988 990 992 994 996 998 1000 1002 1004 1006 1008 Columns 505 through 518 1010 1012 1014 1016 1018 1020 1022 1024 1026 1028 1030 1032 1034 1036 Columns 519 through 532 1038 1040 1042 1044 1046 1048 1050 1052 1054 1056 1058 1060 1062 1064 Columns 533 through 546 1066 1068 1070 1072 1074 1076 1078 1080 1082 1084 1086 1088 1090 1092 Columns 547 through 560 1094 1096 1098 1100 1102 1104 1106 1108 1110 1112 1114 1116 1118 1120 Columns 561 through 574 1122 1124 1126 1128 1130 1132 1134 1136 1138 1140 1142 1144 1146 1148 Columns 575 through 588 1150 1152 1154 1156 1158 1160 1162 1164 1166 1168 1170 1172 1174 1176 Columns 589 through 602 1178 1180 1182 1184 1186 1188 1190 1192 1194 1196 1198 1200 1202 1204 Columns 603 through 616 1206 1208 1210 1212 1214 1216 1218 1220 1222 1224 1226 1228 1230 1232 Columns 617 through 630 1234 1236 1238 1240 1242 1244 1246 1248 1250 1252 1254 1256 1258 1260 Columns 631 through 644 1262 1264 1266 1268 1270 1272 1274 1276 1278 1280 1282 1284 1286 1288 Columns 645 through 658 1290 1292 1294 1296 1298 1300 1302 1304 1306 1308 1310 1312 1314 1316 Columns 659 through 672 1318 1320 1322 1324 1326 1328 1330 1332 1334 1336 1338 1340 1342 1344 Columns 673 through 686 1346 1348 1350 1352 1354 1356 1358 1360 1362 1364 1366 1368 1370 1372 Columns 687 through 700 1374 1376 1378 1380 1382 1384 1386 1388 1390 1392 1394 1396 1398 1400 Columns 701 through 714 1402 1404 1406 1408 1410 1412 1414 1416 1418 ...

6   Pass
n = 666; y_correct = 480; assert(isequal(odd_elimination(n),y_correct))

L2R = logical 1 y = Columns 1 through 29 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 Columns 30 through 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 Columns 59 through 87 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174 Columns 88 through 116 176 178 180 182 184 186 188 190 192 194 196 198 200 202 204 206 208 210 212 214 216 218 220 222 224 226 228 230 232 Columns 117 through 145 234 236 238 240 242 244 246 248 250 252 254 256 258 260 262 264 266 268 270 272 274 276 278 280 282 284 286 288 290 Columns 146 through 174 292 294 296 298 300 302 304 306 308 310 312 314 316 318 320 322 324 326 328 330 332 334 336 338 340 342 344 346 348 Columns 175 through 203 350 352 354 356 358 360 362 364 366 368 370 372 374 376 378 380 382 384 386 388 390 392 394 396 398 400 402 404 406 Columns 204 through 232 408 410 412 414 416 418 420 422 424 426 428 430 432 434 436 438 440 442 444 446 448 450 452 454 456 458 460 462 464 Columns 233 through 261 466 468 470 472 474 476 478 480 482 484 486 488 490 492 494 496 498 500 502 504 506 508 510 512 514 516 518 520 522 Columns 262 through 290 524 526 528 530 532 534 536 538 540 542 544 546 548 550 552 554 556 558 560 562 564 566 568 570 572 574 576 578 580 Columns 291 through 319 582 584 586 588 590 592 594 596 598 600 602 604 606 608 610 612 614 616 618 620 622 624 626 628 630 632 634 636 638 Columns 320 through 333 640 642 644 646 648 650 652 654 656 658 660 662 664 666 L2R = logical 0 y = Columns 1 through 29 666 664 662 660 658 656 654 652 650 648 646 644 642 640 638 636 634 632 630 628 626 624 622 620 618 616 614 612 610 Columns 30 through 58 608 606 604 602 600 598 596 594 592 590 588 586 584 582 580 578 576 574 572 570 568 566 564 562 560 558 556 554 552 Columns 59 through 87 550 548 546 544 542 540 538 536 534 532 530 528 526 524 522 520 518 516 514 512 510 508 506 504 502 500 498 496 494 Columns 88 through 116 492 490 488 486 484 482 480 478 476 474 472 470 468 466 464 462 460 458 456 454 452 450 448 446 444 442 440 438 436 Columns 117 through 145 434 432 430 428 426 424 422 420 418 416 414 412 410 408 406 404 402 400 398 396 394 392 390 388 386 384 382 380 378 Columns 146 through 174 376 374 372 370 368 366 364 362 360 358 356 354 352 350 348 346 344 342 340 338 336 334 332 330 328 326 324 322 320 Columns 175 through 203 318 316 314 312 310 308 306 304 302 300 298 296 294 292 290 288 286 284 282 280 278 276 274 272 270 268 266 264 262 Columns 204 through 232 260 258 256 254 252 250 248 246 244 242 240 238 236 234 232 230 228 226 224 222 220 218 216 214 212 210 208 206 204 Columns 233 through 261 202 200 198 196 194 192 190 188 186 184 182 180 178 176 174 172 170 168 166 164 162 160 158 156 154 152 150 148 146 Columns 262 through 290 144 142 140 138 136 134 132 130 128 126 124 122 120 118 116 114 112 110 108 106 104 102 100 98 96 94 92 90 88 Columns 291 through 319 86 84 82 80 78 76 74 72 70 68 66 64 62 60 58 56 54 52 50 48 46 44 42 40 38 36 34 32 30 Columns 320 through 333 28 26 24 22 20 18 16 14 12 10 8 6 4 2 y = Columns 1 through 29 664 660 656 652 648 644 640 636 632 628 624 620 616 612 608 604 600 596 592 588 584 580 576 572 568 564 560 556 552 Columns 30 through 58 548 544 540 536 532 528 524 520 516 512 508 504 500 496 492 488 484 480 476 472 468 464 460 456 452 448 444 440 436 Columns 59 through 87 432 428 424 420 416 412 408 404 400 396 392 388 384 380 376 372 368 364 360 356 352 348 344 340 336 332 328 324 320 Columns 88 through 116 316 312 308 304 300 296 292 288 284 280 276 272 268 264 260 256 252 248 244 240 236 232 228 224 220 216 212 208 204 Columns 117 through 145 200 196 192 188 184 180 176 172 168 164 160 156 152 148 144 140 136 132 128 124 120 116 112 108 104 100 96 92 88 Columns 146 through 166 84 80 76 72 68 64 60 56 52 48 44 40 36 32 28 24 20 16 12 8 4 y = Columns 1 through 29 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 Columns 30 through 58 120 124 128 132 136 140 144 148 152 156 160 164 168 172 176 180 184 188 192 196 200 204 208 212 216 220 224 228 232 Columns 59 through 87 236 240 244 248 252 256 260 264 268 272 276 280 284 288 292 296 300 304 308 312 316 320 324 328 332 336 340 344 348 Columns 88 through 116 352 356 360 364 368 372 376 380 384 388 392 396 400 404 408 412 416 420 424 428 432 436 440 444 448 452 456 460 464 Columns 117 through 145 468 472 476 480 484 488 492 496 500 504 508 512 516 520 524 528 532 536 540 544 548 552 556 560 564 568 572 576 580 Columns 146 through 166 584 588 592 596 600 604 608 612 616 620 624 628 632 636 640 644 648 652 656 660 664 L2R = logical 1 y = Columns 1 through 29 8 16 24 32 40 48 56 64 72 80 88 96 104 112 120 128 136 144 152 160 168 176 184 192 200 208 216 224 232 Columns 30 through 58 240 248 256 264 272 280 288 296 304 312 320 328 336 344 352 360 368 376 384 392 400 408 416 424 432 440 448 456 464 Columns 59 through 83 472 480 488 496 504 512 520 528 536 544 552 560 568 576 584 592 600 608 616 624 632 640 648 656 664 L2R = logical 0 y = Columns 1 through 29 664 656 648 640 632 624 616 608 600 592 584 576 568 560 552 544 536 528 520 512 504 496 488 480 472 464 456 448 440 Columns 30 through 58 432 424 416 408 400 392 384 376 368 360 352 344 336 328 320 312 304 296 288 280 272 264 256 248 240 232 224 216 208 Columns 59 through 83 200 192 184 176 168 160 152 144 136 128 120 112 104 96 88 80 72 64 56 48 40 32 24 16 8 y = Columns 1 through 29 656 640 624 608 592 576 560 544 528 512 496 480 464 448 432 416 400 384 368 352 336 320 304 288 272 256 240 224 208 Columns 30 through 41 192 176 160 144 128 112 96 80 64 48 32 16 y = Columns 1 through 29 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 352 368 384 400 416 432 448 464 Columns 30 through 41 480 496 512 528 544 560 576 592 608 624 640 656 L2R = logical 1 y = 32 64 96 128 160 192 224 256 288 320 352 384 416 448 480 512 544 576 608 640 L2R = logical 0 y = 640 608 576 544 512 480 448 416 384 352 320 288 256 224 192 160 128 96 64 32 y = 608 544 480 416 352 288 224 160 96 32 y = 32 96 160 224 288 352 416 480 544 608 L2R = logical 1 y = 96 224 352 480 608 L2R = logical 0 y = 608 480 352 224 96 y = 480 224 y = 224 480 L2R = logical 1 y = 480