Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Finished notanix programming contest

  • Loading branch information...
commit 731d25320e143323b58ca5a6110c7299ee0fbb0a 1 parent 3354a3f
@wonjohnchoi authored
Showing with 730 additions and 0 deletions.
  1. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/#easyComputer.js#
  2. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt1.gif
  3. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt10.gif
  4. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt100.gif
  5. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt101.gif
  6. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt102.gif
  7. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt103.gif
  8. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt2.gif
  9. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt201.gif
  10. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt202.gif
  11. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt203.gif
  12. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt204.gif
  13. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt205.gif
  14. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt206.gif
  15. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt3.gif
  16. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt4.gif
  17. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt5.gif
  18. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt6.gif
  19. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt7.gif
  20. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt8.gif
  21. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/batt9.gif
  22. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/battleship.htm
  23. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/easyComputer.js
  24. 0  {coding-for-grub/2011-vertigo → 2011-vertigo-programming-contest}/battleship_student/myAlgorithm.js
  25. +132 −0 2012-nutanix-programming-contest/NutanixProgrammingContest/CodeJamInput/LaundryInput.txt
  26. +64 −0 2012-nutanix-programming-contest/NutanixProgrammingContest/CodeJamInput/LightsOnInput.txt
  27. +158 −0 2012-nutanix-programming-contest/NutanixProgrammingContest/CodeJamInput/MatrixMultiplicationInput.txt
  28. +22 −0 2012-nutanix-programming-contest/NutanixProgrammingContest/CodeJamInput/RevenueMaximizationInput.txt
  29. BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/Laundry$Machine.class
  30. BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/Laundry.class
  31. BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/LightsOn.class
  32. BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/MatrixMultiplication$Matrix.class
  33. BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/MatrixMultiplication.class
  34. BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/MatrixMultiplication2.class
  35. BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/RevenueMaximization.class
  36. +68 −0 2012-nutanix-programming-contest/NutanixProgrammingContest/src/Laundry.java
  37. +46 −0 2012-nutanix-programming-contest/NutanixProgrammingContest/src/LightsOn.java
  38. +102 −0 2012-nutanix-programming-contest/NutanixProgrammingContest/src/MatrixMultiplication.java
  39. +88 −0 2012-nutanix-programming-contest/NutanixProgrammingContest/src/MatrixMultiplication2.java
  40. +50 −0 2012-nutanix-programming-contest/NutanixProgrammingContest/src/RevenueMaximization.java
View
0  ...tigo/battleship_student/#easyComputer.js# → ...test/battleship_student/#easyComputer.js#
File renamed without changes
View
0  ...2011-vertigo/battleship_student/batt1.gif → ...ming-contest/battleship_student/batt1.gif
File renamed without changes
View
0  ...011-vertigo/battleship_student/batt10.gif → ...ing-contest/battleship_student/batt10.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt100.gif → ...ng-contest/battleship_student/batt100.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt101.gif → ...ng-contest/battleship_student/batt101.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt102.gif → ...ng-contest/battleship_student/batt102.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt103.gif → ...ng-contest/battleship_student/batt103.gif
File renamed without changes
View
0  ...2011-vertigo/battleship_student/batt2.gif → ...ming-contest/battleship_student/batt2.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt201.gif → ...ng-contest/battleship_student/batt201.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt202.gif → ...ng-contest/battleship_student/batt202.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt203.gif → ...ng-contest/battleship_student/batt203.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt204.gif → ...ng-contest/battleship_student/batt204.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt205.gif → ...ng-contest/battleship_student/batt205.gif
File renamed without changes
View
0  ...11-vertigo/battleship_student/batt206.gif → ...ng-contest/battleship_student/batt206.gif
File renamed without changes
View
0  ...2011-vertigo/battleship_student/batt3.gif → ...ming-contest/battleship_student/batt3.gif
File renamed without changes
View
0  ...2011-vertigo/battleship_student/batt4.gif → ...ming-contest/battleship_student/batt4.gif
File renamed without changes
View
0  ...2011-vertigo/battleship_student/batt5.gif → ...ming-contest/battleship_student/batt5.gif
File renamed without changes
View
0  ...2011-vertigo/battleship_student/batt6.gif → ...ming-contest/battleship_student/batt6.gif
File renamed without changes
View
0  ...2011-vertigo/battleship_student/batt7.gif → ...ming-contest/battleship_student/batt7.gif
File renamed without changes
View
0  ...2011-vertigo/battleship_student/batt8.gif → ...ming-contest/battleship_student/batt8.gif
File renamed without changes
View
0  ...2011-vertigo/battleship_student/batt9.gif → ...ming-contest/battleship_student/batt9.gif
File renamed without changes
View
0  ...vertigo/battleship_student/battleship.htm → ...contest/battleship_student/battleship.htm
File renamed without changes
View
0  ...ertigo/battleship_student/easyComputer.js → ...ontest/battleship_student/easyComputer.js
File renamed without changes
View
0  ...vertigo/battleship_student/myAlgorithm.js → ...contest/battleship_student/myAlgorithm.js
File renamed without changes
View
132 2012-nutanix-programming-contest/NutanixProgrammingContest/CodeJamInput/LaundryInput.txt
@@ -0,0 +1,132 @@
+131
+10 2 5 3 4 1
+1000 4 16 14 11 7 15 12 8 3
+1000000000 10 1000 900 800 700 600 500 400 300 200 100 701 802 503 604 405 306 107 208 1 1
+12345678 10 342 234 65 76 85 734 67 345 70 234 45 78 3 10 45 12 45 57 1 230
+1 1 2 1
+2 1 2 1
+982602387 7 190 219 222 325 524 565 867 111 143 154 276 481 523 854
+995192887 13 164 183 207 311 312 483 490 504 582 622 635 659 928 43 84 110 224 237 410 418 434 530 580 606 633 917
+994397113 49 147 150 179 194 197 210 220 231 314 357 385 392 443 465 500 515 526 536 568 601 608 625 627 630 636 645 661 666 669 686 689 707 729 757 780 787 807 811 832 840 850 877 879 898 914 942 979 996 998 14 18 49 66 70 85 104 117 201 247 276 285 340 366 404 426 438 450 483 519 529 548 551 556 564 574 593 602 606 624 628 653 680 712 738 746 767 776 801 811 827 856 860 880 899 932 972 991 997
+948599754 50 216 232 247 250 251 260 271 326 330 347 350 364 384 408 415 417 439 442 451 464 466 488 534 537 568 609 611 622 633 660 703 712 715 723 742 792 803 812 814 834 850 851 855 887 904 920 963 970 975 997 90 108 124 129 135 146 160 218 225 243 247 266 287 315 323 330 353 360 374 390 395 418 468 475 507 550 557 572 584 613 660 672 676 686 706 758 770 780 783 804 823 826 832 865 884 902 948 961 968 995
+911247207 4 504 791 826 998 335 659 701 919
+271 12 358 372 545 575 615 628 723 786 787 915 926 965 124 188 370 440 489 514 689 758 760 903 919 964
+129 49 259 276 283 322 358 378 386 387 393 395 396 408 419 447 454 466 470 476 477 480 497 511 516 522 583 643 652 670 683 687 707 713 717 768 778 785 812 818 836 861 920 921 927 929 942 948 993 995 1000 71 91 101 148 191 212 223 228 243 249 255 274 290 322 332 348 355 362 366 373 396 412 418 425 489 551 563 582 596 607 629 637 646 703 716 728 762 775 794 822 891 893 900 903 919 930 976 982 998
+911577933 50 234 270 277 312 317 326 377 381 382 394 428 443 452 472 479 498 502 515 519 530 538 545 548 560 581 589 602 611 650 661 694 710 721 732 734 747 756 779 788 802 828 829 849 888 893 915 925 967 970 983 5 56 69 105 113 128 192 204 207 220 257 274 284 305 313 336 341 356 372 391 402 417 424 438 464 474 498 508 548 573 612 629 646 662 665 681 692 717 727 743 771 782 804 852 863 886 898 941 948 976
+962291294 7 652 766 769 788 797 850 944 399 547 551 671 683 761 904
+975086694 15 361 399 497 514 603 604 625 693 765 792 824 847 884 898 928 20 87 199 223 357 378 401 479 608 652 728 756 807 849 909
+995128348 49 344 358 364 366 370 385 403 412 426 433 446 473 486 508 518 534 542 575 597 657 687 711 718 719 723 728 732 753 754 762 766 770 782 804 813 824 826 836 850 937 940 950 958 959 960 970 974 976 987 9 24 35 39 46 64 84 99 131 140 159 200 225 256 287 304 318 352 375 442 483 529 537 540 559 568 579 610 617 630 639 652 687 710 727 750 757 772 791 879 883 898 912 922 925 936 942 961 981
+982732398 50 323 330 340 354 374 378 386 389 407 437 474 485 486 487 522 543 569 579 589 615 623 645 648 681 696 697 705 711 728 764 770 772 782 799 823 854 861 864 865 870 880 886 914 928 945 947 954 973 977 992 9 22 39 59 95 112 141 145 169 204 243 263 273 285 321 348 382 398 413 440 453 476 482 519 536 546 568 576 597 640 647 652 664 695 737 771 783 794 796 805 822 830 874 889 910 917 926 947 953 971
+972705630 6 451 531 626 665 824 874 102 212 312 390 791 848
+972715254 13 541 571 578 579 601 605 607 616 647 821 858 860 917 185 220 285 316 359 402 407 424 496 677 725 801 883
+353 49 447 448 451 462 465 490 501 517 553 561 564 570 593 597 601 617 619 624 641 656 689 697 707 710 711 713 714 734 738 743 752 765 767 774 779 797 821 843 851 856 894 906 915 925 936 963 971 990 997 23 33 51 66 75 108 120 137 182 193 206 214 247 257 267 285 288 308 326 372 412 445 457 472 475 493 498 538 550 576 586 604 612 630 641 661 709 734 755 768 807 821 836 873 889 928 955 976 987
+988322016 50 410 415 427 450 463 472 476 485 496 497 501 515 538 539 549 562 564 568 573 611 621 639 680 686 695 696 698 720 731 746 797 799 805 818 822 823 836 851 855 858 870 907 914 915 919 941 946 978 990 996 14 35 50 80 105 118 129 139 151 183 198 215 248 251 264 281 284 314 322 366 383 408 450 457 469 486 510 533 546 563 617 640 662 692 699 701 735 769 794 803 816 854 873 888 895 927 937 971 988 995
+929527905 6 469 553 608 663 758 999 55 154 243 309 585 889
+924211786 15 604 639 689 700 707 710 733 801 829 831 845 877 878 889 960 96 224 303 316 326 365 452 570 612 645 678 749 856 870 942
+449 49 492 515 525 527 533 537 547 563 575 578 579 597 608 611 633 635 637 642 656 667 677 700 713 714 723 767 768 770 772 777 786 790 809 818 821 846 848 861 884 887 902 916 924 937 946 956 977 987 990 15 51 62 75 107 145 176 197 215 220 233 256 280 303 326 338 356 377 394 410 422 450 476 491 504 559 565 571 578 586 610 618 664 685 694 726 741 756 781 788 838 858 878 896 910 933 966 979 984
+844 50 526 527 533 540 569 577 581 585 597 616 620 636 639 645 650 660 664 680 700 704 709 711 714 724 734 735 757 758 759 774 837 843 844 851 853 857 864 865 870 880 890 909 914 935 960 971 976 979 989 990 28 33 45 78 109 123 151 175 189 221 231 261 267 274 291 303 309 326 365 385 402 414 427 440 451 457 484 487 493 513 588 606 621 638 649 689 701 710 733 746 784 822 837 859 898 914 926 934 968 974
+991134454 4 617 724 725 905 54 258 669 867
+984876517 11 561 565 646 682 692 778 882 907 915 933 961 10 160 272 345 382 529 672 739 768 807 896
+922757820 49 638 641 653 660 664 671 678 681 682 684 690 691 692 694 695 701 722 726 734 736 737 741 745 751 760 764 771 773 776 823 824 841 854 857 862 864 886 889 894 924 942 948 955 959 962 972 975 989 994 46 50 70 78 105 133 142 153 155 159 172 178 184 198 204 220 276 283 317 334 351 361 366 376 392 415 428 432 448 530 533 551 575 580 598 601 634 650 658 708 765 797 822 851 873 915 931 957 970
+953728218 50 558 562 572 589 601 608 638 658 669 671 677 679 692 695 701 702 705 718 732 747 749 750 755 759 777 781 782 804 813 837 860 875 876 878 879 882 890 893 895 901 905 906 914 920 931 940 964 970 995 996 41 57 76 103 134 142 183 226 251 278 288 300 348 361 370 374 380 400 428 449 465 471 498 503 533 544 565 588 613 669 697 726 734 737 754 759 773 779 793 807 849 853 864 877 897 908 933 959 992 995
+948878313 5 747 791 794 834 945 173 272 459 629 901
+961810811 15 772 781 797 824 830 849 863 868 876 891 906 913 917 920 942 129 181 199 236 343 401 418 455 540 570 641 760 781 792 816
+697 49 734 750 752 756 780 793 794 806 813 816 819 823 830 840 841 844 845 852 859 860 862 865 869 870 871 872 875 880 893 894 900 907 911 914 919 930 938 939 945 948 955 963 967 975 986 991 992 993 999 5 23 65 80 124 140 149 166 177 191 201 226 267 278 285 297 301 309 338 345 405 436 445 453 467 471 512 521 538 542 558 588 627 648 659 693 721 724 733 768 789 799 807 819 857 883 893 910 973
+994173284 50 680 685 687 690 712 716 719 725 748 749 750 759 764 787 788 793 794 804 808 813 814 815 817 820 825 827 832 839 841 857 862 867 874 885 890 892 901 903 919 923 927 939 941 966 972 977 986 987 990 1000 1 37 43 52 92 105 120 131 170 173 177 192 221 251 276 302 304 317 339 363 375 382 397 406 425 429 441 463 467 499 535 554 578 608 621 626 694 697 720 758 783 814 840 866 884 896 919 925 945 983
+962660853 7 803 847 914 935 955 957 978 95 206 320 441 782 866 951
+954958707 13 787 789 807 809 826 832 842 872 894 943 951 982 997 18 105 139 177 349 408 431 472 521 670 727 924 944
+980561357 49 777 778 782 784 785 787 789 790 794 805 813 829 841 843 844 847 849 854 855 857 858 862 864 867 869 872 877 879 887 893 894 901 905 920 922 936 938 941 952 969 976 978 981 982 986 987 991 995 999 6 55 93 103 106 155 175 180 188 204 224 242 267 316 337 346 354 363 372 382 394 402 406 427 479 507 513 537 583 607 624 642 648 686 702 722 734 743 757 779 829 843 847 876 890 893 911 946 987
+931768116 50 744 746 749 754 759 763 768 769 770 772 775 780 783 785 793 798 799 803 804 815 822 824 839 845 846 848 853 858 859 863 867 869 881 904 912 942 945 946 952 955 958 967 971 972 974 977 986 987 989 990 10 16 31 68 83 93 113 153 161 173 231 238 243 250 270 277 309 317 341 383 402 407 437 446 458 469 475 517 519 569 576 605 636 663 674 724 732 759 782 789 794 840 869 890 896 928 940 970 977 987
+914265102 8 857 888 921 924 956 967 986 990 277 339 405 480 514 595 778 969
+933300044 14 894 907 917 919 922 928 944 947 948 968 977 982 983 993 50 148 413 416 550 587 641 700 708 847 883 901 911 980
+930315632 49 855 859 861 863 866 867 876 879 881 882 884 885 886 890 892 894 896 905 906 907 908 910 912 913 914 915 916 923 936 943 945 951 952 957 959 962 966 968 970 971 973 975 979 982 983 990 993 994 1000 41 73 77 95 185 205 260 264 274 287 295 302 337 347 360 394 410 420 430 448 461 470 479 491 511 516 550 561 625 635 650 657 662 676 700 709 724 729 744 749 773 854 874 881 895 950 960 977 996
+990131421 50 902 904 911 912 915 916 917 919 920 921 922 925 926 927 928 929 930 932 935 942 943 944 945 947 950 952 954 956 958 959 961 962 964 969 971 972 973 975 981 982 984 985 986 989 990 991 993 995 997 1000 1 64 93 152 166 171 202 210 212 219 227 263 265 269 275 280 304 320 343 355 377 421 438 443 492 498 570 597 614 628 637 672 690 714 723 725 750 782 793 800 820 833 837 846 859 887 890 949 986 997
+967166075 7 477 834 816 835 945 598 876 386 408 804 222 944 1 59
+984590436 12 210 923 299 991 353 593 414 851 441 541 461 690 85 194 177 381 294 14 375 160 424 96 460 318
+940333067 49 218 622 230 963 233 539 267 459 393 397 433 299 504 574 535 810 546 979 566 745 618 969 630 985 643 912 695 707 709 615 715 870 749 973 798 956 847 630 877 902 889 677 926 487 961 888 979 932 867 34 390 53 302 73 172 150 214 279 64 335 157 409 53 444 32 458 285 491 48 546 472 559 326 575 236 631 22 662 93 669 157 704 697 757 444 810 138 847 276 862 57 907 179 946 312 978 761 41
+913442823 50 170 671 179 755 182 475 186 984 195 833 297 999 311 998 380 996 396 592 408 527 419 646 422 959 449 672 496 671 532 549 557 731 624 802 626 283 674 893 751 444 893 931 933 661 935 863 985 455 987 767 14 472 41 337 48 13 61 815 79 622 183 668 202 760 279 48 298 39 318 381 330 1 335 12 363 52 412 302 450 121 477 370 548 283 553 7 607 274 695 261 848 257 911 52 914 601 974 65 984 174
+900905961 8 354 1000 410 974 803 672 889 697 15 92 111 371 616 199 746 223
+524 13 434 585 486 622 608 224 715 687 838 968 981 989 955 35 187 120 386 326 39 473 68 650 703 968 648 431
+242 49 303 475 307 531 326 993 355 955 397 162 408 936 494 870 519 880 538 786 561 933 574 723 612 846 670 744 688 699 692 801 727 360 766 976 807 529 852 85 881 964 925 805 949 943 963 428 985 890 992 31 144 49 4 86 249 116 358 182 53 209 220 296 174 336 320 370 68 423 35 448 198 506 293 607 85 641 240 653 85 691 220 733 515 777 81 825 21 855 693 904 84 930 112 945 257 968 85 62
+948772096 50 445 932 454 939 455 588 466 756 477 963 527 1000 552 739 563 961 620 851 636 942 704 758 711 809 731 936 746 998 790 880 797 974 798 865 837 949 855 794 900 997 907 678 932 436 966 970 992 462 993 942 37 482 57 128 61 33 98 408 151 326 206 389 236 160 251 655 327 108 349 79 418 298 433 265 476 366 502 213 600 18 625 793 640 367 681 434 702 125 777 130 805 373 849 335 897 806 940 106 962 220
+974618583 5 751 931 807 962 826 402 81 767 553 53
+969529801 12 705 711 767 337 853 608 868 842 895 669 897 948 110 369 305 78 485 182 621 528 747 98 754 296
+939018706 49 550 856 570 214 626 818 647 749 665 591 673 878 683 990 688 865 700 393 706 528 708 794 714 774 718 308 741 570 748 984 846 997 883 820 884 621 930 736 934 527 936 918 945 280 950 896 956 822 968 75 207 107 29 166 133 248 448 267 204 288 12 323 777 342 13 407 197 421 48 452 125 461 186 469 32 525 63 537 377 646 49 691 112 718 77 777 390 801 28 807 499 823 9 843 349 929 108 108
+902771051 50 516 372 523 903 558 621 564 950 565 611 607 968 617 779 622 971 628 997 657 964 681 925 732 955 765 267 768 746 771 961 804 684 810 739 847 834 855 64 868 860 876 341 928 885 953 791 971 555 985 931 76 19 89 86 183 24 199 175 216 15 274 413 286 324 302 465 312 207 347 216 376 7 436 560 478 119 562 588 575 281 631 402 640 17 680 9 696 2 718 168 756 53 820 96 874 65 907 257 971 189
+353 6 898 705 908 444 927 784 496 303 560 168 788 156
+720 12 821 779 871 990 890 719 909 648 944 466 989 909 37 319 435 677 523 409 614 57 766 165 913 349
+915975547 49 815 449 839 715 840 947 845 941 846 986 851 581 858 472 875 939 876 690 878 981 879 389 890 670 904 829 910 421 916 922 921 893 922 1000 927 861 931 484 932 132 934 864 952 892 966 939 976 953 847 49 82 96 206 122 367 156 397 161 115 198 146 352 234 402 245 416 165 479 274 541 137 599 244 629 333 641 11 672 70 692 558 705 240 738 166 745 49 790 50 796 314 855 20 934 330 945 841 187
+905005249 50 714 402 716 730 720 205 722 869 738 582 761 919 784 673 810 834 816 272 869 972 871 770 895 977 899 947 902 960 908 811 914 1000 920 199 929 724 941 931 950 887 963 94 972 496 973 454 986 946 999 971 14 44 39 28 73 77 95 68 135 121 178 67 231 508 271 671 284 1 352 349 456 603 491 425 497 650 554 807 570 630 577 92 619 4 690 343 766 217 793 275 857 32 880 337 914 145 935 542 957 339
+976255910 49 204 923 214 976 245 752 251 761 311 821 401 878 487 881 491 750 578 476 605 773 658 835 707 729 760 954 768 985 856 983 929 683 950 955 957 379 973 998 974 698 985 692 987 956 988 926 995 766 879 90 368 101 165 136 23 148 2 210 148 303 586 396 141 401 406 492 44 520 237 576 8 629 97 686 838 697 198 786 312 863 318 887 269 912 51 943 989 950 374 969 473 975 594 981 500 994 377 96
+918546523 50 97 878 103 790 136 599 168 956 215 924 247 915 251 980 268 875 275 848 293 542 309 836 430 738 440 971 462 933 476 932 478 676 500 414 504 58 612 998 684 541 864 560 877 677 948 977 952 441 955 825 13 49 21 522 60 29 93 279 142 466 178 247 183 610 206 312 217 711 236 79 253 499 382 11 394 41 419 736 434 190 439 34 464 39 472 19 583 13 658 192 839 123 857 21 931 287 937 58 946 259
+914 49 369 999 404 529 416 528 466 825 490 847 499 801 509 682 535 991 545 943 556 803 588 957 619 857 725 825 761 585 767 622 791 224 818 687 819 968 831 989 848 955 853 914 873 523 940 390 997 972 733 9 270 68 85 135 424 204 53 244 256 258 250 305 136 342 523 354 168 393 53 435 71 506 461 626 616 664 187 674 386 716 39 748 68 751 703 768 648 786 431 805 88 842 16 916 340 977 621 39
+938724765 50 301 756 364 917 402 530 417 756 443 995 445 937 449 736 466 752 469 765 493 954 576 866 597 401 628 629 696 699 703 909 740 566 911 907 928 877 929 974 930 702 937 662 953 888 980 915 990 770 998 780 13 687 80 273 119 66 151 219 181 115 186 18 197 583 223 184 234 13 260 295 352 135 394 164 433 41 502 17 526 468 565 18 742 289 764 12 775 439 781 347 797 116 819 752 892 24 924 112 935 42
+946474298 49 603 622 627 940 667 615 679 255 680 920 683 768 688 572 689 839 690 986 695 843 707 799 741 944 757 702 768 943 802 960 818 935 830 341 846 904 867 669 894 818 900 279 920 971 922 856 994 982 668 19 223 82 252 127 583 147 113 232 300 258 404 277 26 281 19 296 440 319 646 332 279 380 352 404 390 465 205 598 534 634 205 671 98 708 429 740 402 803 62 820 8 870 701 896 84 991 622 5
+975626804 50 473 719 516 981 518 967 540 801 555 637 570 787 578 781 584 580 594 987 612 738 617 571 632 890 662 878 670 961 712 856 716 910 736 453 737 331 751 615 817 957 878 971 884 971 974 739 981 638 995 798 26 512 71 531 79 348 122 356 184 67 231 284 249 6 257 20 325 253 364 302 382 335 415 60 450 607 477 234 576 288 586 653 617 4 631 14 652 23 720 443 807 97 823 414 918 18 960 144 981 16
+919302426 49 770 911 773 990 776 600 797 921 801 792 815 297 827 778 837 835 840 953 842 938 857 970 860 880 879 605 880 515 881 796 889 949 903 943 908 644 951 841 966 712 980 711 984 559 991 527 992 597 904 40 79 122 103 135 494 170 417 193 690 223 65 265 156 361 138 387 131 412 70 433 423 444 45 477 121 504 64 517 35 532 404 559 658 637 331 687 30 704 8 738 479 747 47 950 211 964 4 94
+815 50 695 930 704 890 705 889 710 790 713 926 723 554 724 899 760 873 766 872 777 762 807 678 824 939 857 870 871 242 906 299 911 776 917 71 925 465 933 731 942 861 943 961 970 635 971 992 975 636 992 988 77 150 96 327 98 392 126 219 174 166 248 250 265 8 359 164 414 763 435 60 487 31 561 71 605 508 622 48 686 34 718 30 728 24 758 122 796 36 822 48 829 267 890 277 896 12 954 1 988 602
+970012128 49 121 249 816 210 514 564 336 874 978 900 592 174 228 618 973 311 245 995 929 214 491 950 760 957 768 251 871 232 784 630 853 393 469 247 135 928 543 757 909 792 233 244 772 290 631 855 830 670 178 38 119 54 50 30 90 17 75 35 46 113 104 29 19 25 104 111 81 104 35 39 11 3 102 100 69 65 69 84 96 81 41 55 98 3 45 119 87 112 20 88 56 115 108 64 59 36 78 92
+912437559 50 603 269 994 670 814 767 860 994 345 792 492 463 663 456 666 924 143 886 805 118 833 722 166 963 608 411 511 981 840 284 181 269 782 340 597 699 220 617 734 166 438 823 328 504 734 168 377 509 365 631 93 22 107 14 102 78 9 99 32 30 93 109 3 64 72 98 84 24 89 4 90 4 68 99 38 51 11 73 45 52 73 23 28 90 66 65 62 108 57 100 77 80 68 67 47 83 42 20 6 56
+966199382 49 871 858 744 726 889 841 913 507 749 693 782 691 844 617 755 823 895 798 773 512 865 465 928 488 785 459 647 945 827 700 682 651 548 659 860 969 510 848 934 460 947 729 499 527 482 796 637 727 783 58 333 12 368 383 108 312 423 86 214 303 162 101 173 211 439 262 381 379 30 155 299 390 29 350 310 226 361 232 58 229 302 403 357 109 246 90 298 376 66 161 32 389 281 85 222 427 372 316
+995142916 50 906 452 367 490 309 593 558 799 919 544 725 664 316 757 397 441 522 969 612 762 766 558 768 912 432 615 509 675 808 823 732 874 429 602 937 965 353 474 515 349 476 375 608 270 754 350 629 374 702 371 13 53 46 9 125 34 178 166 197 102 217 228 163 141 3 75 258 127 41 94 242 204 213 163 139 105 267 116 147 245 86 6 20 61 109 67 123 231 54 160 184 9 10 183 63 147 209 64 126 129
+984788095 49 938 673 675 928 738 926 698 774 901 927 795 716 807 815 757 963 840 731 813 766 806 901 975 769 616 958 759 721 675 981 634 567 578 923 942 876 923 846 996 875 803 566 999 671 808 597 645 799 891 519 463 123 66 176 60 411 166 293 554 471 208 526 189 47 447 428 267 479 153 77 249 362 207 221 159 48 101 392 254 326 220 44 520 36 498 101 373 151 107 103 278 405 498 440 120 111 509 42
+512 7 8 16 32 64 128 256 512 1 11 27 62 127 255 511
+9298195 7 8 16 32 64 128 256 512 2 10 26 61 127 255 511
+9602329 7 8 16 32 64 128 256 512 1 9 26 59 123 251 507
+9069074 7 8 16 32 64 128 256 512 1 9 25 61 125 253 509
+729 4 27 81 243 729 1 56 218 708
+9464660 4 27 81 243 729 1 58 220 706
+9606649 4 27 81 243 729 1 55 223 710
+9356738 4 27 81 243 729 2 79 241 727
+256 3 16 64 256 3 52 249
+9976390 3 16 64 256 4 55 247
+9183591 3 16 64 256 4 58 250
+9298195 3 16 64 256 3 57 249
+625 3 25 125 625 4 112 617
+9397029 3 25 125 625 1 101 607
+9799372 3 25 125 625 5 109 609
+9488244 3 25 125 625 2 109 615
+216 2 36 216 4 201
+9157925 2 36 216 6 188
+9330379 2 36 216 6 193
+9782531 2 36 216 3 184
+1000000000 1 2 1
+1000000000 1 1000 1
+1000000000 1 1000 999
+12345678 10 342 234 65 76 85 734 67 345 70 234 45 78 3 10 45 12 45 57 1 230
+1000000000 1 2 1
+1000000000 1 4 3
+1000000000 2 5 3 4 1
+1000000000 50 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1000000000 50 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 770 780 790 800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990 1000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 200 300 400 500 600 700 800 900 999
+1000000000 2 10 8 9 7
+999999997 48 2 3 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 7 2 2 9 2 2 2 2 2 3 3 3 2 2 2 3 4 5 2 2 2 2 2 2 2 2 2 2 19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1000000000 1 3 2
+1000000000 1 1000 999
+5 2 2 3 1 2
+1000000000 50 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999
+1000000000 2 2 215 1 46
+1000000000 3 4 3 2 3 2 1
+1000000000 2 2 2 1 1
+1000000000 9 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9
+1000000000 50 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
+1000000000 50 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 22 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1000000000 1 500 499
+3 2 5 3 4 1
+5 1 5 3
+1000000000 50 99 45 46 47 48 49 51 52 53 54 55 56 57 58 59 61 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 79 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96 97 98 98 44 45 46 47 48 49 51 52 53 54 55 56 57 58 59 61 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 79 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96 97
+1000000000 26 12 2 2 2 2 2 2 2 2 2 2 2 2 12 2 2 2 2 2 2 2 2 2 2 2 2 11 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1
+10 2 5 3 4 1
+1000000000 49 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1000000000 1 5 4
+8 2 4 8 2 6
+10 2 10 3 9 1
+5 2 4 3 2 1
+5 1 5 2
+2 1 20 10
+6 2 5 4 3 1
+10 1 20 10
+12 2 11 8 7 1
+6 1 6 1
+10 2 5 4 3 1
+1000000000 30 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
View
64 2012-nutanix-programming-contest/NutanixProgrammingContest/CodeJamInput/LightsOnInput.txt
@@ -0,0 +1,64 @@
+63
+0001111,0001111,1111111
+1111111,1111111,1111111
+01001
+0101,1010,0101,1010
+0
+1
+010101010101010101010,011101011101000110010,100100101010100110011,000000000000000000000,111111111111111111111,010010101010101001010,011010100101010010101
+000001111,111101111,000001111
+000001111,111101111,000011111
+01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010
+10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101
+00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000,00000000000000000000000000000000000000000000000000
+11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010
+11111111111111111111111111101111111111111111111111,10101010101010101010101010101011101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101111111010101010101010101010101010,11111111111111111111111111111111111111111111111110,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010,11111111111111111111111111111111111111111111111111,10101010101010101010101010101010101010101010101010
+1,1,0,1,0,0,1,1,0,1,0,0,0,0,1,1,0,0,1,1,0,0,0,1,0,1,0,1,1,1,0,0,0,0,1,0,0,1,1,1,0,1,1,1,1,0,0,0,1,1
+1,1,0,1,0,0,0,0,1,1,1,1,0,1,1,1,1,0,0,0,1,1,1,0,0,1,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0,1
+0,1,0,0,1,0,1,0,0,0,0,1,0,1,1,1,0,0,0,0,1,1,1,0,0,1,0,1,1,0,0,0,1,0,0,0,0,1,1,0,1,1,1,1,1,0,0,1,1,0
+10000000110111110101110101101010111111010000001010
+11110011000101010000111111101100001000100101000101
+11001110101001001001010001100111110001000000100101
+00001010011010110001001010011001000101111110101001,10000100000111110010101000010101101010000111001000,01011000101100010111110010100101100000011101000000,11110011000011010000110000000000001001111110101101,10010010101101111000111010011101110110100000111010,00101101000011110110110110110011101011111000110001,00101000111000110001001001101001011110011111100110,01001110100110000000111000101011111000000111100100,11001000110011101010011110110111010000010111001000,00010111011111111110011101101001000010011110001011,01010101101110000100111000010100011001111101101101,01011011010010100101010101111101010110011001011011,01100100111100001000100111101001110000011111111110,11010101101111011111000110111010111000110111011100,01100001110011111111110000111001111110111111010001,11011011001010101000101110010001000101001100110101,11110010111101100111000000001010101000011101011110,01001001111001111101111111100010111001011111000100,11000111101000011011100011110101001011001111011110,00000111000010011101010100011111110101111111000110,01100110101000000011110100101001010001111001101101,00001010000000101110100101110100101000000100110011,00011000111011001100111010101011010111110111010100,10100111100010000111010100100111100111101110110101,11010101101010110001110001101100001111011111000011,10010001110111110100000110010101110110000011110101,00101001100011110010111010110100110110010111000101,11100011111010111110011101100110100101000101010101,10001000000001010100110100011101111111100100001010,10111110001110011101100111001100011110111000101000,11001111000010000111000101101101101000100101000011,10111100100111001000001001101011000111011000100000,00011010000111100110000001101101001110110110000111,11100111110100111010000100101111001010101010001011,01100111100011001111101001001110000011000001100111,00110000000100101001001011010100101101101111000100,00010100101100111110100000001001000011001100111010,10111111100110111001101100011100011100010001110011,10101110001001110111011000100110100111101001000011,10010010101000101000011111111011010101111011000010,01110001000110011000100111111011011011011000011010,01010101110000110110000111001101000000011010011000,10111001011111110100010010110111101101011100111111,11111010111111100010100101000111100011100011111111,00101011011100000111110111001111111010111001001110,01100000111000110011100010001000110100111011010011,11111001011010001000100010100110011111001000000001,01110011000000111010000100110001110111101101011110,10011000100110011010000000111011010110011000010011,01101100000111010000111111011100000111101010101101
+01010001100001000110100101100110001000110010110110,10011100111011010011011110110011001011000000111110,11101010110100110011011010100101011110111100011010,11001111010000010101011011111011111110011011011011,01010001110001000100000111101011100100110110010101,10100011101000000011110110001111101100010100001010,10111010011100110010110100010111100101110000001000,11011011110001000011101000000001100001110110110100,11001001011101111001110111001000000101110000111110,01100000011011010101000011100100011001000111010101,00100000101111101111111001000011111111100001111000,01110100110101011110011000111111000010001111011110,01111110001111110000011010101001110000000110101101,10110010000000100101110011000000011110110110101011,10010110010010101000110011001100100101100100110111,10010110001010011000001000111001000011010111100000,01011101011000010101100010010111000110010010011000,11000000101111101001101011100101111111100111001100,11001100000011110001100001110111100010110101010001,11101110110011011010111101111101011110001000111010,10100001110100011111111010111010010010100110110111,00000001111010100000001111110000010111000000000000,01100011111110001111111011010000110011100110100011,11011001101111011110111110110000111011100101000101,11110011000001110001100110101111100111111111010011,00101111100011111010101001100110110101010011001100,11000011110010101111011011000101001011000000000111,00100010001010010100101001001101111111011110111011,00010010100111011101010110010100000011101110011101,00011011111111011100111000111110111010101000100110,10010011100001011110001010011111110111011010111011,01111001110101000010110011001111011111010001101101,11010100111101010100010001110101100110111001101111,10010001001010111010100111100101100110110011000111,10110001100111111010110100101010101101011100001100,10111110101000011001010011000100111001011110111000,00100111100001111001101100011011011101011011110011,10101110000011100110000011101010001010010011101111,10110101111001011111010001011000000010100000101110,01101100010110110001001000011110000010011001010010,11001001100001001111101111101000010110110110001110,00010001011011111100001110101100101100001011100010,01101000011011010111101010101001011111111110001010,10101010000110011001110100110000010111101011010010,11010011111111001010010101001000101100001111001100,00101111101000011111110001010010011100101001101010,00101111000000110101111100011101011111011011101101,01011001010000111000010111000010110010111011010011,01001101101010111110000011111001011101000101100011,11111000111001100110111000001110001000001100010001
+00110100011111001000001000100011000000001110011001,00111110100110110100111100010000101011011100111011,00101100000001011000111110010101011101101011110111,10001000111101111100010100001010000000011101110010,01110110000101101101000111001100001010110110000100,00011000001000010011111011111111100101101001010111,00011110001110101110101011110001000111111001101010,11001110000010010111000011001000100010010011010001,00001111001010110010010101111101001100001000011101,10001110000000111101111110101110100011110110101011,10010111000101111000101100100110101110010010101110,10011111100001011011110011110010011000110100001100,10110101011110000101010010110111110000101110110101,01001100000011111101110001100010110010111110000010,10110100000101101000111100100101110010010000110010,11000001000010110010110011111100001001100001011000,01001111100110100111111111001001001100011000010001,01110010001001110101011010110100010011011101011101,00010111000000000110110100011001001010110101101111,10011001011011101000011000011101000110110011001111,01011001010000110011111001111011110000100100011011,10001100010101101110111111111000101011000010100011,00010011101110100110110011111011111110000111011000,11111010001100011011010010101110001110011101100001,11011100011111100010101110010001101001000111001110,10010110000010100111110001000101010000010011000111,00100111110010110110011011010000011110000001110110,01111000110010101011110101100000101100101100111100,01100111101001000001010011000001111101101001101101,01001001001110010101111101100111001001100111100110,00101010011100100111010110111000010111110111101100,00011111001000001111100011000000001010101001000001,11111001000100100101110110010001100000110101011001,01101001111100110011101111001111001100011111100100,11000111100000110110100001001100000111001011001010,10110101110010011001001110100111100011100100111110,01001100001101101010001100011110010110010100011110,11000010001100101001111111001110011100100111101000,01110000111000111110111100101001110010000000001110,11110011001011111001101101110110001000101100010100,01000010101001011110101011110111011110100000101011,01101010100010101000010011111000110001111100110101,10001110010010010001100100111100100010001100101101,10111010101111111010001100111010000101010101010000,00011111001111010000000010000000001010101010111101,00000100110111011110100101010010010101100011110010,00001110010101000111111010010110100111111111011001,01010100101010011110100010101011100110101010111010,10010111001111100100110011010111100111010011101110,11101111010101100101001110011111001010110010101011
+10101001111001111001001100110101111001011101011011,11100100111100100110001000110101011101110011001010,11100101000011100101101011001110001011010011100110,00010000001100110010111000000000010110110111100111,00011111111000101000111000100000001110110010000100,01110101001001011010110011010000110110010110111010,00000110100100001100001100110000101110000011001010,00011100001010001001010000010110100110110001001000,11111101000010011110011011101101010100011110111000,00111010101110101100011110000000100001011111101111,10101000100101101011111000011000010100110001101101,01010000110100100111011001000010010010001111100111,11000110111001101001010110011100101110100000110010,01101001100101010100000000000100111001111110111101,10101101100111101110010111000100110010100001111101,10010100111111111011011010101111010001000011100001,11001111000110100111111100100010110011110001011110,00111111111010000110010010001111100101011100100110,11111001110010011011000001010110001111101100101010,11011101010110101000010011100011111001100111110010,10110001001100110101010101000001010010001111000000,00101000000110010010000110010000011111101110111010,01101001011011100110101001111101010110011111011101,11101010101100001000101110001010110010000000000101,10111011001000100000010010100111100001101001010010,10110101101010001010011101000011000010000100100001,11000110110000111011100101000011101110000010101001,11111101101011000110011110110101110000111010101010,01110011111100000011101101111011001010000100101110,00011000011111001101100111000100100100100001101111,00010100111110111101001011000110111100111000110010,11011101100001001000011010010110011101011001101001,10001001100100011101011010001100100000100111110001,11001110001000001100100011100011110011011111011101,11111111111000100011100010001011010101010111101011,10111101111101011001111000010101001111000111110010,10100111110110101011111000000111000001110001001000,11000000101001000011111010000011010010001101111110,01101001101011111001111100011011101011101001010110,10100100010101001110111101000111001001000101001010,00111101010100100111000010000101100011110100000010,11011101100111101110010110100000001111100111111000,10111110111111110001001100010001110001111000111110,11001001000001101000110011111110010100100100011111,01001100011110111110111101011001101011000011000111,00111110000011001101101101101101110101101100001111,01100111000010101110111111100010110100100100110001,01010001000011111110001001001010001000000001111010,01001011000000000000000100010111001000110111111011,01110111010001011010100011101010001000101000101011
+00101000011111101101001000110000011111010100000111,01110111011101011001100000011100111101000110001101,01001001101100011001110010010000001111101001001111,00000001101111001110110100011111111111000001101010,00100000111000011110010001010110111111101011011000,00100110011101010100010111001001111100000110001111,11110000011000111101101001010001111011011111101111,00111111011011001111101000111000111000100101001100,01111100011010110111110100011000111001101000011001,11000100000001110111101101001010110001011111010001,10101010000110010100011100010100100000000111111101,10110110011110101101100001110000011010111001111001,11101111001101010111101110100110110001111001000001,11000111011110010110000000000001100011110010011100,10110101101101101110011111110111001011111101001110,11001100001001010001110110101011011101110010011011,10000101000110001000100000010100000000100111110010,01011011101101101100110001100100001101111001101011,01001101100000001110000111101010100110000001011100,00001100111010001101011001111111011101011110100111,01000011101011110100011101100110010010000100011001,10100111110101001001010110001110100110111101000000,11100000011011000001111111111011111111101100000000,01010100000111000011000010011101000110110101011011,11101001010001000111010010100011111010011010110101,00101000001000111011011111110111001100100000110001,10001110100010001000011110010011011011001000000101,00011110110001111001010010000010111000011111010111,00000011011110001001010100001010000001100111111011,01001011101001010001010100000010101000010101100110,01111011011101111011111100001111000101101001110111,01010110101000101100011000101110011001101001010010,01111100111011110001011010010110000110101101010010,11110010111011010111110101101001010001010101001000,11101110100110110100001001111111011100100010001110,10010001100111000000000000001001000010000011111001,00000001001011111011000011111101001010110001110111,01101101010010101000101110011110100010110001011110,00010010110011111001001011101001010011100111001101,00110011001110010101110000010100110011101110111101,11010100001101001010001100010011110100010101001101,00111001101011010000100110010000111011011110010100,11011001101100011011100011010011111011101111100001,11001111011101011001010001010001101010011100011010,11111001101100011101110111011110101001010110011101,01101011101000110110110010101101111011111010001100,11111010101110010100010011010011111010001010011111,11111000100100010111001111100001111111110100101010,11101010000011100101001000010111101001011010111001,10100110011110000010100110000011000011010101000011
+10011111111011011101001001101010010001111110011001,10101110110110010110001001111001011111100111001010,01011011101111011100000110100001000101010101110000,00000001010100101000101010100101011010111101101101,11101110110100000101111100111110101010101100100100,01110100011100011110001000001001111001010100001100,10100100011000010000110010011010000000101001001111,10010011101000100101111110001110100001110010001111,00100000011110110111010010001000010010011100000011,00000100000001101000111111110100100100100000110010,00101111010111110101101110011101111101010000111111,00000100010011000010100101110011011001101110010110,11000011101010100111000101010111011111001010000001,00001011110011100010100000001001001101000101000001,01011010100111110101100000000010011101111001110100,00000000000010100111011000100000001011010011111101,01001001001011001111111000101010110010111010110011,10110110110011111011101001001101110101100101000000,10000110111100000111101111101000001010111001111101,01110010000010100001100011110100010011001000010101,01101010111101000010001011010001111101110110010011,11000110000111000010001101010001101110100111110101,10101001101111000100111000000001010110000001101111,11011111111111110011111100111001110101011010101000,11100101010001100101111010000001011001001001100010,10100000011001101111101101101100110010011110000011,10011001010011111010111010010101100000101100111011,00000100001010101100000001001110010000100001111010,01001011011111011010011100000100001000111000111110,10101001001011001001101001100001000100101000100100,00010101101100101100110110111001000011101001011010,00110111001011111000101111011110001010100101010001,01110010100000110011010101011001111110010011000010,11100011101111000100010000000100100101011000101111,00000010110111110101011000011001010011000000111010,11100100010110010101001001101000010010011100101001,10000011000000000100001101101110110100100111111100,10011001010010111110001110001001000010111110111101,10111011011100100001010110001110101101010000010000,10111010001010001110010010110111100100110011010001,00100000001111010011101011011011101101101100000001,10100110011100101011010010010111101110001110110011,11010010111000110000011010110010111111010111000010,01011110110010111101001111001101000001010110101011,01111101110100000011110011001011110000111101001000,11011100000111000001101011011111010011011000110111,11101011100111001111001100010101011110110100000101,00111101001011101100001000001010101001001110000110,11111110000101000010011111001100111010011101001001,01010110100001101000111011000110010011101101001100
+10100000101001000111100000011011011011101010010000,11011011000110011000000100000001010111110111110011,00111110100010100011010111010000011101101000010010,11110011011011010000010010101100010101000101000010,01100111100101000010011111111000010001111000110110,10101010001001111000100001100001001100001101000101,11101110101011011011100100101110100010110011110010,10010011101010110011111011111111100100110001011010,01011101000011011010000010100010110100000001101010,01001000010110011001101100011111000100101101100010,10101111000110111100010001010111100111011110100100,10110010110001100011000111110110101100011000110010,11010100011111000010000000110011010010011010111110,01001100001111011100110001110010011101000111001111,10010001110010001001100010000011001101000000000010,10000001001001010001011110110001001100010110011110,00111010111111000000111010111111100000011110111111,01011011100011001001111000111101011110001000100000,01010011100100010110101110111101100101011101110100,00011111100111110101000011101001000101010101011101,00100110100110111110011001110110100010000010011100,11101001100010110010100000111001111011110011000010,00000000110101101011111101111011011111100101011110,01010001110000111000111101011111011001011001011001,01000010101100010000010011101111001001001011010001,10010101111111100110110000011000001000111000011010,00111011101101101100111101111011010110000111001101,01010001111100011110111000011001110010111100101010,00100000111010110000111110100001001001110011001111,10000001000110101110000010001110000000101110001110,10010010010010000001011001010011000001000000000000,01011001101011011000110111011011110010000111110001,01010100011110111001100001100110011101101000111011,10010010011010111000011010110101100001010110101001,11101001100011011111011110101000110010110111110001,00111011101100000100001110101111000111000110111001,01010101111101100011010100010100001001010100000000,11100101000100110110111101100001101111001011001100,11110100000001010011001100111110001100100100010011,11110111001101000001000010111000111110110011111011,11101001111101110001101011101010110111010100010110,01001011001001110000101010111111011110000001110110,11001100011111101011011000101100011101111100010101,10101110001011100010101101111100110011110011011010,00111110001101001100001011101000011110010100011001,01111000000000011101001111001010101000000000001011,10001101111011011010010011101000001111000000101000,00110001010010000110100101110110101001100110010010,00010001101010000000001101111010011011000101101001,00010011101001110010011000010010110111011110011010
+00110101101010111001110111011110111001110011100010,00101111011110000101000011011111000111110011010100,01001111011101100101001100101101000111110001111101,11000001011011011100010001110011110110110011110000,00100111101010110001101010111111110101011011000000,11001110001010111110100010101100111000110011101010,00001010001000111010110011000100001100100010100001,01101001001001010111111000100110101001001101011000,11000011010101010000111101011000000001101111110100,11100111101101101100110001000001111100010000110100,11110100100111000101001100011111010001001011101010,11000101000110011101100011001100110101001010101010,10010111100011111101110011011110110001111110100010,10011101011100000011001110010111011111011111011000,00011111011001110010000110000000001000101000101100,00001100100111001010001100100100010100100011110011,00111000001001101000000101101010001101101111001101,00000001011110111001000110010000100100000111110111,01101001101000011111111110011101011100010011000011,10101011100001110111101011011101011110111111000100,01011100001011001110001110011011110000000011110001,01100000110101000100110000100011101101000010010000,00110010010001010100101001101011000001011011111001,01011001111011011110000110000100000000110011100011,01110110111110110001101110110011100111110101101101,01110011111000101011110011000010101000111100110110,01101011011110100100111110001101011100001100010010,00011101110111100111100110111001001111010001110001,10111000010000011101010101001110110010111111011111,11010101100101001100110010001110001110000010111011,10110010001110101001101010000111100101000101111000,11001101110101111001000010010010110011000010011110,01000000110011111001100010101001011010001000111000,01001101011001111011001000001001101001100100001001,11111011001010001010011110110101010010110110100000,11100101000001101100011011011010111101000100010101,11011101011001110101100100011100001111011111000110,00101100011011010100111000101011101011000101010001,01000101111000011001001011100010110100001001010110,11001011011100000110100101000111011011110000011000,11010001110001101110010100011010111100011111001110,10011011101000101100011101000101100001110010010000,01110000000011110101100010110000111111011000111100,11010111101100000010110111011110011010000111011010,01100111000100011101100010000110000110010001010100,00110010100000011011111000111110101010000001100001,00010111010110000100111100100010010001100101101110,00111110110000100011001010010110101010101101011011,00110011110010000101101111111001010110011011001110,01010101000010101101010100101100001010000001001011
+11110100111111111111111100100011101001010110001110,10100101100101111101100000010011001000010000101111,00010011011101000000100011000101000001101001001001,01001111101111111001011011001001001111101000111011,10110001001011011100010011101111100100010010101011,01001111110001100101011010001111110001110110000101,00010110100001101111000101010000001110101101011000,10011101001000011100110100010011001111110010010100,01100100010100111010111011111111001011010011000011,00011010100110101111000110010111110011111100110000,01000100011101101000111101101101001110101111001111,00110101100011010011000110000100111100010111000001,10101001100100001000101111101110110011001010010010,01010101110111001111000100100000101101010000100101,00101010011100110110111110011000000101001111110101,01111011011011010010101011110010101001100011110001,01101011011100111100001110000011111110011101111011,11000100111100011111100100110001101100111001100001,01100101011100101101111100001011101100101011111001,11011011001110011010001010110100111010101010011110,00010011110111001010000100100000011010101011101100,10001100101101010111111101110101101010100001100100,11100111010011100001111100100101111101110111100110,00111110010001000011111110111011010101001011111110,11000101010100000110100001110101001011110100010000,01000011010010000100001011111111101100000101101011,01010111001000011001100110000100101110011111110000,01000100000001000100010001110110000111111110010000,11011000100100111001010111111100001100000011000000,10110101000001000100100011011010111100000010110000,01111001010111000000100010110000111111010011110100,11101000100100001011100011011000110010000101101000,10010010100101011110001010000101111110000000001101,10100000001000110010110110110101110110011111010011,00001111010000101011101111011101001110001100100001,00111001110100110100111110101011010110011001100110,10011111101111010110000111100000001100011100000001,00011100110010000000010000101111110111100001011011,11110111100001000110110000111010001010101101001111,11011110000100110001010101110101010101100100010000,00101111010100001000001001000000010000111100100000,00011111111011111010111110110100100011110011000100,01110001100110010100000110010010001001000011010110,11011101001001010110110001000101000110010010100111,10000010011000001110010001001110110111010110111100,10110100111000100000101011100101010010100010100110,10101010010000100011110011010101011111110111101010,10110000000010111000100011011111110111011011000100,11011010101011100110000010011111000001010111011100,10100001000110110110010000101101111001101110110001
+01001010001110000001010000100110011110100010110100,10010011011101011110111010001000000101001111110011,00011011011011110111000111111000001101000111101110,01011100000000010100100001010011110000000000100110,11111100010101000000011010011000110000001011011010,01111011001010111111110000100000110011110111100011,00000101101100000100101010111001111101111001100110,10001110000011101110000011011010011100100011101000,00011101111000011011111000011011110001110100101000,11101110000111001111010001011101011010010010010101,01001010011001111001000100001110000100101001000100,10111110001101110010000110110101010101101000111010,00001110011001101010001000010110111000011011111010,11000100011011101000110001110011001011010110010011,00000110010000010110010010100010010000011110111000,00000111111001000000101001111101000011010110111101,11110101111101101011101100011010001001110001111111,01110110101011001000101110011000111101111010101001,10101100000001110101100001010101101011011011101111,10111001100011000100011110100011110010101000101111,01010111110101001110100000011001110000101110010101,01101000100011101101110011100110111011001001011111,00011000000111001110010000010100101001100101001100,10100100001011101100001011001000000111101100011111,01111011000000011001010000011101011110010010101001,10110110011001110011111000011010000111110111000100,01111100110011010111010101110110001101110010111100,00011000101001110110010111010010011101111001111100,10111101001111100101011010101101110001101000111101,00011110110101100111010011101111101010111101010011,01001010001000011110011101000100000101110010111000,01110000000000100101000101011111010010011001110100,01000011100010110000011000101101000101010001011001,00010011100101000010010010100110110111000100000001,00100000001101000101000000000010100100100110011011,11111111111010110111010100111000110001111010100101,00111110000011111100011100001011000110010011000111,01011011001011000000101101100110001100010110010110,11000011100001000101010111010011110101011110000010,11100010110001000001110010010100010001110100101101,01001000111110110101001000011000110111100001010100,00011011010011110001100110011010011101100101000101,01100110000001100111110001000010011000100101001110,01111101101101010011000111100000111001111100001001,11100011011011111101000100111000110111010110001011,10111110100111110010010110000101110010100111101110,01100100110101110011010111001101011001100111000001,10000110101111101100101110110000010001000111000000,01000000100000101101101111111110100100110111001101,01110110001000000001111101110110100111101100100101
+11111111111101001111111111111111111111111101111111,11111111111111011111111101110110111111101111110111,11110100111011111111011111111111111111111101110011,00101111111101111011011110111011111111111111010011,01011101110111111111101010111111111110111101111111,11111111111011011011111111111011111111101111111001,11111010011110110101111101111111111111111111111011,11100111011011111111111111111111110101110111111101,01101110111111111111110111010111111011111011111111,11111110100111111111011111111111111101011110111101,11111011111111011110101111111101111111111111110110,11110011111010111010101111101111111101101011011111,11111001111111111101110111011111110111111111111011,11111101111111011110111111111111111111111010101110,11101111110101111111011111111010111111100111111111,11011011111101111111111101111111011101111101110111,11111111111111010111111110100111111110101111111111,11111101110110111111111110111111111110111101011111,11111111001001111111111111111110111011111110111101,11111100111111111011111111011111110101101011111110,01111111111111010111111110111110111001111111111111,11011110011110110111111110111101011101101111111110,11110111011111111101111111011111011111111111000110,11111111111111111011111111110111111111111111111111,11111111011111111111111111011111111110011111111110,11110100011111111111111011110101111111111110111111,10110010101011111111111111111111111111111011011111,01101111111011111111110111100011111111111111111101,11111111111011111100111111111101111101111111111101,11111110111111011111110101111111101101111111101110,11111011111101111110111110110100010111111101110111,11111110001110111110101111110111111101111101011111,11111011111111111111111101011111001111110111111111,11111011111111111111111111111111111001111010111110,01111011111111111110111111110101011101011001111011,11111110111010010111011001111101111111111111101111,00111111111111111101111101101111111111011110111111,11111111111101111111111111110110111111111111110110,01111111111001110111101111011111101101101111111011,11111111111001111111111101011111111011101111110111,11111111101101111111111111110110111111100001010110,00111110110111111111101010101111100111111111101111,11001011111111111111101111110111110111110111000111,11111110101111111101111111111111110110111111111011,11111011111110101010011111111110111111111011101111,01111111011100110101111111111100110101101111111110,11111010111111011101101111111111111111111100001111,01111011101100101111011011111110111111111111110111,11111011111101111011100111111111111111111101110110,11111111111011101111111111001101001111111011111110
+11001000000101001000000100010000010000010010100100,00010110000010000000000010000000100001100001101100,00010000000100010010000001000000000000001000000000,00000001111000000000010101000000000000000000000010,00000000001100100010000010000100000011000000010000,01101100010010000000010000001000000000000101000000,01000000000010000000000000000010000100000000100000,00000000010000000000000000000011100001000000001000,00100000000000000011100000000000001010000000000000,00000000000000000010000000000100000000000001000001,11000100010000001000000000000101100000000000000000,00000000000000000100000000001000001000000010011100,00000000001000000000100010010010001000011000010000,10110100010000000000011000000001001010000000000000,00000000000000100000100000100001000000100000000000,00010100000000000000100000010000000100000011100000,01000000000010000000000000010100100000000000010010,00000000000000000000010000000110000000101000011010,11000100000000000100101000000000100000001110100001,00000000100100000000000000011000000101000100000000,01000001000000010010001010000010000000100000110000,10000001101010000000000000000001000000001010000000,10100001000000001000000000000000001000010000100000,00100000000100000001000000000010010101101000000110,00000000000000000110010100000000000000010100001010,00000100000000001000000000000000000001101000100000,10000000000000010001000001000000001001100000000000,00100000000000010010100000000000100000010100000001,00010100100000000000000101000000100000000000000000,01110011000001000000000000000000100000000011010000,00000000001011100000000100100011000100000000010000,00000010101100101000100100100000000000000000100100,00000000000100010000100000000000000100001000000011,01000000000100000000000001010000000000000000011000,00000000001000010000000000000010000001000000000000,00000101000000100100000010010000000001010100011010,00100001000000000101100100110010010000010000000000,00010000000000000100000010000010110000001000000100,10000000000000100000000100000000000010000000000010,00000000100101000010000000000000000000001100000000,10000100000000100001000010000001000010010000000000,00010101000000001000010000100000000000010000000000,00010000100000000110101000000000000001011110000000,00000100000000000000100100000110000000010000110010,01000001000011000000001101000000101000001000000001,00000000000110010001000000000000101000100000000000,01010000011101000010100000000000000000000000000000,00011001000000100010000100000010100010011000100000,00010001110000010001001000000000000000100001000000,00000110001000000000010011000000100010000000000000
+00000000000000000000000000000000001000000100000000,00000000000000000000100000000000000000000000000000,00000000000000000000000001000000000000000000010000,00000000100010000000000000000000000000000000000000,01010100000000000000000000100000000000000000000000,00000000000000001000000000100001000000010000000000,00010000000000000000000000000000000000100000000000,00000000000000000000000000000100000000000000000000,00000000000000100000000100000000000011000001000001,00010000000000000000000000000000010000000001000000,01000000000010000000100000000000000000000000000000,00000000000000000000001000000000000000000000000010,00000000000000000000000000000000000000000000000010,00010000101000001000000001000000000001000000000000,00000000000000000000000000000100000100001000000000,00000010000000000000000000000000000000000000000000,10000000000000000010000000000000000000000000000000,00000000000000000000000000000000000000000000100000,00000000000010000000000000000000000001010100000000,00000000000000100001001000001100000000000000000000,00000010000000001000000010001000000000000000000001,00000011000100010001000100000000010000000000000000,00000000000000000100000000000010000000000000000100,00000000100100000000000000000000000000000001000000,00000000000001000000000000100000000000000001000100,00000100010000000001000000000100000100000010000000,00000000000000010000000000000100000000000000000000,00000000000000000000100000010000000000001000010000,00000000000010000000000000000000010000100000000000,00000000000001000000000000000000000000000000010000,00001000000000000000000000000010000000000000000000,00000000000001000000000000001000000000000000000001,00000000000000000000001000000000010000000000000000,10000000000000001000010000000000000100000000000000,00000000000000000000000100000000000001000000000000,00000000000000000000000010001000000000000000000000,00000000000000000000100000000000000000001000000000,00100000000000000000000000000000000000000000000000,00000000000000000000000000001010000000000110000001,00000000000000000000000000000100000000000000000000,00000000000011000000000000000000000000001011000000,00000000000000000000000001000000000000000000000000,00001100000000000000000001100000010000000000000000,00000100000010000000001000000000000000000000000100,00000000000010000000000100000010000000000000000000,00000000001000000000001000000001000001000000010000,00001101000000000000000000001000010010000000000000,10010000100000000000110001000000000000000000001000,10000000000010000000000000000000000000000000000000,00000000000000000000000000000100000000000000000000
+11011111111111111111111111111111111111111111111111,11111111111111111111011110111111111111111111111111,11011111111110111111111111111110011111111111111111,11111111101111111111111111111111111111111111101111,11111111111111111111111111111111111111111111111111,11111111110011111111111111111111111111111111111111,11101111111111111101111111011111111111111011111111,11111111111111111111111111101111111011111111111111,11111111111111111111111111111111111110111111101111,11111110111111111111111111111111111111111111111111,11111111111111111111111111111111110011111111111111,11111110111111111111111111111111111111010111101111,11111111010111111111111111111111111111111111111011,11111111111111111111110111111111111111111111111111,11111001111111111111111111110111111111111111111101,11101111111111111111111111111111110111111111111101,11111111101101111001111111111111111111011111111111,11111111111011001111111111111111111111111111111111,11111111111111111111111111111111111111111111111111,11111111111111111111111011111111111111111111111111,11110111011011111111111111111110111111111111111111,11111111101111111101111111111011111111111111111111,11111111111111101111111111111111111111011111111111,11111111111111111111111110101111111011111111101101,11111011101111111111111111111110111111111111111111,11101111111111111111111111111101101111111111111111,11111111101110111111111111011111111111111111111111,11111111111101101110011111011111111111111111111011,11111101111111101111111111111111111111111111111111,11111111111111111111111101110111101111111111011011,11111111110111111111111111111111111111111111111111,11111111111111111111111111111111111111111111111111,11111111111111011011111111101111111111110111111101,11111111111111111111111111111111111111111111111111,11111101011111111111111111111111011111111111111111,11111111111101111111011111111111111111111111111111,11111111111101111111111111111111101111111111101111,01111111111111111111111111111011111111111111111111,11111111111011111111111110111111111111111111101111,11101111111111111111111011111111111111101101011111,11111111111111101111111110111111111111111111111101,11111111101111101111111111110101111111101111111111,11110111111111111111111110111111111111111111111110,11011111111111111111111111111111111111111111111111,11111111111111111111111111111111111111111111111111,11111111111101111101111111111111111111101111011111,11111111111101111101111111111111110111111101111101,11111111111111111101111111111111101111111111111111,11111111111111111111111111111111111111111111111111,10111111111111111111111111110111111111111111111011
+00,00
+10,00
+01,00
+11,00
+00,10
+10,10
+01,10
+11,10
+00,01
+10,01
+01,01
+11,01
+00,11
+10,11
+01,11
+11,11
+00,01
+01001
+00,00
+0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101,0101010101010101010101010101010101010101010101
+0101,1010,0101,1010
+01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010
+10101010101010101010101010101010101010101010101010,01010101010101010101010101010101010101010101010101,10101010101010101010101010101010101010101010101010,10101010101010101010101010101010101010101010101010,11011100001110110010101011101110011100001100010111,11011100001110110010101011101110011100001100010111,11011100001110110010101011101110011100001100010111,11011100001110110010101011101110011100001100010111,11011100001110110010101011101110011100001100010111,11011100001110110010101011101110011100001100010111,11011100001110110010101011101110011100001100010111,11011100001110110010101011101110011100001100010111,11011100001110110010101011101110011100001100010111
+1001111,0001110,1101111
+100,011,011
+101001010010111,001010101001010,001011101101010
+1111111111,1101111000,1100111001,1110011111,0101110011,0111010011
+010,101,010
+0101,1010,0101,1010,0101,1010
View
158 ...-programming-contest/NutanixProgrammingContest/CodeJamInput/MatrixMultiplicationInput.txt
@@ -0,0 +1,158 @@
+157
+3 7 3 3 7 3 3
+3 3 5 5 1 5 5
+3 3 5 5 2 5 4
+3 5 2 2 5 3 3
+50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+9 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10
+9 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 1
+1 1 1000
+1 1000 1000
+1 1000 1
+2 1000 1 1 1000
+10 1 2 2 2 3 2 4 2 5 2 1 1 2 2 3 3 4 4 5 5
+20 101 202 202 303 303 404 404 505 505 101 101 303 202 404 303 505 404 101 505 202 101 404 202 505 303 101 404 202 505 303 101 101 202 202 303 303 404 404 505 505
+23 101 202 202 303 303 404 404 505 505 101 101 303 202 404 303 505 404 101 505 202 101 404 202 505 303 101 404 202 505 303 101 101 202 202 303 303 404 404 505 505 1000 303 303 909 202 202
+2 1 1 1000 1000
+2 1 5 1 5
+8 1 4 1 5 1 6 5 1 5 2 5 3 4 2 6 3
+4 1 2 3 4 1 3 4 2
+32 507 158 759 759 158 461 759 767 438 767 438 438 507 767 461 507 507 461 461 158 759 507 767 759 438 759 158 767 438 461 461 759 759 767 158 158 507 507 759 158 767 767 767 759 767 507 759 767 767 507 158 438 158 767 158 461 507 759 759 461 759 438 759 767
+26 381 133 630 691 388 133 431 384 515 525 725 882 221 366 820 630 188 923 903 221 133 429 384 367 132 820 975 431 709 188 882 471 471 975 923 515 383 381 366 709 133 903 525 383 67 725 367 67 691 132 429 388
+39 211 857 96 418 41 41 131 292 303 418 503 348 348 903 292 76 96 794 131 96 903 303 292 775 812 406 406 195 903 67 406 895 76 440 775 41 41 430 775 41 895 406 292 131 418 440 418 812 819 503 440 96 195 775 41 903 812 819 903 292 131 406 430 812 67 131 406 903 440 48 48 211 348 292 794 348 857 131
+32 735 53 469 855 890 890 245 635 469 635 245 245 855 405 53 635 890 469 469 909 763 245 909 20 53 245 20 320 763 469 320 469 735 855 635 735 909 53 580 909 469 890 855 53 53 735 245 763 735 735 635 53 635 580 635 469 53 635 580 580 405 469 469 763
+29 362 21 269 914 269 21 914 789 701 269 269 362 709 53 21 269 709 269 362 709 269 621 269 269 789 709 914 529 789 914 621 529 529 789 993 21 529 993 529 993 21 789 789 529 709 362 993 789 53 701 529 993 21 709 993 529 789 269
+31 416 985 18 985 746 764 18 18 738 746 746 18 632 764 946 163 764 18 18 746 416 632 960 416 985 416 764 946 416 960 788 960 985 946 985 416 163 788 18 18 746 985 788 59 18 946 960 746 985 18 59 788 788 985 985 985 946 788 416 416 946 738
+28 513 231 763 546 632 763 632 928 422 763 143 143 763 608 799 422 546 763 928 632 939 546 546 939 939 939 939 928 928 608 608 799 143 231 799 143 231 939 231 231 143 231 763 632 763 939 231 763 608 143 608 608 939 513 231 799
+35 874 807 746 455 263 263 455 345 345 807 392 345 807 872 455 345 345 455 345 874 807 392 345 746 968 746 263 455 20 392 345 79 746 79 882 882 746 807 455 807 79 746 807 345 746 807 867 263 807 79 807 874 874 746 79 345 758 867 387 20 872 746 746 387 392 758 79 968 392 392
+16 928 281 604 632 892 841 841 632 892 892 841 604 892 841 841 892 841 841 604 604 928 632 632 892 632 928 632 928 281 841 604 604
+38 639 639 639 747 981 639 747 423 482 639 747 981 747 747 423 747 639 747 981 423 747 747 747 639 639 482 747 482 747 747 482 981 482 639 482 639 747 423 423 423 423 482 423 482 423 747 747 747 639 747 981 423 423 423 639 423 747 423 981 482 423 747 747 639 639 981 981 981 747 747 639 747 482 639 423 981
+19 438 91 375 174 91 91 91 640 640 375 886 438 640 783 91 621 561 640 438 640 375 91 783 375 438 886 174 561 91 375 561 91 640 438 621 561 375 438
+27 181 308 181 181 181 146 308 146 181 181 181 308 146 146 308 181 146 181 308 308 146 181 308 308 181 181 146 181 146 146 146 308 181 308 308 181 181 308 181 146 146 181 181 308 181 146 308 181 308 181 308 146 181 181
+42 734 311 654 654 453 377 311 734 734 304 377 734 377 453 311 734 304 304 734 453 734 654 304 734 311 377 453 377 654 377 453 654 304 311 311 304 304 654 377 304 453 453 311 654 654 311 304 453 377 734 654 654 311 377 377 377 654 311 377 377 377 377 654 311 377 304 453 304 654 654 734 654 304 311 377 453 654 453 453 453 734 377 453 734
+20 350 350 397 397 397 606 356 591 632 606 249 606 350 249 606 505 397 632 505 356 606 397 356 356 591 632 632 350 356 356 632 356 606 397 606 632 356 591 591 606
+40 691 705 39 691 835 203 203 691 39 705 691 691 705 203 691 16 203 39 203 39 203 835 705 835 203 835 16 705 705 16 835 39 203 16 705 203 705 691 16 705 705 705 16 691 691 16 705 705 203 705 691 835 691 203 39 203 691 203 705 203 705 691 705 203 835 39 16 705 16 705 691 16 835 691 203 691 39 705 16 16
+46 232 177 183 547 869 869 177 452 403 416 869 183 452 792 395 704 403 232 792 183 637 403 477 477 919 637 416 637 452 232 383 626 232 919 919 395 792 792 869 477 183 869 626 350 416 626 637 177 792 183 416 416 477 280 477 280 280 383 626 183 626 792 280 477 452 919 637 383 416 403 704 452 383 383 869 869 280 452 792 626 547 792 350 637 177 280 383 869 183 416 183 416
+25 977 977 977 838 838 838 488 977 838 977 838 488 838 977 488 977 977 977 488 977 977 977 977 838 838 838 977 838 488 838 838 488 488 977 977 488 977 838 977 488 838 838 977 977 977 838 838 977 838 488
+10 540 947 266 266 266 540 266 266 266 266 266 266 266 266 266 266 266 266 947 266
+46 435 435 435 435 147 435 147 435 253 26 26 435 253 435 253 26 943 26 26 943 26 147 147 26 435 435 435 253 253 253 435 147 435 147 26 253 435 435 253 147 943 943 435 943 26 147 26 943 435 26 435 435 943 435 435 253 943 435 943 435 253 147 26 943 147 253 26 26 253 26 943 943 943 253 943 26 435 253 147 147 147 943 943 435 253 253 435 943 147 26 26 943
+39 168 870 870 374 870 219 219 168 374 168 870 151 374 702 374 702 870 151 702 374 151 702 374 219 870 870 151 870 870 870 702 374 151 374 168 870 870 168 151 168 702 168 702 151 168 870 219 870 168 219 374 702 151 168 870 870 168 702 168 374 374 702 219 870 870 151 702 168 168 374 702 151 870 374 374 870 168 168
+24 99 807 703 99 703 855 855 202 703 703 202 703 855 752 807 703 99 807 807 202 703 855 855 99 202 807 752 855 752 855 202 202 202 202 807 703 703 703 202 202 807 703 703 807 807 807 855 752
+24 584 879 206 584 129 206 129 879 200 671 584 69 206 538 71 671 879 206 476 538 538 71 879 584 671 739 538 584 476 71 206 129 206 200 71 476 671 206 69 838 584 129 739 206 838 476 476 476
+41 840 483 612 531 218 218 90 840 200 620 292 528 516 90 483 516 612 292 620 556 612 556 304 200 556 528 531 612 90 620 46 840 483 200 200 516 556 556 840 271 830 612 292 516 218 620 90 292 516 417 417 840 556 304 200 840 271 90 528 483 620 304 46 612 620 218 304 46 840 830 556 200 840 304 516 556 304 90 528 46 304 304
+1 7 7
+43 114 389 18 18 151 151 501 18 59 59 389 151 151 114 18 501 59 151 255 59 654 111 18 501 384 501 389 255 528 59 59 199 199 114 18 528 199 114 151 199 151 501 701 199 528 528 389 701 59 111 114 114 114 501 111 151 199 59 59 151 151 528 111 111 501 59 501 151 151 654 18 384 111 384 111 59 501 389 59 18 114 111 528 389 501 18
+10 64 260 64 346 64 346 346 64 346 346 64 64 552 260 64 64 260 552 346 64
+37 623 317 594 20 251 317 20 44 726 405 20 44 251 20 623 726 259 594 623 726 726 594 251 20 517 317 317 113 43 405 594 20 43 517 517 43 259 623 113 113 317 623 405 405 405 517 113 517 594 259 251 44 20 259 517 251 44 251 317 517 726 726 44 251 405 317 517 113 20 43 113 251 317 594
+20 342 342 896 442 734 460 460 610 896 896 610 896 533 610 442 533 442 342 610 533 610 896 896 896 40 610 610 610 342 40 734 734 896 610 610 460 533 442 460 896
+12 170 83 817 170 170 83 170 170 170 817 170 817 817 817 83 170 817 817 817 817 817 170 817 817
+38 623 805 623 623 623 623 87 137 805 428 895 895 623 902 805 502 137 895 87 902 87 87 623 137 805 895 428 805 137 805 895 902 137 805 805 623 902 805 805 137 502 137 895 895 805 137 137 87 902 623 623 895 895 137 137 87 902 902 895 87 902 623 87 137 428 137 137 428 902 805 805 623 137 502 137 805
+26 700 842 153 764 764 881 551 896 700 700 881 712 551 842 896 201 419 317 700 881 764 896 881 153 153 764 896 896 842 551 842 764 201 551 201 201 712 201 842 700 896 842 764 700 896 419 896 153 201 896 317 712
+32 445 445 828 289 809 269 289 269 269 809 269 856 546 546 809 445 809 856 856 856 546 809 269 108 289 809 809 856 809 269 445 809 856 289 856 289 108 828 289 762 289 828 546 546 546 856 269 269 828 856 856 546 445 445 546 828 108 546 828 108 856 809 856 289
+19 56 50 56 50 625 398 50 56 398 748 625 625 56 398 50 147 647 50 147 398 647 625 50 625 625 398 398 647 625 647 56 625 748 147 147 56 398 56
+8 167 904 603 167 603 603 603 603 904 904 167 603 167 167 603 603
+28 472 894 568 472 472 663 894 992 568 992 472 568 568 472 630 630 992 663 992 827 827 321 992 992 433 894 663 663 992 568 663 472 321 123 827 433 992 472 472 992 558 827 894 415 433 992 415 558 663 663 123 568 558 558 472 433
+5 834 119 755 834 755 755 755 834 834 755
+21 689 689 427 689 846 846 689 215 299 92 427 846 92 299 846 92 62 427 689 846 92 92 846 427 689 689 92 92 92 62 2 62 62 92 2 2 299 2 92 299 215 92
+36 759 69 304 69 759 759 32 32 304 829 69 304 163 32 450 759 829 32 69 759 748 759 163 759 304 422 829 163 759 69 748 32 69 829 304 304 870 748 163 450 829 163 32 304 69 748 422 69 163 761 748 829 69 748 761 163 32 422 32 748 759 761 748 163 163 163 759 870 761 304 748 69
+35 850 867 131 850 735 867 850 64 867 850 36 867 131 70 850 735 64 131 867 258 64 561 258 131 867 131 735 258 258 867 372 36 372 561 64 64 867 258 561 867 561 561 131 850 867 36 867 372 70 70 561 561 867 867 735 36 36 735 36 735 258 64 372 372 70 372 850 36 561 867
+33 714 128 627 539 991 118 761 118 991 627 834 445 539 627 118 400 400 539 761 714 714 834 627 705 128 714 761 118 761 627 118 400 118 761 400 664 705 539 834 761 539 991 714 761 627 118 445 714 834 664 664 705 714 714 539 539 664 834 761 991 705 761 539 761 128 834
+14 119 152 152 119 152 961 119 147 119 903 811 906 152 152 147 119 152 811 961 152 903 152 152 147 906 903 147 119
+40 725 89 363 482 370 370 725 725 363 725 363 301 259 301 363 482 89 364 832 363 259 832 363 414 482 725 301 363 725 725 301 363 414 301 364 832 364 301 482 89 259 414 482 370 301 370 725 725 414 482 725 259 364 370 89 363 301 89 370 363 363 832 414 259 414 364 259 364 832 414 370 259 414 414 89 482 832 259 482 414
+2 380 380 380 978
+22 489 808 933 379 47 70 865 268 430 430 379 808 47 667 345 379 865 933 808 865 667 47 865 865 422 865 379 47 489 379 70 808 47 489 933 933 808 933 808 47 379 489 933 345
+47 598 520 290 188 983 276 520 785 188 698 598 951 894 319 439 762 319 32 276 983 698 54 260 301 439 783 520 54 894 290 32 785 260 41 32 41 951 969 104 785 783 894 41 698 988 439 290 260 301 54 276 260 762 104 698 32 698 439 54 520 54 988 290 894 785 598 894 276 785 598 785 290 894 260 41 598 319 785 785 698 894 188 598 319 188 894 260 598 598 894 32 894 54 32
+24 330 570 714 351 13 83 111 904 661 111 194 436 839 330 663 194 904 911 412 13 86 839 386 412 726 766 83 444 738 386 351 86 444 726 911 663 374 738 570 515 103 714 766 103 436 374 515 194
+14 980 416 32 232 311 555 416 887 404 759 3 759 398 980 759 46 887 311 759 404 616 600 46 398 600 3 555 32
+33 633 975 335 972 300 910 720 65 301 641 594 92 751 572 661 382 15 661 906 276 74 594 913 751 964 655 65 239 276 872 619 720 972 913 92 633 19 301 568 335 913 15 75 964 944 537 655 913 382 906 503 75 416 503 572 74 872 619 910 19 537 568 975 944 641 416
+7 344 240 180 344 282 670 849 282 563 180 240 849 281 563
+37 50 294 160 484 849 375 460 109 591 707 727 288 926 268 404 608 253 727 608 128 253 253 34 591 268 958 707 122 540 544 960 856 375 460 109 253 932 404 56 638 856 704 122 50 288 540 544 926 665 932 967 53 638 513 128 579 53 34 958 520 294 160 227 56 484 744 704 227 520 967 579 960 744 665
+3 152 466 466 906 906 152
+22 169 407 375 215 549 731 42 9 32 98 861 169 94 861 693 876 215 861 855 19 407 42 98 903 903 693 46 172 172 549 731 149 19 32 815 94 9 46 149 855 861 815 876 375
+19 625 151 768 687 357 386 534 302 900 357 393 625 853 938 938 900 532 442 442 393 302 768 70 235 386 64 235 194 151 534 194 532 332 853 687 332 64 70
+14 206 613 897 198 476 37 198 268 356 208 613 152 534 658 208 450 37 206 268 534 92 356 450 476 658 92 152 897
+15 158 522 671 493 723 588 170 367 367 723 766 148 485 766 588 158 655 590 723 170 590 723 493 923 522 671 148 655 923 485
+3 1000 1 1 999 1 1
+3 1 1000 1000 2 1000 1000
+2 1000 1000 999 999
+17 119 152 152 119 152 961 119 147 119 903 811 906 152 152 147 119 152 811 961 152 903 152 152 147 906 903 147 119 1 1000 1000 2 1000 1000
+22 442 675 675 704 391 46 420 644 903 18 265 100 820 879 343 820 213 56 564 653 18 893 874 564 653 213 644 569 56 391 704 131 569 903 46 265 879 442 893 874 131 343 100 420
+17 447 385 386 810 893 735 520 609 810 386 302 520 688 723 735 651 385 794 723 801 584 447 801 302 804 688 651 804 794 465 465 893 609 584
+3 477 477 264 381 381 264
+21 644 231 709 470 470 619 796 74 810 920 400 644 790 156 399 543 414 790 528 595 74 925 543 796 925 482 694 709 595 810 920 694 156 400 263 528 619 414 482 399 231 263
+9 222 970 272 251 633 275 251 308 275 407 308 272 304 222 407 304 970 633
+14 833 540 601 179 252 833 179 992 540 213 568 422 466 568 174 252 748 887 213 748 422 591 591 466 510 601 887 510
+5 213 574 196 196 574 311 490 912 311 490
+26 508 768 455 590 646 708 816 576 980 764 764 159 576 284 152 401 157 595 465 157 376 508 590 648 686 424 768 410 648 980 424 905 689 455 410 816 595 686 708 465 905 972 373 265 265 646 972 152 284 373 159 689
+46 485 859 428 520 322 509 96 322 587 3 402 915 625 900 242 275 82 987 510 242 54 402 987 33 130 485 410 280 230 54 280 521 147 35 470 410 521 405 34 631 629 147 695 470 35 802 336 428 798 917 275 496 915 666 496 230 520 695 910 629 405 625 509 130 33 587 73 96 917 900 666 295 153 73 900 82 802 255 631 798 255 19 900 336 19 34 192 153 3 910 295 192
+11 995 327 492 601 76 995 383 386 410 300 386 61 508 508 327 492 61 410 687 76 601 383
+22 91 91 91 49 49 91 91 91 91 49 49 49 91 49 49 49 91 91 91 91 49 91 91 49 91 49 49 91 91 91 91 91 91 91 49 49 91 49 91 49 49 49 91 49
+22 275 275 793 793 920 275 793 275 920 793 793 920 275 275 793 275 920 793 275 793 793 275 920 793 920 275 920 920 920 920 275 793 275 920 920 920 275 920 793 275 793 275 275 920
+23 187 715 653 653 653 715 715 715 653 187 715 653 187 715 187 653 187 187 715 715 715 715 715 187 715 715 715 715 653 715 653 715 653 187 715 715 187 187 187 653 187 715 653 187 187 715
+40 812 234 234 234 234 812 234 234 812 812 234 812 234 812 234 812 812 812 812 234 234 812 234 234 812 234 234 234 812 812 812 812 812 234 812 812 812 812 812 234 812 812 812 234 234 812 234 234 812 234 234 812 812 234 234 812 812 812 234 234 812 812 812 812 234 812 812 812 234 234 812 234 234 234 234 234 812 812 234 812
+31 257 257 392 357 357 746 392 746 392 257 257 257 357 257 392 257 257 392 257 257 392 257 183 392 357 357 392 746 392 392 257 746 183 183 357 183 392 183 257 257 746 357 746 357 392 257 257 392 183 746 746 746 357 357 257 257 257 257 392 257 392 357
+15 111 333 222 111 333 222 111 444 444 666 777 999 555 111 111 555 777 555 666 777 666 555 111 444 444 111 333 999 999 333
+5 50 100 100 150 150 100 50 150 50 50
+4 1000 1 100 1 10 100 10 1000
+5 1 80 1000 1 1 1000 1000 80 80 80
+50 10 1 1 10 2 2 2 2 2 2 2 3 2 3 2 3 4 3 4 3 4 3 4 4 4 4 5 4 5 4 5 4 5 6 5 6 5 6 2 6 2 6 2 6 2 3 2 3 2 3 4 3 4 3 4 3 4 2 4 2 4 2 4 2 3 2 3 2 3 2 3 2 3 1 3 1 3 1 2 7 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10
+49 47 17 49 43 43 29 41 47 17 49 29 41 47 17 49 43 43 29 41 47 17 49 29 41 47 17 49 43 43 29 41 47 17 49 29 41 47 17 49 43 43 29 41 47 17 49 29 41 47 17 49 43 43 29 41 47 17 49 29 41 47 17 49 43 43 29 41 47 17 49 29 41 47 17 49 43 43 29 41 47 17 49 29 41 47 17 49 43 43 29 41 47 17 49 29 41 29 17
+50 20 21 21 20 20 22 22 20 21 22 22 21 20 23 23 20 21 23 23 21 22 23 23 22 20 24 24 20 21 24 24 21 22 24 24 22 23 24 24 23 20 25 25 20 21 25 25 21 22 25 25 22 2 2 3 5 25 23 24 25 25 24 20 26 26 20 21 26 26 21 22 26 26 22 23 26 26 23 24 26 26 24 25 26 26 25 20 27 27 20 21 27 27 21 22 27 27 22 23 27
+48 5 3 3 8 8 4 4 6 6 7 7 8 8 9 9 8 8 5 5 3 3 2 2 5 5 3 3 8 8 4 4 6 6 7 7 8 8 9 9 8 8 5 5 3 3 2 2 5 5 3 3 8 8 4 4 6 6 7 7 8 8 9 9 8 8 5 5 3 3 2 2 5 5 3 3 8 8 4 4 6 6 7 7 8 8 9 9 8 8 5 5 3 3 2 2 5
+45 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 1 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+50 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 25 1 3 2 4 3 5 4 6 5 7 6 8 7 9 8 10 9 11 10 12 11 13 12 14 13 15 14 16 15 17 16 18 17 19 18 20 19 21 20 22 21 23 22 24 23 25 24 25 25 1
+50 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2
+1 5 5
+6 5 3 3 7 7 5 6 4 4 8 8 6
+50 8 1 1 5 8 6 7 5 1 6 6 4 8 4 7 4 8 6 7 5 6 2 3 8 4 8 6 4 2 2 2 4 6 2 5 3 1 4 4 8 2 1 6 8 3 3 4 6 4 7 2 2 2 4 7 5 7 2 5 5 6 4 4 4 4 2 2 3 7 2 4 7 1 3 4 5 2 5 4 6 8 4 5 3 7 7 1 7 1 7 2 1 2 2 3 8 2 2 6 3
+1 2 3
+50 1 2 2 3 2 3 2 4 2 5 2 6 2 7 2 1 2 2 2 3 2 4 2 5 3 6 3 7 3 2 3 3 3 4 3 5 3 6 3 7 3 2 3 3 4 4 4 5 4 6 4 7 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 2 5 3 5 4 5 5 5 6 5 7 5 3 5 2 6 5 6 6 6 7 6 2 7 3 7 4 7 5 7 6 7 7
+4 1000 2 2 1000 5 4 4 5
+50 990 999 997 998 996 997 995 996 994 995 993 994 992 993 991 992 998 991 899 990 898 899 897 898 896 897 895 896 894 895 893 894 892 893 891 892 890 891 799 890 798 799 797 798 796 797 795 796 794 795 793 794 792 793 791 792 790 791 699 790 698 699 697 698 696 697 695 696 694 695 693 694 692 693 691 692 690 691 599 690 598 599 597 598 596 597 595 596 594 595 593 594 592 591 591 592 590 593 999 590
+3 1 3 3 1 5 5
+50 5 6 4 5 3 4 3 97 3 98 3 99 3 910 3 911 3 912 3 913 3 914 3 915 3 916 3 917 3 918 3 919 3 920 3 921 3 922 3 923 3 924 3 925 3 926 3 927 3 928 8 3 7 8 6 7 97 3 98 3 99 3 910 3 911 3 912 3 913 3 914 3 915 3 916 3 917 3 918 3 919 3 920 3 921 3 922 3 923 3 924 3 925 3 926 3 927 3 928 3
+5 3 5 5 7 3 5 5 3 7 7
+1 1 1
+4 1 2 2 1 3 4 4 3
+50 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1
+50 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 2 3 3 2 3 5 3 6
+40 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1
+1 2 1
+48 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1
+3 1 5 3 1 6 3
+50 1 1 2 4 3 15 1 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 5 1 1 1 1 1 2 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 7 1 8 1 5 1 1 1 4 1
+6 1 1000 1000 1000 1 1000 1000 1 1 1 1000 1
+50 1000 1 1 1000 1 2 2 3 3 2 2 4 4 2 2 5 5 2 2 6 6 2 2 7 7 2 2 8 8 2 2 9 9 2 2 10 10 2 2 11 11 2 2 12 12 2 2 13 13 2 2 14 14 2 2 15 15 2 2 16 16 2 2 17 17 2 2 18 18 2 2 19 19 2 2 20 20 2 2 21 21 2 2 22 22 2 2 23 23 2 2 24 24 2 2 25 25 2 2 2
+41 4 5 4 5 4 5 4 5 4 5 4 5 4 5 4 5 4 5 4 5 5 1000 5 1000 5 1000 5 1000 5 1000 5 1000 5 1000 5 1000 5 1000 5 1000 1000 4 1000 4 1000 4 1000 4 1000 4 1000 4 1000 4 1000 4 1000 4 1000 4 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 2 7 4 2
+48 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 1 1 3 2 4 3 5 4 6 5 7 6 8 7 1 8 2 1 4 2 5 3 6 4 7 5 8 6 1 7 2 8 3 1 4 2 5 3 6 4 7 5 8 6 1 7 2 8 3 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8
+50 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 5 3 3 5 7 3 3 5 7 3 3 7 7 3 3 7
+2 2 3 1 2
+2 1 1 2 1
+4 1 2 2 1 3 5 5 3
+4 7 3 7 3 7 3 3 7
+1 1 5
+50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2
+49 1 1 1 2 1 3 1 4 1 5 1 6 1 7 2 1 2 2 2 3 2 4 2 5 2 6 2 7 3 1 3 2 3 3 3 4 3 5 3 6 3 7 4 1 4 2 4 3 4 4 4 5 4 6 4 7 5 1 5 2 5 3 5 4 5 5 5 6 5 7 6 1 6 2 6 3 6 4 6 5 6 6 6 7 7 1 7 2 7 3 7 4 7 5 7 6 7 7
+3 1 2 3 4 4 3
+2 2 1 1 3
+1 2 2
+50 1 2 2 1 1 3 3 1 1 4 4 1 1 5 5 1 1 6 6 1 1 7 7 1 1 8 8 1 1 9 9 1 1 10 10 1 1 11 11 1 1 12 12 1 1 13 13 1 1 14 14 1 1 15 15 1 1 16 16 1 1 17 17 1 1 18 18 1 1 19 19 1 1 20 20 1 1 21 21 1 1 22 22 1 1 23 23 1 1 24 24 1 1 25 25 1 1 26 26 1
+2 2 3 2 3
+2 3 1 5 3
+1 1 2
+2 1 2 1 3
+10 990 991 990 992 991 992 991 993 992 993 992 994 993 994 993 990 994 990 994 991
+2 2 1 1 2
+2 3 4 3 4
+4 2 1 1 2 2 5 5 2
+2 7 3 7 3
+50 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000
+5 1 1 1 1 1 1 1 1 2 2
+6 2 3 2 3 2 3 3 2 3 2 3 2
+2 1 1 1 1
+50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 3
+2 2 5 2 5
+3 1 2 2 1 2 1
+49 1 1 2 1 3 1 4 1 5 1 6 1 7 1 1 2 2 2 3 2 4 2 5 2 6 2 7 2 1 3 2 3 3 3 4 3 5 3 6 3 7 3 1 4 2 4 3 4 4 4 5 4 6 4 7 4 1 5 2 5 3 5 4 5 5 5 6 5 7 5 1 6 2 6 3 6 4 6 5 6 6 6 7 6 1 7 2 7 3 7 4 7 5 7 6 7 7 7
+3 3 5 3 5 5 3
+2 1 3 2 1
View
22 ...x-programming-contest/NutanixProgrammingContest/CodeJamInput/RevenueMaximizationInput.txt
@@ -0,0 +1,22 @@
+21
+9 9 1 5 5 5 5 4 8 80
+3 17 50 2
+50 3 4 5 0 0 0 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 1 90 6
+16 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1
+1 1000
+50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
+36 1 1 1 1 1 1 1 1 1 1 9 19 1 1 1 1 1 1 1 1 1 1 46 47 48 1000 1 1 1 1 1 1 1 1 1 1
+37 1 1 1 1 1 1 1 1 1 1 6 9 18 1 1 1 1 1 1 1 1 1 1 46 47 48 1000 1 1 1 1 1 1 1 1 1 1
+37 1 1 1 1 1 1 1 1 1 1 7 9 18 1 1 1 1 1 1 1 1 1 1 46 47 48 1000 1 1 1 1 1 1 1 1 1 1
+8 130 110 90 17 6 5 4 3
+9 130 110 90 13 6 5 4 3 0
+8 130 110 90 4 6 5 4 3
+6 18 0 20 0 1 0
+2 0 0
+20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000
+20 19 99 34 78 67 75 77 36 23 3 3 9 66 34 34 34 34 34 34 66
+2 111 22
+39 130 110 90 13 6 5 4 3 0 130 110 90 15 15 15 13 6 5 4 3 0 130 110 90 13 6 5 4 3 0 130 110 90 13 6 5 4 3 0
+9 130 110 90 13 6 5 4 3 0
+3 1 1 1
+50 1 1 3 3 3 4 4 5 6 1000 1 1 3 3 3 4 4 5 6 1000 1 1 3 3 3 4 4 5 6 1000 1 1 3 3 3 4 4 5 6 1000 1 1 3 3 3 4 4 5 6 1000
View
BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/Laundry$Machine.class
Binary file not shown
View
BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/Laundry.class
Binary file not shown
View
BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/LightsOn.class
Binary file not shown
View
BIN  ...tanix-programming-contest/NutanixProgrammingContest/bin/MatrixMultiplication$Matrix.class
Binary file not shown
View
BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/MatrixMultiplication.class
Binary file not shown
View
BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/MatrixMultiplication2.class
Binary file not shown
View
BIN  2012-nutanix-programming-contest/NutanixProgrammingContest/bin/RevenueMaximization.class
Binary file not shown
View
68 2012-nutanix-programming-contest/NutanixProgrammingContest/src/Laundry.java
@@ -0,0 +1,68 @@
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.Scanner;
+
+/**
+ *
+ * @author wonjohnchoi
+ *
+ */
+public class Laundry {
+ public static void main(String args[]) {
+ Scanner in = new Scanner(System.in);
+ int t = in.nextInt();
+ for (int i = 0;i < t; i += 1) {
+
+ long nCoins = in.nextLong();
+ int nMachines = in.nextInt();
+ long required[] = new long[nMachines];
+ long returned[] = new long[nMachines];
+
+ for (int j = 0; j < nMachines; j += 1) {
+ required[j] = in.nextLong();
+ }
+
+
+ for (int j = 0; j < nMachines; j += 1) {
+ returned[j] = in.nextLong();
+ }
+
+ LinkedList<Machine> machines = new LinkedList<Machine>();
+ for (int j = 0; j < nMachines; j += 1) {
+ machines.add(new Machine(required[j], returned[j]));
+ }
+
+ Collections.sort(machines);
+ int nWashes = 0;
+
+ while (!machines.isEmpty()) {
+ Machine cur = machines.remove();
+ //System.out.println("Using machine: " + cur.required + " " +cur.returned);
+ if (nCoins >= cur.required) {
+ long usable = nCoins - cur.required;
+ //System.out.println(cur.required + " " + cur.returned + " " + cur.diff);
+ long washes = usable / cur.diff + 1;
+ nWashes += washes;
+ nCoins -= nWashes * cur.diff;
+ }
+ }
+
+ System.out.println(nWashes);
+ }
+ }
+
+ static class Machine implements Comparable<Machine>{
+ long required;
+ long returned;
+ long diff;
+ Machine(long required, long returned) {
+ this.required = required;
+ this.returned =returned;
+ diff = required - returned;
+ }
+ @Override
+ public int compareTo(Machine arg0) {
+ return (int)(diff - arg0.diff);
+ }
+ }
+}
View
46 2012-nutanix-programming-contest/NutanixProgrammingContest/src/LightsOn.java
@@ -0,0 +1,46 @@
+import java.util.Scanner;
+
+/**
+ *
+ * @author wonjohnchoi
+ *
+ */
+public class LightsOn {
+ public static void main(String args[]) {
+ Scanner in = new Scanner (System.in);
+
+ int t = in.nextInt();
+ in.nextLine();
+ for (int i = 0; i < t; i += 1) {
+ String line = in.nextLine();
+ String[] data = line.split(",");
+ boolean[][] table = new boolean[data.length][data[0].length()];
+
+ for (int j = 0;j < data.length; j += 1) {
+ for (int k = 0;k < data[j].length(); k += 1) {
+ table[j][k] = data[j].charAt(k) == '1' ? true : false;
+ }
+ }
+
+ //goal is make everything true;
+ int nSwitch = 0;
+ for (int j = table.length - 1; j >= 0; j -= 1) {
+ for (int k = table[j].length - 1; k >= 0; k -= 1) {
+ if (!table[j][k]) {
+ nSwitch += 1;
+ for (int m = 0; m <= j; m += 1) {
+ for (int n = 0; n <= k; n += 1) {
+ table[m][n] = !table[m][n];
+ }
+ }
+ }
+ }
+ }
+
+ System.out.println(nSwitch);
+
+
+
+ }
+ }
+}
View
102 2012-nutanix-programming-contest/NutanixProgrammingContest/src/MatrixMultiplication.java
@@ -0,0 +1,102 @@
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.Scanner;
+
+/**
+ *
+ * @author wonjohnchoi
+ *
+ */
+public class MatrixMultiplication {
+ static double time;
+
+ public static void main(String args[]) {
+ //recursive brute force. may run out of time.
+
+ Scanner in = new Scanner(System.in);
+
+ int t = in.nextInt();
+ for (int i = 0; i < t;i += 1) {
+
+ time = System.currentTimeMillis();
+ //System.out.println(i);
+ int n = in.nextInt();
+
+ ArrayList<Matrix> matrices = new ArrayList<Matrix>();
+ for (int j = 0;j < n; j += 1) {
+ matrices.add(new Matrix(in.nextInt(), in.nextInt()));
+ }
+
+ Integer result = mul(matrices);
+ if (result == null) {
+ System.out.println(-1);
+ } else {
+ System.out.println(result);
+ }
+ }
+ }
+
+ private static Integer mul(ArrayList<Matrix> matrices) {
+ if (System.currentTimeMillis() - time >= 400) {
+ return null;
+ }
+ //System.out.println(matrices.size());
+ if (matrices.size() == 1) {
+ return matrices.get(0).m * matrices.get(0).n;
+ }
+
+ int max = Integer.MIN_VALUE;
+ for (int i = 0; i < matrices.size(); i += 1) {
+ for (int j = i + 1; j < matrices.size(); j += 1) {
+ LinkedList<Matrix> matrix = matrices.get(i).mul(matrices.get(j));
+ if (matrix.size() != 0) {
+ for (Matrix m : matrix) {
+ Matrix m1, m2;
+
+ matrices.add(m);
+ m1 = matrices.remove(j);
+ m2 = matrices.remove(i);
+
+ Integer val = mul(matrices);
+ if (val != null) {
+ max = Math.max(max, val);
+ }
+
+ matrices.add(i, m2);
+ matrices.add(j, m1);
+ matrices.remove(matrices.size() - 1);
+ }
+ }
+ }
+ }
+
+ if (max == Integer.MIN_VALUE) {
+ return null;
+ } else {
+ return max;
+ }
+ }
+
+ static class Matrix {
+
+ int m;
+ int n;
+ Matrix(int newM, int newN) {
+ m = newM;
+ n = newN;
+ }
+
+ LinkedList<Matrix> mul(Matrix matrix) {
+ LinkedList<Matrix> poss = new LinkedList<Matrix>();
+ if (n == matrix.m) {
+ poss.add(new Matrix(m, matrix.n));
+ }
+
+ if (m == matrix.n) {
+ poss.add(new Matrix(n, matrix.m));
+ }
+
+ return poss;
+ }
+ }
+}
View
88 2012-nutanix-programming-contest/NutanixProgrammingContest/src/MatrixMultiplication2.java
@@ -0,0 +1,88 @@
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.Scanner;
+
+/**
+ *
+ * @author wonjohnchoi
+ *
+ */
+public class MatrixMultiplication2 {
+ static double time;
+
+ public static void main(String args[]) {
+ //recursive brute force. may run out of time.
+
+ Scanner in = new Scanner(System.in);
+
+
+ /*
+ * 49
+3
+-1
+-1
+
+1
+10
+81
+1000
+1000000
+1000
+1000000
+-1
+255025
+909000
+-1
+-1
+36
+16
+ */
+ int t = in.nextInt();
+ for (int i = 0; i < t;i += 1) {
+
+ //System.out.println(i);
+ int n = in.nextInt();
+
+ boolean[][] graph = new boolean[1001][1001];
+ for (int j = 0; j < n; j += 1) {
+ graph[in.nextInt()][in.nextInt()] = true;
+ }
+
+ for (int j = 0; j < graph.length; j += 1) {
+ for (int k = 0; k < graph.length; k += 1) {
+ for (int l = 0; l < graph.length; l += 1) {
+ if (graph[j][k] && graph[k][l]) {
+ graph[j][k] = false;
+ graph[k][l] = false;
+ graph[j][l] = true;
+ }
+ }
+ }
+ }
+
+ boolean found = false;
+ boolean bad = false;
+ int ans = 0;
+ for (int j = 0; j < graph.length; j += 1) {
+ for (int k = 0; k < graph.length; k += 1) {
+ if (graph[j][k]) {
+ if (found) {
+ bad = true;
+ }
+ found = true;
+ ans = j * k;
+ }
+ }
+ }
+
+ if (bad) {
+ System.out.println(-1);
+ continue;
+ }
+ System.out.println(ans);
+
+
+
+ }
+ }
+}
View
50 2012-nutanix-programming-contest/NutanixProgrammingContest/src/RevenueMaximization.java
@@ -0,0 +1,50 @@
+import java.util.Arrays;
+import java.util.Scanner;
+
+/**
+ *
+ * @author wonjohnchoi
+ *
+ */
+public class RevenueMaximization {
+ public static void main(String args[]) {
+ Scanner in = new Scanner(System.in);
+
+ int t = in.nextInt();
+
+ for (int i = 0; i < t; i += 1) {
+ int n = in.nextInt();
+
+ int[] ps = new int[n];
+ for (int j = 0; j < n; j += 1) {
+ ps[j] = in.nextInt();
+ }
+ Arrays.sort(ps);
+
+ //n<=4
+ int ans = 0;
+ if (n <= 4) {
+ for (int j = 0;j < n;j += 1) {
+ ans += ps[j];
+ }
+ System.out.println(ans);
+ continue;
+ }
+
+ //System.out.println(Arrays.toString(ps));
+ //brute force
+ ans = Integer.MIN_VALUE;
+ for (int j = 0;j < n ;j += 1) {
+ for (int k = j + 1; k < n ;k += 1) {
+ for (int m = k + 1; m < n; m += 1) {
+ for (int v = m + 1; v < n; v += 1) {
+ ans = Math.max(ans, ps[j] * (k - j) + ps[k] * (m - k) + ps[m] * (v - m) + ps[v] * (n - v));
+ //System.out.println("ans:"+ans+" "+j+" "+k+" "+m+" "+v);
+ }
+ }
+ }
+ }
+ System.out.println(ans);
+ }
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.