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.
Could someone advise whether I am misinterpreting the instructions, or whether this is an incorrect test:
The test result says
81
(among other similar examples) should be included in the output.The rows with
# used in P
noted appear to be used in a path ([698, 5290, 9782, 2332, 92, 81]
) which contains a friend of the prince (2332
). This leads me to believe the ID of81
should not be included as per the formula in this section in the instructions:Is it simply that the end of the formula is not accurate (
$ p \notin F $
), or am I mistaken?The fixed tests are not fixed, they are relying on the ref solution. Meaning if the ref solution is wrong, there is no guarantee on the specs. At all.
Also, the fixed tests should hold all the needed data for each test in one place: input data, princ and thief ids, and also the expected output. The sample tests need to also be updated with this.
Who the hell reviewed the random tests and didn't notice THIS:
Hi,
Something isn't specified "correctly", apparently, but more importantly, the efficiency tests are using some outputs that are built entirely differently of all the other tests (edit: that, or the problematic case comes up more frequently when the number of nodes is huge): I currenlty have a solution (fast enough) that is passing all the tests, but returns wrong results on some efficiency tests only. Problem being: how am I supposed to find the hidden spec/stuff I misunderstood on inputs with more than 4000 nodes...?
This comment is hidden because it contains spoiler information about the solution
Tests should fail without raising exceptions when the result is not iterable.
Reading the discussion below, I think the description should use "index" instead of "element", because the whole "indistinguishable" only makes sense when you completely ignore the actual elements in the array.
This comment is hidden because it contains spoiler information about the solution
Rust:
tests
(right now it is possible to call thegcd
function defined in tests and it is not possible to redefine it).I think because of drafting this kata wasn't updated to 3.11 and stuck into 3.10; made a fork with update to 3.11
This is a lie: even the author solution is
O(log(t))
.It should be noted that the expected result is incorrect:
forecast_population(1000,800,40_000_000,(0.05,0.2),(0.0000005,0.0000005)
should be(698634388210.59, 174658597052.65)
, not(698634383958.54, 174658595989.64)
.Frankly speaking, rounding to 2 decimal places is completely wrong for two reasons:
forecast_population(1,5,1,(0.3,0.2),(0.025,0.015))
can easily give(1.7249999999999999, 4.375)
which would round to(1.724, 4.375)
instead of(1.725, 4.375)
t
(especially in the random tests) will generate a value so large there is no "2 decimal places", e.g(2.3734649910435697e+19, 2.221405859431348e+19) should equal (2.373464977977128e+19, 2.221405847202025e+19)
Also, in random tests arbitrary floats are passed in anyway, so testing exact float equality is nonsensical.
(Also, to kata author: your solution is numerically unstable: it results in an error about
10^-8
from the actual value. Please replace it with something numerically stable and actually accurate before replacing the equality with approximate equality; otherwise still nobody can pass your tests.)Percentage goes from 0 to 100, but the example tests show these two values going from 0 to 1, so they're just ratios and aren't percentages.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...