GOOD GALAXY input pattern

goodgal

#1

what is the input pattern of this question… should I take the input of each test case with a one line gap as given in the sample test cases OR without a line gap…

If I don’t read the gap then there is NZEC in some subtasks and IF I read the then I got NZEC in other subtasks…

What to do??


#2

Try reading the line and then checking if its empty or not.Maybe that will help.

Or if scanner.nextInt() does not give you TLE try using it instead.


#3

Yes, it seems, that first test case is the one from problem statement (with empty lines)…


#4

i don’t know about JAVA, with c++ it’s working pretty fine!! I found no problem with the input :confused:


#5

Because typically in Java we read the input line by line and if format is not the same it’s causing the problems… Format have to be exactly the same as described, they expect us to print also exactly the same output as described in problem statement…