http://apps.topcoder.com/wiki/display/tc/SRM+586. If you already read it before and are not interested in div1 medium, please go to the link anyway, because it now has the vote thing... I mean really, supposedly TopCoder has 500000 members, and a couple thousands are active in SRMs, but editorials only get around 20 votes if lucky? That doesn't make any sense.
I finally finished the editorial for the medium problem. Not without getting directions from hex539. I actually was quite close during the match. Remember my recap? Now that I fixed my setup, and valgrind shows line numbers, I was able to quickly find the mistake I had during the match. It turns out that battles could be space-separated lists and not just each index = a single battle. I didn't notice because the first example was nicely formatted. Then when valgrind wasn't giving me line numbers I think I panicked. It seems that I am a completely incapable c++ programmer without valgrind...
Anyway, although I had the top-level idea - You can find bounds from each battle, then you need a transitive closure to improve the bounds. I had no idea how to do the transitive closure. So I doubt I would have solved the problem during a match even in optimal test environment.
So, now I have to write the editorial for SRM 587. I started SRM 586 late because of finishing SRM 585, this is starting to be an issue. I wanted to finish 586 really fast , but it took me too long to get the hard. I hope to finish SRM 587 quickly, because I can't spend all my time doing editorials. I'd like to have a breath before SRM 588, really.