Cody

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

Solution 2188677

Submitted on 2 Apr 2020 by Karl Ezra Pilario
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
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))

2   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))

3   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))

4   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))

5   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))

6   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))

7   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))

8   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))

9   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))

10   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))

11   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))

12   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))

13   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))

14   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))

15   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))