Wow. Thanks a lot Parker. :) It worked. Got AC. Looks like item2 and item1 are swapped internally.
On Wed, Dec 5, 2012 at 6:01 PM, ZHANG Xiongqi, Parker < [email protected]> wrote: > Basically, you have a wrong comparator for the sort function. > > /*** > int cmp (point item1, point item2) > { > if (item1.x == item2.x) > { > return (item1.y <= item2.y); > } > return item1.x < item2.x; > } > ***/ > > This is what you truly need. > > Parker > > > On 2012/12/5 14:36, thefourtheye dIVi wrote: > >> I am not sure why my code fails at Test case number 6. Please help me at >> the earliest. >> >> http://acm.timus.ru/problem.**aspx?space=1&num=1119<http://acm.timus.ru/problem.aspx?space=1&num=1119> >> >> And this is the code which I submitted http://ideone.com/YZX5iO >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Code Jam" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to google-code+unsubscribe@** >> googlegroups.com <google-code%[email protected]>. >> For more options, visit >> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >> . >> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to google-code+unsubscribe@** > googlegroups.com <google-code%[email protected]>. > For more options, visit > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > > > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" 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 https://groups.google.com/groups/opt_out.
