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.
My solution is just an optimized version of permutating active tasks and calculating minimum time needed, so it's supposed to work.
The current reference solution returns suboptimal answers in some cases, for example:
As shown in the Gantt chart below, the optimal answer is no more than
(4) + (5) + (6) + (7) = 47
minutes, while the reference solution returns48
.The current reference solution returns a clearly incorrect answer in the following test case:
In
Fixed Tests
-Simple Case
-Test 1
, I got the following message:Could you explain why my answer is incorrect? 🤔
I think it would be sufficient to add some of the following test cases to the
edge_cases
. :)In rare cases (e.g. when n is
936093677463
), the reference solution returns clearly wrong answers.This comment is hidden because it contains spoiler information about the solution
Sure, I'll update it to Python once the improved random tests in C++ are done by the author.
Nope, I will add it if needed.
Python translation
performance
tag could be usedIt should be
When two different Gaussian primes have the same norm, you should specify how to sort them.
Special test cases suggestion:
FYI, my
$O(n\log p)$
solution passes in 6 to 9 seconds.Multiplication and division of large integers is not
$O(1)$
so your solution is not really linear. :)Loading more items...