Cody

# Problem 45415. Find an optimal placement of coolers on a grid

Solution 3408593

Submitted on 26 Oct 2020 at 22:04 by cokakola
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

filetext = 'function y = coolers(COST) kosten=COST(:,end); % letzte spalte for col=5:-1:1 lastcost=kosten; kosten(1)=COST(1,col)+min(lastcost(1:2)); for row=2:5 kosten(row)=COST(row,col)+min(lastcost(row-1:row+1)); end kosten(6)=COST(6,col)+min(lastcost(5:6)); end y=min(kosten) end %This code written by profile_id 7164325 '

2   Pass
COST = [815 617 918 76 569 312; 244 474 286 54 470 529; 930 352 758 531 455 988; 350 831 754 780 12 602; 197 586 381 935 163 263; 252 550 568 130 795 100]; assert(isequal(coolers(COST),1521))

y = 1521

3   Pass
COST = [690 153 107 85 182 550; 749 826 962 400 264 145; 451 539 5 260 146 854; 84 997 775 801 137 623; 229 79 818 432 870 351; 914 443 869 911 580 514]; assert(isequal(coolers(COST),1179))

y = 1179

4   Pass
COST = [402 418 338 242 576 44; 76 50 901 404 60 169; 240 903 370 97 235 650; 124 945 112 132 354 732; 184 491 781 943 822 648; 240 490 390 957 16 451]; assert(isequal(coolers(COST),697))

y = 697

5   Pass
COST = [1 1 1000 1000 1000 1; 1 1000 1 1000 1000 1000; 1 1000 1000 1000 1 1000; 1 1000 1000 1 1000 1000; 1 1000 1000 1000 1000 1000; 1 1000 1000 1000 1000 1000]; assert(isequal(coolers(COST),2004))

y = 2004

6   Pass
COST = [548 369 487 818 351 208; 297 626 436 795 940 302; 745 781 447 645 876 471; 189 82 307 379 551 231; 687 930 509 812 623 845; 184 776 511 533 588 195]; assert(isequal(coolers(COST),1739))

y = 1739

7   Pass
COST = [226 431 259 222 86 489; 171 185 409 118 263 579; 228 905 595 297 802 238; 436 980 263 319 30 459; 312 439 603 425 929 964; 924 112 712 508 731 547]; assert(isequal(coolers(COST),1234))

y = 1234

8   Pass
COST = [522 368 99 107 891 501; 232 988 262 654 335 480; 489 38 336 495 699 905; 625 886 680 780 198 610; 680 914 137 716 31 618; 396 797 722 904 745 860]; assert(isequal(coolers(COST),1454))

y = 1454

9   Pass
COST = [806 490 60 819 973 84; 577 168 682 818 649 134; 183 979 43 723 801 174; 240 713 72 150 454 391; 887 501 522 660 433 832; 29 472 97 519 826 804]; assert(isequal(coolers(COST),1172))

y = 1172

10   Pass
COST = [61 292 373 53 418 699; 400 432 199 738 984 667; 527 16 490 270 302 179; 417 985 340 423 702 129; 657 168 952 548 667 1000; 628 107 921 943 540 172]; assert(isequal(coolers(COST),1253))

y = 1253

11   Pass
COST = [33 461 191 385 825 907; 562 982 429 583 983 880; 882 157 483 252 731 818; 670 856 121 291 344 261; 191 645 590 618 585 595; 369 377 227 266 108 23]; assert(isequal(coolers(COST),1192))

y = 1192

12   Pass
COST = [426 599 69 719 779 441; 313 471 320 969 424 528; 162 696 531 532 91 458; 179 700 655 326 267 876; 423 639 408 106 154 519; 95 34 820 611 282 944]; assert(isequal(coolers(COST),1316))

y = 1316

13   Pass
COST = [638 696 345 916 323 474; 958 68 781 2 785 153; 241 255 676 463 472 342; 677 225 7 425 36 608; 290 668 603 461 176 192; 672 845 387 771 722 739]; assert(isequal(coolers(COST),1126))

y = 1126

14   Pass
COST = [243 92 648 237 771 257; 918 577 680 120 351 614; 270 684 636 608 663 583; 766 547 946 451 417 541; 189 426 209 459 842 870; 288 645 710 662 833 265]; assert(isequal(coolers(COST),1711))

y = 1711

15   Pass
COST = [319 545 219 366 193 862; 120 648 106 764 139 485; 940 544 110 628 697 394; 646 722 64 772 94 672; 480 523 405 933 526 742; 640 994 449 973 531 521]; assert(isequal(coolers(COST),1669))

y = 1669

16   Pass
COST = [674 622 842 636 885 896; 575 722 853 599 699 975; 794 844 722 911 905 664; 632 680 510 715 878 836; 523 869 667 944 689 720; 878 698 713 696 609 917]; assert(isequal(coolers(COST),3837))

y = 3837

17   Pass
COST = [82 122 681 602 355 371;... 483 544 417 347 776 384;... 129 315 643 365 237 862;... 253 383 215 172 845 464;... 884 792 618 796 817 571;... 197 840 676 493 847 696]; assert(isequal(coolers(COST),1452))

y = 1452

18   Pass
COST = [961 170 710 563 536 327;... 547 179 176 177 199 603;... 637 244 859 514 624 362;... 571 752 910 549 27 135;... 928 200 962 166 319 914;... 864 983 571 494 533 641]; assert(isequal(coolers(COST),1569))

y = 1569

19   Pass
COST = [659 381 223 112 267 869;... 676 822 1000 425 292 529;... 745 172 64 614 189 915;... 843 330 426 989 23 974;... 517 967 405 220 450 586;... 152 807 401 355 244 119]; assert(isequal(coolers(COST),1835))

y = 1835

20   Pass
COST = [927 925 215 554 571 679;... 594 643 249 631 336 213;... 884 105 227 986 958 82;... 425 701 704 635 440 275;... 608 396 755 601 602 868;... 71 85 548 910 721 560]; assert(isequal(coolers(COST),1751))

y = 1751

21   Pass
COST = [465 433 384 904 809 299;... 431 506 712 219 180 769;... 774 376 481 874 166 502;... 654 481 730 83 182 910;... 658 343 938 466 692 58;... 162 778 518 22 214 437]; assert(isequal(coolers(COST),1317))

y = 1317

22   Pass
COST = [573 952 497 860 78 228;... 566 767 809 627 339 710;... 824 752 633 181 581 149;... 127 139 689 574 476 659;... 301 350 640 164 806 634;... 3 152 730 907 531 230]; assert(isequal(coolers(COST),1568))

y = 1568

23   Pass
COST = [183 958 897 179 998 879;... 167 26 190 747 5 747;... 150 972 661 50 543 118;... 203 298 942 72 862 510;... 955 526 976 490 910 169;... 16 863 108 850 846 832]; assert(isequal(coolers(COST),539))

y = 539

24   Pass
COST = [929 868 245 81 27 760;... 170 742 641 361 786 926;... 884 448 809 829 923 833;... 388 710 854 215 493 260;... 383 945 399 792 835 214;... 272 175 116 655 132 523]; assert(isequal(coolers(COST),1564))

y = 1564

25   Pass
COST = [398 438 798 217 378 972;... 480 773 656 812 168 361;... 994 745 33 139 541 645;... 605 443 558 882 102 68;... 945 54 720 924 40 208;... 491 88 111 13 934 40]; assert(isequal(coolers(COST),749))

y = 749

26   Pass
COST = [470 581 9 642 470 879;... 151 541 825 106 220 189;... 992 706 768 269 923 760;... 428 6 998 764 321 32;... 956 783 228 806 858 643;... 725 927 920 105 260 567]; assert(isequal(coolers(COST),1216))

y = 1216

27   Pass
COST = [377 187 35 595 562 603;... 213 486 489 499 634 474;... 793 839 972 568 931 357;... 146 142 113 427 978 476;... 490 733 744 77 94 672;... 13 692 639 291 662 960]; assert(isequal(coolers(COST),1048))

y = 1048

28   Pass
COST = [90 52 454 629 707 46;... 798 505 738 133 536 886;... 591 769 510 619 194 840;... 913 283 383 384 690 119;... 102 226 906 992 51 411;... 294 332 966 287 185 121]; assert(isequal(coolers(COST),1042))

y = 1042

29   Pass
COST = [573 666 232 754 549 464;... 950 974 53 622 461 590;... 257 623 902 395 646 188;... 990 64 794 360 514 612;... 350 374 374 89 815 52;... 209 167 833 342 98 576]; assert(isequal(coolers(COST),934))

y = 934

30   Pass
COST = [843 797 666 67 652 382;... 500 294 961 898 134 301;... 440 116 944 498 639 341;... 150 376 113 772 385 919;... 29 829 649 61 766 457;... 757 842 481 263 653 443]; assert(isequal(coolers(COST),1166))

y = 1166

31   Pass
COST = [455 767 602 56 365 673;... 946 343 650 99 677 203;... 220 619 343 650 376 869;... 883 454 494 765 864 752;... 20 11 702 988 292 420;... 342 600 888 126 134 1]; assert(isequal(coolers(COST),994))

y = 994

32   Pass
COST = [150 436 24 66 150 132;... 274 904 575 924 351 887;... 873 926 47 535 336 675;... 602 506 423 367 785 836;... 322 628 468 364 487 657;... 285 720 23 152 465 984]; assert(isequal(coolers(COST),958))

y = 958

33   Pass
COST = [980 191 386 245 842 952;... 251 125 311 804 79 966;... 625 3 4 824 238 766;... 729 153 816 853 818 575;... 499 535 639 468 406 916;... 850 511 449 971 467 496]; assert(isequal(coolers(COST),1655))

y = 1655

34   Pass
COST = [167 167 988 896 65 887;... 326 948 151 835 264 421;... 297 812 959 3 103 284;... 559 711 531 641 484 49;... 68 971 75 804 419 220;... 69 999 312 246 382 240]; assert(isequal(coolers(COST),640))

y = 640

35   Pass
COST = [30 653 667 689 433 469;... 703 321 848 321 905 546;... 8 104 763 532 631 180;... 611 536 808 874 984 635;... 409 165 633 55 586 963;... 249 884 711 501 841 535]; assert(isequal(coolers(COST),2007))

y = 2007

36   Pass
COST = [480 679 683 689 62 13;... 794 566 947 148 220 217;... 93 479 100 778 83 12;... 881 321 512 400 951 643;... 4 602 111 899 17 517;... 512 914 546 308 115 246]; assert(isequal(coolers(COST),648))

y = 648

37   Pass
COST = [194 309 342 580 56 396;... 91 745 840 329 35 170;... 369 840 983 269 287 431;... 8 263 627 551 78 417;... 603 515 182 181 901 729;... 479 447 124 679 847 407]; assert(isequal(coolers(COST),1129))

y = 1129

38   Pass
COST = [952 211 79 334 443 924;... 912 131 934 693 633 153;... 952 521 603 204 930 406;... 347 906 378 959 530 313;... 291 403 665 712 627 694;... 887 216 793 167 681 891]; assert(isequal(coolers(COST),2052))

y = 2052

39   Pass
COST = [491 677 35 27 661 34;... 806 829 437 501 330 407;... 327 111 937 828 660 717;... 550 280 263 259 14 922;... 389 768 570 46 719 985;... 897 217 360 247 392 984]; assert(isequal(coolers(COST),1266))

y = 1266

40   Pass
COST = [897 655 269 739 879 390;... 866 864 153 13 903 300;... 801 275 631 606 153 735;... 555 841 317 577 193 105;... 419 71 960 808 791 793;... 128 379 499 655 61 783]; assert(isequal(coolers(COST),1254))

y = 1254

41   Pass
COST = [533 130 314 596 463 399;... 254 451 642 537 368 478;... 71 673 787 331 680 67;... 626 857 290 412 568 412;... 25 499 498 795 652 970;... 63 49 819 344 492 781]; assert(isequal(coolers(COST),1580))

y = 1580

42   Pass
COST = [730 112 727 411 679 798;... 766 397 148 143 254 712;... 757 493 148 799 844 784;... 844 259 705 931 294 624;... 771 37 381 5 27 826;... 979 975 77 651 94 36]; assert(isequal(coolers(COST),953))

y = 953

43   Pass
COST = [406 27 672 377 507 436;... 250 156 53 114 329 158;... 481 834 735 965 754 601;... 881 195 500 433 837 938;... 281 830 944 85 254 108;... 600 339 290 717 535 900]; assert(isequal(coolers(COST),931))

y = 931

44   Pass
COST = [551 355 642 427 787 943;... 428 774 128 34 512 97;... 153 882 497 930 563 846;... 248 735 311 925 685 910;... 448 407 579 359 93 12;... 533 605 944 260 873 524]; assert(isequal(coolers(COST),1430))

y = 1430

45   Pass
COST = [651 279 401 430 885 568;... 386 840 555 38 256 895;... 650 427 444 976 910 215;... 763 632 91 523 895 4;... 576 834 745 910 399 881;... 632 271 33 384 626 236]; assert(isequal(coolers(COST),1575))

y = 1575

46   Pass
COST = [245 391 532 153 716 903;... 641 802 889 231 281 290;... 305 158 264 658 413 500;... 826 626 235 563 363 784;... 884 699 840 292 782 678;... 946 86 496 623 136 150]; assert(isequal(coolers(COST),1276))

y = 1276

47   Pass
COST = [697 977 429 793 902 349;... 130 126 15 420 52 166;... 946 753 326 533 809 29;... 887 828 135 926 335 956;... 516 782 451 900 229 681;... 680 191 573 545 823 861]; assert(isequal(coolers(COST),772))

y = 772

48   Pass
COST = [940 301 652 887 695 895;... 681 74 170 115 207 842;... 918 768 532 443 555 131;... 257 85 634 660 880 190;... 886 729 15 295 558 154;... 921 448 471 951 753 29]; assert(isequal(coolers(COST),1239))

y = 1239

49   Pass
COST = [10 496 746 686 237 463;... 597 259 338 268 196 926;... 610 733 585 970 706 216;... 919 117 469 184 181 2;... 734 747 88 300 523 907;... 302 810 829 412 297 681]; assert(isequal(coolers(COST),1182))

y = 1182

50   Pass
COST = [515 394 842 779 399 396;... 523 8 49 728 671 399;... 103 546 317 651 441 752;... 997 510 784 665 133 523;... 359 247 973 939 440 491;... 626 46 587 536 548 89]; assert(isequal(coolers(COST),1435))

y = 1435

51   Pass
COST = [251 93 71 159 652 1;... 448 954 301 63 499 641;... 638 163 814 702 285 8;... 710 971 77 87 831 107;... 993 598 355 617 819 107;... 933 241 133 174 939 368]; assert(isequal(coolers(COST),771))

y = 771

52   Pass
COST = [240 788 66 813 71 954;... 347 270 611 815 242 209;... 250 844 702 90 732 117;... 388 741 112 732 41 647;... 422 827 96 904 425 109;... 641 183 598 453 541 984]; assert(isequal(coolers(COST),1343))

y = 1343

53   Pass
COST = [249 916 747 918 880 282;... 607 901 476 471 799 169;... 817 215 584 270 325 746;... 831 548 261 763 670 478;... 490 785 85 773 297 654;... 761 195 299 22 930 967]; assert(isequal(coolers(COST),1567))

y = 1567

54   Pass
COST = [314 77 818 283 736 557;... 77 154 767 639 157 274;... 792 827 375 593 435 133;... 366 301 190 326 833 700;... 586 384 647 989 360 486;... 184 651 4 124 77 183]; assert(isequal(coolers(COST),956))

y = 956

55   Pass
COST = [102 248 381 378 851 968;... 202 438 749 973 257 477;... 135 670 157 606 286 995;... 324 548 59 339 780 491;... 951 610 340 928 702 504;... 533 864 818 899 493 769]; assert(isequal(coolers(COST),1799))

y = 1799

56   Pass
COST = [389 799 340 268 52 543;... 454 221 273 177 628 809;... 133 858 171 432 30 794;... 759 905 665 476 137 502;... 566 293 536 786 695 277;... 649 726 830 131 516 120]; assert(isequal(coolers(COST),1234))

y = 1234

57   Pass
COST = [887 183 567 504 84 962;... 971 32 378 261 74 467;... 943 725 822 733 770 787;... 639 145 305 163 818 423;... 91 636 320 922 741 944;... 75 790 785 223 759 2]; assert(isequal(coolers(COST),1447))

y = 1447

58   Pass
COST = [982 666 329 847 415 7;... 571 685 928 902 662 767;... 347 793 757 596 784 22;... 558 349 289 69 248 394;... 300 251 607 219 555 253;... 160 346 767 870 230 205]; assert(isequal(coolers(COST),1039))

y = 1039

59   Pass
COST = [663 975 947 135 372 260;... 915 120 967 806 227 134;... 7 519 68 525 447 420;... 747 822 438 945 267 507;... 800 638 321 989 460 325;... 908 954 135 410 433 685]; assert(isequal(coolers(COST),1081))

y = 1081

60   Pass
COST = [444 502 305 970 394 701;... 436 556 767 690 459 110;... 794 631 268 718 209 7;... 816 98 40 560 758 598;... 753 246 297 534 547 660;... 790 616 557 876 358 581]; assert(isequal(coolers(COST),1667))

y = 1667

61   Pass
COST = [910 165 870 241 503 143;... 637 281 788 9 568 381;... 526 260 970 672 189 397;... 260 548 181 905 325 577;... 52 542 931 573 717 20;... 732 789 46 156 553 578]; assert(isequal(coolers(COST),1369))

y = 1369

62   Pass
COST = [933 303 817 55 540 946;... 107 460 451 638 938 377;... 733 49 807 425 661 68;... 971 386 791 906 395 182;... 609 362 283 418 259 576;... 720 288 69 155 848 186]; assert(isequal(coolers(COST),1495))

y = 1495

63   Pass
COST = [292 28 747 842 871 890;... 462 659 747 511 212 66;... 347 159 174 166 837 510;... 319 803 118 715 860 621;... 460 409 175 908 524 734;... 236 328 628 219 478 230]; assert(isequal(coolers(COST),1040))

y = 1040

64   Pass
COST = [22 327 315 114 208 74;... 139 138 160 701 785 595;... 770 385 153 180 527 862;... 970 563 137 804 572 449;... 387 634 710 514 423 653;... 994 542 465 549 722 304]; assert(isequal(coolers(COST),716))

y = 716

65   Pass
COST = [608 457 948 406 340 75;... 279 600 453 439 896 664;... 800 843 811 679 546 704;... 797 32 929 466 750 919;... 955 188 673 954 125 661;... 445 944 373 355 454 691]; assert(isequal(coolers(COST),2010))

y = 2010

66   Pass
COST = [854 26 473 324 731 29;... 468 57 679 802 774 128;... 459 143 115 300 901 134;... 807 172 237 776 139 129;... 825 626 290 553 795 936;... 191 30 173 555 190 274]; assert(isequal(coolers(COST),1199))

y = 1199

67   Pass
COST = [943 546 850 417 382 152;... 639 256 8 518 723 437;... 873 306 635 887 96 13;... 368 16 360 150 668 230;... 237 588 115 435 297 264;... 188 963 541 60 599 512]; assert(isequal(coolers(COST),627))

y = 627

68   Pass
COST = [216 475 261 618 402 95;... 347 826 590 145 15 376;... 748 304 480 717 75 546;... 414 822 199 402 592 112;... 56 566 240 463 447 905;... 391 55 781 708 927 634]; assert(isequal(coolers(COST),940))

y = 940

69   Pass
COST = [906 61 814 762 771 880;... 631 674 316 876 876 374;... 15 478 312 872 68 767;... 317 306 345 173 647 169;... 112 517 667 851 325 520;... 630 708 862 960 641 628]; assert(isequal(coolers(COST),1043))

y = 1043

70   Pass
COST = [714 628 766 404 544 135;... 307 193 319 751 411 541;... 264 777 253 488 901 858;... 917 865 201 385 57 199;... 616 334 70 62 444 156;... 94 136 552 214 538 62]; assert(isequal(coolers(COST),575))

y = 575

71   Pass
COST = [662 683 487 77 915 603;... 19 138 680 445 92 466;... 292 630 705 166 994 299;... 974 858 461 399 97 134;... 765 900 365 921 314 296;... 244 349 281 512 786 167]; assert(isequal(coolers(COST),1112))

y = 1112

72   Pass
COST = [318 40 863 414 595 658;... 110 617 277 415 310 685;... 833 670 532 984 902 474;... 972 38 523 58 94 142;... 219 4 568 397 320 951;... 707 143 334 792 887 883]; assert(isequal(coolers(COST),1040))

y = 1040

73   Pass
COST = [438 952 914 477 226 187;... 835 2 534 251 568 647;... 326 296 805 308 999 129;... 368 49 563 967 132 82;... 795 443 751 209 955 660;... 100 790 10 521 124 28]; assert(isequal(coolers(COST),914))

y = 914

74   Pass
COST = [986 693 226 415 41 625;... 540 603 797 499 583 296;... 374 776 997 950 565 75;... 707 592 282 954 356 294;... 948 377 711 733 881 235;... 383 851 665 385 625 346]; assert(isequal(coolers(COST),1955))

y = 1955

75   Pass
COST = [849 636 448 593 844 465;... 161 844 327 69 424 31;... 158 783 280 206 545 435;... 509 265 932 724 528 558;... 604 315 400 576 186 639;... 162 184 380 201 82 35]; assert(isequal(coolers(COST),1044))

y = 1044

76   Pass
COST = [710 855 367 351 91 968;... 170 385 350 193 258 434;... 594 400 631 920 428 785;... 609 326 665 289 578 526;... 773 556 993 551 900 332;... 57 296 945 920 219 432]; assert(isequal(coolers(COST),1623))

y = 1623

77   Pass
COST = [718 654 235 805 97 557;... 917 41 201 104 600 840;... 891 505 381 730 234 205;... 135 895 595 649 33 622;... 120 386 269 475 580 175;... 894 293 623 933 843 290]; assert(isequal(coolers(COST),1365))

y = 1365

78   Pass
COST = [19 283 206 904 234 347;... 702 245 435 541 247 298;... 953 287 143 818 171 405;... 750 964 376 709 236 303;... 757 231 794 44 276 758;... 543 538 813 146 952 360]; assert(isequal(coolers(COST),1417))

y = 1417

79   Pass
COST = [125 458 201 22 719 780;... 618 78 960 483 450 568;... 356 905 666 808 660 77;... 363 282 542 737 754 252;... 69 614 869 573 805 134;... 868 662 558 9 30 565]; assert(isequal(coolers(COST),953))

y = 953

80   Pass
COST = [541 43 122 494 863 421;... 69 528 592 856 685 488;... 989 257 360 725 635 461;... 252 409 720 200 142 516;... 316 948 524 158 80 272;... 301 920 261 371 877 232]; assert(isequal(coolers(COST),1198))

y = 1198

81   Pass
COST = [900 895 226 336 740 434;... 909 88 105 620 889 290;... 604 540 10 993 860 632;... 366 429 60 649 598 296;... 599 618 323 540 655 623;... 669 559 780 233 916 48]; assert(isequal(coolers(COST),2054))

y = 2054

82   Pass
COST = [995 67 543 281 171 63;... 207 928 781 599 372 407;... 608 88 522 37 40 464;... 348 333 932 64 710 203;... 718 527 148 323 642 870;... 28 247 417 99 175 598]; assert(isequal(coolers(COST),730))

y = 730

83   Pass
COST = [24 867 571 301 445 250;... 900 616 326 522 983 956;... 453 27 451 562 579 143;... 59 323 578 242 235 513;... 107 464 75 913 811 972;... 999 100 58 826 452 649]; assert(isequal(coolers(COST),902))

y = 902

84   Pass
COST = [615 424 874 119 114 462;... 470 274 301 99 491 864;... 578 445 401 891 600 263;... 912 628 518 34 91 824;... 377 535 62 840 979 329;... 229 386 232 508 654 942]; assert(isequal(coolers(COST),1065))

y = 1065

85   Pass
COST = [245 314 524 145 800 565;... 958 58 893 245 209 218;... 511 45 406 379 897 858;... 565 813 605 271 746 862;... 994 413 95 216 537 314;... 771 385 336 634 970 327]; assert(isequal(coolers(COST),1381))

y = 1381

86   Pass
COST = [841 334 286 610 505 816;... 493 367 657 384 8 910;... 52 795 232 31 920 778;... 779 39 622 858 411 758;... 427 727 76 604 733 406;... 280 873 967 848 152 702]; assert(isequal(coolers(COST),1140))

y = 1140

87   Pass
COST = [566 563 904 539 781 176;... 585 547 605 738 537 417;... 345 551 927 182 770 740;... 705 695 117 427 639 893;... 161 928 341 99 894 26;... 2 945 37 304 61 138]; assert(isequal(coolers(COST),1153))

y = 1153

88   Pass
COST = [425 619 192 805 191 892;... 765 7 715 860 504 674;... 525 741 178 567 51 686;... 755 992 987 755 57 696;... 170 129 17 520 336 800;... 673 361 40 586 631 661]; assert(isequal(coolers(COST),1579))

y = 1579

89   Pass
COST = [520 255 928 227 995 523;... 332 846 588 2 984 274;... 935 539 102 894 965 719;... 247 911 367 454 667 779;... 512 351 276 579 727 82;... 741 936 267 316 335 222]; assert(isequal(coolers(COST),1598))

y = 1598

90   Pass
COST = [204 470 675 379 889 587;... 625 379 552 618 563 969;... 726 341 52 563 195 582;... 835 64 308 831 222 100;... 19 762 966 958 706 167;... 203 403 932 76 597 103]; assert(isequal(coolers(COST),993))

y = 993

91   Pass
COST = [147 800 210 627 782 774;... 672 400 481 412 936 748;... 640 756 113 639 740 319;... 373 296 133 857 254 511;... 163 641 65 764 720 774;... 390 886 80 977 694 573]; assert(isequal(coolers(COST),1784))

y = 1784

92   Pass
COST = [954 463 111 359 365 588;... 172 130 200 135 400 778;... 908 550 163 999 927 658;... 753 970 37 514 496 529;... 287 443 273 388 610 826;... 628 591 231 250 5 963]; assert(isequal(coolers(COST),1501))

y = 1501

93   Pass
COST = [314 306 715 905 664 101;... 798 19 460 387 603 287;... 286 163 920 604 657 355;... 15 444 989 561 310 536;... 95 767 933 846 332 991;... 329 682 462 285 189 29]; assert(isequal(coolers(COST),1729))

y = 1729

94   Pass
COST = [710 876 77 818 359 455;... 906 865 377 174 364 30;... 866 356 150 677 268 638;... 120 632 35 876 338 60;... 956 865 783 758 87 170;... 441 21 328 230 452 685]; assert(isequal(coolers(COST),1098))

y = 1098

95   Pass
COST = [555 461 15 279 896 625;... 7 371 5 645 888 207;... 289 825 167 288 394 110;... 377 538 366 322 676 566;... 147 818 719 156 253 275;... 75 461 160 388 950 72]; assert(isequal(coolers(COST),1175))

y = 1175

96   Pass
COST = [159 896 447 617 948 551;... 50 608 812 304 334 161;... 681 15 145 90 390 118;... 782 345 975 522 151 399;... 808 534 834 826 334 832;... 266 628 341 764 554 186]; assert(isequal(coolers(COST),569))

y = 569

97   Pass
COST = [501 491 579 185 613 662;... 127 887 776 198 738 896;... 865 906 662 862 304 275;... 767 499 470 126 43 998;... 565 530 220 646 836 835;... 390 910 603 438 370 792]; assert(isequal(coolers(COST),1584))

y = 1584

98   Pass
COST = [657 988 206 794 242 185;... 544 789 495 682 210 88;... 387 853 32 651 273 309;... 823 486 828 238 776 231;... 596 874 265 478 332 910;... 782 334 678 937 604 937]; assert(isequal(coolers(COST),1504))

y = 1504

99   Pass
COST = [32 626 369 811 16 974;... 594 256 338 724 95 373;... 44 905 619 675 515 321;... 425 768 87 914 953 784;... 522 563 376 821 844 213;... 841 898 188 549 936 960]; assert(isequal(coolers(COST),1717))

y = 1717

100   Pass
COST = [931 594 600 844 914 151;... 366 98 227 771 577 947;... 345 560 714 510 288 651;... 693 44 725 707 267 983;... 717 758 345 792 891 194;... 801 660 33 331 367 829]; assert(isequal(coolers(COST),1626))

y = 1626

101   Pass
COST = [494 60 648 497 429 28;... 591 516 624 763 42 906;... 45 54 954 180 226 472;... 565 844 177 692 667 911;... 634 595 475 915 872 328;... 499 692 843 163 345 692]; assert(isequal(coolers(COST),526))

y = 526

102   Pass
COST = [18 334 151 424 616 681;... 513 633 839 529 102 394;... 332 416 727 276 670 392;... 337 577 109 828 348 207;... 954 960 162 793 670 725;... 751 616 298 274 296 820]; assert(isequal(coolers(COST),1421))

y = 1421

103   Pass
COST = [927 854 101 228 459 109;... 515 430 413 358 952 652;... 194 926 925 925 133 147;... 603 374 56 503 71 694;... 199 699 385 804 707 626;... 411 589 241 351 932 44]; assert(isequal(coolers(COST),1345))

y = 1345

104   Pass
COST = [798 582 93 769 788 680;... 987 602 334 283 125 10;... 437 253 652 650 158 129;... 345 655 504 923 415 764;... 49 61 531 331 688 842;... 226 941 380 814 658 747]; assert(isequal(coolers(COST),1350))

y = 1350

105   Pass
COST = [945 618 338 215 587 443;... 920 559 552 293 939 692;... 224 731 744 450 619 760;... 510 64 413 241 251 400;... 788 493 508 264 103 568;... 523 230 129 892 547 206]; assert(isequal(coolers(COST),1251))

y = 1251

106   Pass
COST = [944 708 393 379 767 434;... 513 657 243 634 337 103;... 277 779 282 32 626 237;... 230 581 905 921 327 972;... 953 504 703 470 312 699;... 690 879 854 520 647 660]; assert(isequal(coolers(COST),1565))

y = 1565

107   Pass
COST = [327 450 172 573 377 40;... 20 769 722 832 394 565;... 571 628 90 348 429 50;... 37 315 918 780 424 873;... 265 293 430 709 219 861;... 191 79 80 591 497 339]; assert(isequal(coolers(COST),1224))

y = 1224

108   Pass
COST = [975 347 346 214 761 636;... 955 234 903 936 580 803;... 989 756 13 970 622 670;... 158 226 133 376 490 472;... 3 449 389 985 221 945;... 249 260 841 123 145 592]; assert(isequal(coolers(COST),1311))

y = 1311

109   Pass
COST = [227 932 883 581 327 592;... 684 697 780 627 288 1;... 321 96 19 112 497 904;... 749 246 771 214 182 683;... 999 935 686 37 934 74;... 270 480 868 445 941 997]; assert(isequal(coolers(COST),804))

y = 804

110   Pass
COST = [315 176 835 189 254 788;... 810 588 997 578 287 438;... 462 155 973 629 126 551;... 588 446 746 365 529 987;... 478 538 200 637 821 690;... 553 462 37 892 300 971]; assert(isequal(coolers(COST),2037))

y = 2037

111   Pass
COST = [96 320 833 203 939 1;... 899 796 571 493 975 484;... 59 302 71 730 608 148;... 124 608 267 955 958 315;... 631 462 171 763 331 172;... 371 293 561 81 902 593]; assert(isequal(coolers(COST),1341))

y = 1341

112   Pass
COST = [658 16 262 188 656 56;... 349 974 894 744 782 820;... 54 735 973 719 863 107;... 48 753 995 189 786 7;... 56 34 347 434 434 276;... 72 118 293 46 348 943]; assert(isequal(coolers(COST),862))

y = 862

113   Pass
COST = [675 962 293 837 855 788;... 386 823 439 42 174 175;... 857 11 399 424 536 720;... 675 142 138 76 295 233;... 609 483 953 314 903 208;... 440 581 361 946 82 217]; assert(isequal(coolers(COST),1114))

y = 1114

114   Pass
COST = [977 461 237 907 842 269;... 382 4 832 993 684 981;... 636 465 438 391 172 313;... 47 825 508 827 238 572;... 233 872 186 955 435 612;... 875 302 152 894 26 902]; assert(isequal(coolers(COST),1700))

y = 1700

115   Pass
COST = [397 297 634 847 995 269;... 693 572 965 41 429 758;... 205 317 201 330 268 610;... 63 810 599 710 473 967;... 623 366 84 861 161 774;... 689 699 545 501 159 573]; assert(isequal(coolers(COST),1320))

y = 1320

116   Pass
COST = [451 355 996 87 199 597;... 288 581 84 520 657 323;... 753 299 469 553 699 831;... 95 714 94 686 460 123;... 107 361 726 300 158 252;... 735 719 913 602 422 938]; assert(isequal(coolers(COST),1069))

y = 1069

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!