I think this and this solution is similar. But one gives correct answer and other gives RE. can someone explain the reason behind this? (RE is due to assert() statement and if I remove that then it shows TLE and sometimes RE).se
I am also facing this issue - random behaviour.
did you got the mistake?
@admin same solution is giving different verdicts. https://www.codechef.com/viewsolution/20395972 https://www.codechef.com/viewsolution/20398061 please check i submitted it during contest but got only partial points … please look into this before next long challenge .
i am also facing similar behaviour…
@vijju123 can you please find the mistake? I think this happen because of iterator of set becoming invalid (on erase) (actually i’m thinking that once we erase an element the iterator of the next element is different (not it++) or something like that. Can you please clear the doubt.)
@issue resolved, try to resubmit your solutions