alamin_2014's blog

By alamin_2014, history, 8 years ago, In English

please, My code was absolutely right but I got Wa test no 37. Anybody can help me why my code got wa test case 37 . I did not find any bug. problem : http://mirror.codeforces.com/contest/711/problem/A my code: http://pastebin.com/x8JYay6J

  • Vote: I like it
  • -19
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Line 13 and 19, you are using some positions in the char matrix before reading them. If you have not read them then they will contain random data and there is a a high probability then at some point that "random" values may coincide with (OO), so your program will assume it is a YES.

Never use a not initialized position, and avoid any pain.

»
8 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it