Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Very interesting DSA problem to learn and figure out how it works.
This comment is hidden because it contains spoiler information about the solution
I'm pretty sure my solution is somewhat close to this one. Is mine supposed to pass?
Is there any reason to limit the problem to 3-SAT rather than a general SAT solver?
If the kata required some sort of optimization specific to 3-SAT, then it would make sense. However, most current solutions are general solvers, so I see no reason to limit the input to 3 literals.
Also, if you prefer to stick to 3-SAT, wouldn't
clauses: list[tuple[int, int, int]]make more sense thanclauses: list[list[int]]? It would help avoid then-SAT confusion, at least.You are correct, however, I believe the confusion comes from the line:
It kind of sounds like you are asking us to implement an
nliterals version of a 3-SAT solver, which would be an-SAT solver.Maybe just say:
And mention the
nvariables in the Input section.Though I think it's also fine as is, so do what you think is best and resolve the suggestion.
thx, done
This comment is hidden because it contains spoiler information about the solution
Fixed. And it also makes Python 4 seconds faster.
oops forgot about that, fixed
You can merge them into one by just doing the tests yourself and only tell codewars' test framework if all tests passed or not.
It looks like only Python has this problem.
I can think of a workaround but lemme ask first how should I merge "Test Passed"s into one?
I would also recommend disabling
allow_raise=Truefor fixed tests.approved
I suggest to split random tests in 2 batches, one with smaller input and one for the bigger. Break the bigger ones on first failure, but show all test cases for the smaller ones.
Loading more items...