Sort 3 Discussions, By:

Sorry, you do not have a permission to answer to this question.

  • jscholz 10 years ago + 1 comment

    I'm not seeing how removing 3, 5 reduces the area. This is how I visualize the setup in the example: y axis
    |
    4052
    0000
    0000
    0130--- x axis

    The rectangle still has to have corners at 4 and 2 and a bottom edge at 1.

    Add Reply Preview cancel

    Sorry, you do not have a permission to answer to this question.

    • Khongor 10 years ago + 0 comments

      @jsholz:
      There are 5 stains.

      0 1  
      3 3  
      2 0  
      0 3  
      2 3
      

      Following is the correct visualization.
      0104
      0000
      3005
      0002

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

    • danielfleischman 10 years ago + 3 comments

      I fail to see how removing 1,4 and 2,1 will give us the same area. Removing 1,4 will give us an area of 4*2 = 8, while removing 2,1 will give us an area of 4*3 = 12. Can you please clarify this?

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

      • PRASHANTB1984 10 years ago + 0 comments

        Hello - 1,4 and 2,1 are the indices of the stains in the list (and not the coordinates of the stains)

        Add Reply Preview cancel

        Sorry, you do not have a permission to answer to this question.

        • danielfleischman 10 years ago + 0 comments

          I understand that. If we remove stains 1,4 we still have stains 2,3,5 at positions (3,3), (2,0), (2,3). So a piece of silk that is 4x2 is enough to cover everything (assuming that stains are unit squares... if they are points the area I need is 3x1).

          If we remove 2,1 we are left with 3,4,5 at positions (2,0), (0,3), (2,3), and now we need 4x3 (or 3x2).

          Add Reply Preview cancel

          Sorry, you do not have a permission to answer to this question.

          • MatRush 10 years ago + 0 comments

            I don't understand it too.. :( I have the same calculation with you...

            Add Reply Preview cancel

            Sorry, you do not have a permission to answer to this question.

          • lewin 10 years ago + 3 comments

            Are stains considered points (i.e. if I have one stain, what is the area of the silk cloth needed to cover it)?

            Does the rectangle have to be axis parallel?

            Also, the hint says "So removing any of the following set of stains will lead us to a conbination that will need less silk.". I thought we wanted a configuration that minimizes X. Are we instead counting configurations where we get a smaller area?

            Add Reply Preview cancel

            Sorry, you do not have a permission to answer to this question.

            • Khongor 10 years ago + 0 comments

              Hello @lewin,

              Are stains considered points (i.e. if I have one stain, what is the area of the silk cloth needed to cover it)? - The are will be 1.

              I thought we wanted a configuration that minimizes X. Are we instead counting configurations where we get a smaller area? - You are right, we need to count number of configurations that minimizes X.

              Add Reply Preview cancel

              Sorry, you do not have a permission to answer to this question.

              • lewin 10 years ago + 0 comments

                Thanks for the quick response! I think I got it

                Add Reply Preview cancel

                Sorry, you do not have a permission to answer to this question.

                • Khongor 10 years ago + 0 comments

                  The rectangle has to be axis parallel.

                  Add Reply Preview cancel

                  Sorry, you do not have a permission to answer to this question.

                1. Challenge Walkthrough
                  Let's walk through this sample challenge and explore the features of the code editor.1 of 6
                2. Review the problem statement
                  Each challenge has a problem statement that includes sample inputs and outputs. Some challenges include additional information to help you out.2 of 6
                3. Choose a language
                  Select the language you wish to use to solve this challenge.3 of 6
                4. Enter your code
                  Code your solution in our custom editor or code in your own environment and upload your solution as a file.4 of 6
                5. Test your code
                  You can compile your code and test it for errors and accuracy before submitting.5 of 6
                6. Submit to see results
                  When you're ready, submit your solution! Remember, you can go back and refine your code anytime.6 of 6
                1. Check your score