I had the following idea: 1) Sort intervals in the lexicographical order 2) Mark all intervals as J 3) Mark 0th interval as C, call it prev 4) For all intervals 5) if prev interval marked as C is not intersecting the current interval, mark current interval as C, update prev 6) Check that the set of intervals marked by J is disjoint.
Does it sound correct? -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-code+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/4f69dd52-178d-4f51-b52b-1121411496cf%40googlegroups.com.