Hi, I’m doing surface puzzle with PHP and I got wrong input.
Inputs of first test case are :
L: 4
H: 4
rows:
‘####’
‘’
‘##O#’
‘’
N: NULL
I didn’t get (X, Y)s input because N value was NULL
Hi, I’m doing surface puzzle with PHP and I got wrong input.
Inputs of first test case are :
L: 4
H: 4
rows:
‘####’
‘’
‘##O#’
‘’
N: NULL
I didn’t get (X, Y)s input because N value was NULL
Thanks for your message, it looks like there is a problem with how the rows are read.
change
$row = stream_get_line(STDIN, $L, "\n");
into
$row = stream_get_line(STDIN, $L + 1, "\n");
problem solved
Thank you