Hi,please help me... I tried to write my code very simple... But time limit...!!! class Main{ static int[][] ar = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; static char[] temp; static char[][] grid; static int cnt; static boolean alive; public static void main(String[] args) { Scanner in = new Scanner(Syst...
Hi.
I know what is the problem and where is it...
But I can't fix it!!!
I tried so much...
Can you help me?
(It takes me wrong answer because if the length of the ships further more n/2.It sometimes don't understand!!!!)