solution link
For row 1 to r
For col 1 to c
If S[row][col]==‘R’
// Collision with U, we check on diagonal path only
r_init=row+1;
c_init=col+1;
if S[r_init][c_init]==‘U’ and S[row][col_init]!=’#’
//Check for straight line paths if there isn’t any ‘#’ on the path
And score ++;
It will be more or less copy paste of this part for different kind of meets .
solution
if you want some help please ask in comments…!
2 Likes
I tried by ur method but i am getting W.A. Can you correct my code. The link is
https://www.codechef.com/viewsolution/24963003
it do have some implementation problem … because logic you used was correct
and it is not possible for me to read each and every line and find error it will take time
i will suggest you to freshly implement this logic again …that is the best thing you can do
Ok thanx I will try again