Ad
  • Custom User Avatar

    this is very unreadable, you know you dont have to use a function library for everything, loops exist and etc.

  • Default User Avatar

    I know that. In my opinion, when lambda"sum" is used in accumulate, maybe it leads to a problem. Actually code want to assign 0 (the init number) to acc(the integer param in sum), but its function signature is(const char c, int acc), and maybe 0 -> c(the char param), and that's a little bug. You can take a look at the example in the link above. I tried these two verisons, and they all passed the test, so that's my problem.

  • Custom User Avatar

    Have you already realised what's wrong in your question? Those params are refer to lambda "sum" function. Not to accumulate.

  • Default User Avatar

    I have some trouble to understand your code.

    Why not (int acc, const char c) ? IN THE SORT FUNCTION.

    The first argument should be "acc" according to
    http://www.cplusplus.com/reference/numeric/accumulate/?kw=accumulate

    Can you explain to me, thx:)

  • Default User Avatar

    This problem is very difficult to understand, I still don't understand what the question is.
    E.g. ".. after I save 12"... 12 what? days? weeks? units of money? Ah! It's after the saturday where I saved 12 units. Difficult to catch.
    Then there is a table of days with missing values... is it zero?
    And finally, what's the point of mentioning the planet? Just to number the weeks?

  • Default User Avatar

    Allows duplicates in result.