I had the following problem in problem B which may have cost me the
qualification.
Like many of you in the last part of my algorithm I needed to sort the
distances in decreasing order. Here's what the problem was:
I used the sort function in STL with the following comparion function:
bool comp(const long long & a, const long long &b)
{
return a>=b;
}
This gave incorrect results for the small input. After the contest when I
started looking for the mistake I found that if I replace >= wiht > my code
worked on both the small and the large inputs. From this, I came to the
conclusion that the sort function didn't work properly for the comparison
function implemented with >= but worked with >. How can this be ? Can anyone
enlight me on this ?
Thanks,
Toni
--
You received this message because you are subscribed to the Google Groups
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-code?hl=en.