I was going through accepted solutions for problem “Maximum Number” in October Lunchtime 17, and saw that O ( n^2 ) solutions didn’t get TLE for large constraints. Maybe, its due to weak test cases. @admin I request you to please look into this matter. Listed below are some of the solutions which should give TLE :
OPTSET also has weak test cases. See this solution: 15993038. The solution only considers subsets of length 2, which should give WA. I’m amazed to see this got 40 points.
Not sure what you mean by an insight. It does not give correct answers for certain cases, therefore it is incorrect.
If solutions like this pass then the contest rewards people who code before they think, rather than people who realize that an approach won’t work and try to think of a better one.
Mate… I knew that solution was incorrect. But i had an alternative solution in my mind too, which works for 40 points. I just thought to submit the wrong one first. Seems like that was a mistake, seeing someone was keeping an eye on my submissions.
I don’t see why it would be a mistake, maybe you misunderstand me. Of course it is no way your fault
My point is simple, test cases should not be so weak that such a solution passes.
And yes, I also think that the I/O dominates the time taken in your solution, since 106 iterations isn’t really much. You can try submitting after removing the processing part to make sure. You’ll get WA but you’ll be able to see the time.
@taran_1407 - @meooow did not acccuse you. The thing is, when you claim that Subsets of size 2 is an insight mate. then it sounds like you made some observation by which you can prove the correctness of what you did- which was false.
Hence, the reply was natural. Ultimately, its setter’s fault for weak test cases.