Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

Hepic_Antony_Skarlatos's blog

By Hepic_Antony_Skarlatos, 10 years ago, In English

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 !!!

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it
visited = new bool[N+1,M+1];
for (int i = 0; i <= N; ++i)
                for (int j = 0; j <= N; ++j)
                    visited[i,j] = false;

This code have a bug)

And i think it have more)

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

40. visited = new bool[N+1,M+1];


46. for (int j = 0; j <= N; ++j) 47. visited[i,j] = false; // RE if N > M
»
10 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Thank you both for your time to check my source. That was the error.