Ad
  • Default User Avatar

    Ok, thank you, I only tried one of the test cases, when I tried all of them I found the problem. It actually had nothing to do with the sort function lol

  • Default User Avatar

    When you say "works fine" did you use the test case that your code fails on or did you pick a different one?
    Testing one input does not prove that it works for all input, and if you're going to say that the difference is a different environment then everything else should stay the same. When you change multiple things you can't say which of them is the cause.

    Suggestion: print out (and make sure to flush stdout) the input you get, and debug that locally.

  • Default User Avatar

    Works fine on my computer, here I get UndefinedBehaviorSanitizer:DEADLYSIGNAL when I change a comparison operator in a sort function...