Ad
  • Custom User Avatar

    Yay, I found the easter egg :D But now I'm stuck :(

  • Default User Avatar
  • Custom User Avatar

    Do I need to make random tests harder? o_0

  • Custom User Avatar

    Sorry for offtop, but what software you used to generate this image? I was looking for something like that for a while

  • Custom User Avatar

    My solution is just an optimized version of permutating active tasks and calculating minimum time needed, so it's supposed to work.

  • Custom User Avatar

    How does your algorithm fare on this test case?

    1. Wash: carrots for 10 minutes
    2. Wash: rice for 5 minutes
    3. Boil: rice (takes 10 minutes)
    4. Boil: carrots (takes 2 minutes)
    5. Add: carrots for 20 minutes
    
  • Custom User Avatar

    The current reference solution returns suboptimal answers in some cases, for example:

    1. Wash: meat (takes 2 minutes)
    2. Wash: eggs (takes 1 minutes)
    3. Peel: eggs (takes 6 minutes)
    4. Cut: cheese (takes 2 minutes)
    5. Fry: cheese for 13 minutes
    6. Grate: cheese (takes 2 minutes)
    7. Fry: cheese for 30 minutes
    8. Wash: eggs (takes 3 minutes)
    9. Wash: eggs (takes 2 minutes)
    

    As shown in the Gantt chart below, the optimal answer is no more than (4) + (5) + (6) + (7) = 47 minutes, while the reference solution returns 48.

  • Custom User Avatar

    Thanks, should be fixed now. I also added a fixed case similar to this to the tests.

  • Custom User Avatar

    The current reference solution returns a clearly incorrect answer in the following test case:

    poly1 = [
        (Fraction(-27, 1), Fraction(153, 1)), 
        (Fraction(31, 1), Fraction(70, 1)), 
        (Fraction(156, 1), Fraction(81, 1)), 
        (Fraction(68, 1), Fraction(14, 1)), 
        (Fraction(121, 1), Fraction(-71, 1)), 
        (Fraction(8, 1), Fraction(-29, 1)), 
        (Fraction(-85, 1), Fraction(-93, 1)), 
        (Fraction(-66, 1), Fraction(0, 1)), 
        (Fraction(-176, 1), Fraction(46, 1)), 
        (Fraction(-51, 1), Fraction(61, 1))
    ]
    poly2 = [
        (Fraction(11, 1), Fraction(-47, 1)), 
        (Fraction(-161, 1), Fraction(-100, 1)), 
        (Fraction(-91, 1), Fraction(-4, 1)), 
        (Fraction(-243, 1), Fraction(63, 1)), 
        (Fraction(-42, 1), Fraction(59, 1)), 
        (Fraction(36, 1), Fraction(153, 1)), 
        (Fraction(90, 1), Fraction(54, 1)), 
        (Fraction(290, 1), Fraction(46, 1)), 
        (Fraction(122, 1), Fraction(-11, 1)), 
        (Fraction(168, 1), Fraction(-111, 1))
    ]
    

  • Custom User Avatar

    Ahh, that's on me. There was an error in comparing polygons that was corrected in the sample tests but not the main ones. Should be fixed now.

  • Custom User Avatar

    In Fixed Tests - Simple Case - Test 1, I got the following message:

    (
        (Fraction(20, 1), Fraction(0, 1)), 
        (Fraction(20, 1), Fraction(11, 1)), 
        (Fraction(30, 1), Fraction(15, 1)), 
        (Fraction(15, 1), Fraction(30, 1)), 
        (Fraction(11, 1), Fraction(20, 1)), 
        (Fraction(0, 1), Fraction(20, 1)), 
        (Fraction(0, 1), Fraction(0, 1))
    )
    should match
    [
        (Fraction(0, 1), Fraction(0, 1)), 
        (Fraction(0, 1), Fraction(20, 1)), 
        (Fraction(11, 1), Fraction(20, 1)), 
        (Fraction(15, 1), Fraction(30, 1)), 
        (Fraction(30, 1), Fraction(15, 1)), 
        (Fraction(20, 1), Fraction(11, 1)), 
        (Fraction(20, 1), Fraction(0, 1))
    ]
    

    Could you explain why my answer is incorrect? 🤔

  • Custom User Avatar
  • Custom User Avatar
    Failed to import gmpy2. Raise an issue in the discourse if you think that what you try to import is legit.
    
  • Custom User Avatar

    Really, I have no chance to optimise Python ( or the math ) enough to ever solve it.

  • Custom User Avatar

    I feel like if you tried to solve the kata you'd understand better (I know you won't).

  • Loading more items...