The problem I try to solve is: http://mirror.codeforces.com/contest/505/problem/B My code is: http://pastebin.com/Av4Ry8nS
In the third testcase,i receive "runntime error". This error is due of my code,or due of c# language? Because in the past,I had a similar error with c#,but not with c++.
Thank you for your time !!!
This code have a bug)
And i think it have more)
40. visited = new bool[N+1,M+1];
Thank you both for your time to check my source. That was the error.