1st: In yesterday's contest I got FST on B on T.C-11, and after I reviewed it I found out that I was mistakenly running loop till n where I should run it till n-1 only, but ironically pretests passed without RTE, so could anyone explain why RTE didn't occur...
2nd: As per the blog the comparator should return false, and as per my code, it would be returning false, but doing this showed WA on CSES Projects DP question and as I entered (>=) it got AC. So, what's the logic behind this flaw, or is it due to my false understanding.
Thanks for your help!
im not sure what is happening in the first question and i can't really click the link for the "blog" in the second question
I am sorry for that, could you please check again... Thank you!
Auto comment: topic has been updated by AmanAgr2509 (previous revision, new revision, compare).
1) You can in Custom Invocations run following code
And see that it doesn't fail. Because
s2[1]
most likely lookup in memory used by map. That is still incorrect code and you were just "lucky" to not have RTE in pretests.2) If you are insist that with definety incorrect comparator you get AC and with correct comparator you get WA then your logic in whole code must be wrong. But you not provide neither problem nor code, so this is just guess.
Here's the link for the code of 2nd... And for 1st, I could say I was rather unlucky. :P Thanks a lot though.