[Community puzzles] The barnyard

Can a supermoderator edit my puzzle and add in its description that the number of animals is the first input?
Thank you.

The change occurred just when I was validating my solution ^^ For a few minutes, I wondered why my asserts were now triggered :sweat_smile:

So did someone change this after the puzzle went live? My solution no longer works. :smirk: Anyway, the example is still wrong:

Input
Rabbits Chickens
Heads 5
Legs 14

This is interesting since the example is auto-generated from the puzzle submission. Anyway, if there’s a variable [[n]] at the beginning of the input, then the Example should be modified.

  • danBhentschel
1 Like

Hi,

Could someone give a guess about the submit testcase #1? The IDE tests are all fine and submit 2-4 are also. I don’t know what did I miss.

Many thanks in advance,
Adam

Maybe the inverse of the determinant is not decimal. I don’t know.

Could you please give me some more details to help me recreate the problem?

Thanks,
Adam

Maybe you did not have the exact values.
When I developed this puzzle, the first bugs I had were these ones.
Note that my solution doesn’t use an algebra library, I coded it myself.

Well, i have coded a matrix solver, because these only have one exact solution vector. So with Gauss elimination it can be reduced to a unit matrix. I can’t see where the problem is, it even gives good answer when the numbers of the parts are not provided correctly.

Oh, where?

No, it’s not in IDE testcases, I created some myself.

Should I post my code? Because this seems like unfindable for me.

You can send it to me.

I cant send you message… To be honest I cant send one to noone… It says “Topic can’t be empty”, but I fill the topic field… How can I send it to you?:slight_smile:

Thanks,
Adam

The top right yellow button does not work?

No, I don’t have that button, maybe my trust level does not work. Can you send me a message? I hope they let me answer you:)

Thanks,
Adam

Hi everyone, I pass all tests in IDE but fail the third and fourth when submitting.

I’m using Gauss but I really don’t know where I’m wrong…

Can someone give me an advice ? :slightly_smiling:

Thanks,

Maybe your GauĂź method is wrong.

The testcases are so small that really, any solution should do the trick, provided it is correct.
Which is a good thing imo.
I had it solved by bruteforcing, then adopted a Cramer’s rule solution.

superior or equal instead of superior…

What?
You mean â©˝?