There was also a runtime error - in your original code you'd break out of the loop when it became impossible and leave the rest of that test case in the input buffer. You would then either try to read a line with one integer and split it into two (RE) or read past the end of the buffer (RE) as your input wasn't what you expected.
On Friday, 10 April 2020 19:49:15 UTC+1, eegee wrote: > > Turns out that it *was not* a Runtime Error. Thanks to @porker2008 I was > able to fix my answer by first sorting the activities. Apparently "Case #3: > CJJCC" is not a valid alternative for "Case #3: JCCJJ". > > > -- 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/189e4422-51ca-4059-9561-47fef85532ef%40googlegroups.com.