I'm confused by the rules around resubmits for codeforces. When I read this link (not sure if this is the best link: https://mirror.codeforces.com/blog/entry/4088) it says the main test will be applied to "the last submitted solutions of each contestant for each problem".
Yet in a recent div 4, I did do a resubmit, but for the final ranking, my first successful submit was used instead of my last submitted solution (which helped my rank).
Is this the behavior what we can expect for all divisions? All resubmits are basically free lunches?
Thanks