Ad
  • Default User Avatar

    I guess it's your implementation's problem. I faced the same but changed something in data structure and now it works. I'm sure it's because function composition and matrix multiplication are non-commutative so the order of evalutation should be preserved.

    I didn't have problems with min though.

  • Default User Avatar

    I tried your solution and I get:
    "Expected: equal to 22
    Actual: 16".
    So writing "...if no output to cout or cerr is getting actually written in test reports" is wrong.
    What more do you want?

    BTW you fail the first test "dotest(10, 22);". In this case you have the input, you have "actual", you have "expected" and, in addition, you have the corresponding exemple in the description: "Ex: u = [1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 27, ...]"... so you have everything you need to debug your code.

  • Default User Avatar

    The tests in c++ version are written horribly. How should I debug my solution, if no output to cout or cerr is getting actually written in test reports?
    I mean, I can debug it in my terminal and vim, but that kinda defeats the whole purpose of the web-site. Pls, fix

  • Default User Avatar

    Is c++ version broken? Function composition throws bad_function_call, and matrix_mult gives expected: [unsupported_type, ...] and so is the answer.
    Max test works, while min fails. I wonder, why are so many any_cast's in tests?

  • Default User Avatar

    There exist many comments amounting to the same message as yours.
    They are almost all about an incorrect observation. You're going to get an identical answer/reference to existing answers unless you add more information so that it is no longer the same comment as those others.

    If you provide a way to reproduce your observation (your code), others can point out the problem. Better for everyone.

  • Default User Avatar

    I am looking on log that is above my code.
    And yes, I've read comments for more than a minute and spent two hours of thinking and coding, so, please, keep your assumptions about my time away.
    This was not helpful at all.
    Thanks anyways for replying.

  • Custom User Avatar

    That's because you're reading the logs incorrectly. Take 1 minute and have a look at hundred other comments with similar questions.

  • Default User Avatar

    I don't get it..
    Input: a = {2,2,3}, b = {4,9,9}. b is obviously not a squared.
    Expected: true.....

    While my last version was checking if all elements in b are squares of some number in a, this failed another similar test.

    I don't get the point of this exersise.