Page 3 of 3

Re: 11352 - Crazy King

Posted: Fri Jul 25, 2014 8:34 am
by moudud99
I tried it with BFS.I think my code is ok but I am getting WA. please help me
thanks in advance.

Code: Select all

You rock lighted
removed after AC

Re: 11352 - Crazy King

Posted: Fri Jul 25, 2014 5:33 pm
by lighted
Your memset way is wrong.

Code: Select all

for(i=0; i<201; i++)
{
   memset(grid[i],0,200);
}
It must be

Code: Select all

for(i=0; i<201; i++)
{
    memset(grid[i], 0, 200 * sizeof(int));
}
Or it must be

Code: Select all

for(i=0; i<201; i++)
{
    memset(grid[i], 0, sizeof(grid[i]));
}
Or this way

Code: Select all

memset(grid, 0, sizeof(grid));

Re: 11352 - Crazy King

Posted: Tue Sep 16, 2014 12:33 pm
by shuvokr
@SONNET_N try this case

Code: Select all

Sample Input:
1
5 3
...
Z..
Z..
Z.B
..A

Sample Output:
Minimal possible length of a trip is 1