Ad
  • Custom User Avatar

    This looks fixed

  • Custom User Avatar

    I prefer to make all rules consistent and remove the special rule for 0.

  • Custom User Avatar

    Should the 'special rule' be removed, and the description/reference solution fixed? Or should the special rule be mentioned in the description properly?

  • Custom User Avatar

    The reference solution cannot solve some cases. For example, the case [1, 2, 2, 1, 2, 4, 0, 1, 4], w = 3, l = 3 has the following solution: ['M', 'H', 'M', 'H', 'M', 'M', 'H', 'H', 'M']. But the reference solution returns ['?', '?', '?', 'H', '?', 'M', 'H', 'H', 'M'].

  • Custom User Avatar

    It is a paradox if a special rule for 0 is assumed. This rule is not explained in the description (but it is hinted there). See my issue above.

  • Custom User Avatar

    The rule for people[i] = 0 is not explained in the description. The reference solution and all test cases assume the following rule: if people[i] = 0 then the i-th person and all neighbors of the i-th person are innocents (H). This rule does not follow from the general rule "there are at least 0 monsters adjacent to me".

  • Custom User Avatar

    Random tests sometime fail with the following message:

    'Situation is paradoxical' should equal 'paradox'
    

    The reference solution in tests should return 'Situation is paradoxical'.

  • Custom User Avatar

    Don't feel bad about it, most programming problems you'll face in the world won't be solvable with a clean standard library import

  • Custom User Avatar

    Is it simply not tested? Or how does your solution handle paradoxes (I don't quite understand how a situation can be a paradox at all.)

  • Custom User Avatar

    This is indeed not a paradox, just tested with my solution and it gives what you found.

  • Custom User Avatar

    I am confused by the 'paradoxical' situation that you mention. I cannot see how the people represented by 1 are not monsters.

    The input is [0, 0, 0, 1, 0, 1, 0, 0, 0] (From description). Which, in a square, looks like:

    000
    101
    000
    

    Now, since at least 0 must always be true, we can infer that all 0s are human:

    HHH
    1H1
    HHH
    

    And now, since we know all surrounding people are Human, the At least 1s must definitely be lies -> Monsters.

    HHH
    MHM
    HHH
    

    Where is the paradox? Am I missing something??

  • Custom User Avatar

    It's been two weeks at this point... I wonder if there is something wrong?

  • Custom User Avatar

    You sure? Test cases use deepcopy to prevent that

  • Custom User Avatar

    users can mutate inputs in python. At first my solution did not work because of that.

  • Custom User Avatar

    nice easy problem

  • Loading more items...