[Official] Contest 4 Hints

I would like to say a few things:

  1. Rishup already pointed out, test cases are weak. Given the constraints, a O(n2) solution should not pass.
  2. The Python3 Solution is not mine.
  3. Python has different time multiplier (which might have given edge over cpp solution)
  4. Finally, the constants, they are ignored while calculating time complexity, but still play a major role. Read here

I know, it is strange for the same complexity to be accepted in one language and rejected in another, but maybe you should focus on improving the complexity from O(n2)

1 Like