What should i apply dfs or bfs in FIND THE ISLAND Problem? Why?

@ssaxena36 no problem :slight_smile:

im getting sigsigv,https://www.codechef.com/viewsolution/13901448

@vivek96 you have declared the graph wrong.

It should be

vector<vector > graph(2001);

but working fine on local.

now getting WA.lol

Check the for loop you have in your main() function, it should be:

for(int i=1;i<=n;i++)

You missed the equal sign.

i corrected the code,but WA is still,u got AC?

Not yet :stuck_out_tongue:

4 WA…huh

now i tried accepted solution,it also gives wa.@admin please look at this matter,i think file issue

why we all are getting Wrong Answers?

I think the tester’s solution is wrong, that’s why we are getting wrong answers
moreover, its editorial has been removed now

1 Like

can any one provide me code to check cycle in graph? @shraeyas

I don’t know why my code is not working. Can anyone check I would be thankful.
CODE LINK: https://www.codechef.com/viewsolution/13936158

we all are getting wa.i think file issue