menyhlas's blog

By menyhlas, history, 29 hours ago, In English

Hello Codeforcers! First 6 tests is false in Codeforces judges but first 6 test is true in my ide. WHY?

Thanks!

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
28 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

You are doing a mistake here , you are not taking input completely. You are comparing arr[i+1][j] etc. directly but you have not taken input for that . In your IDE , you may be using new compiler which sets default value zero or something else , which is not causing trouble . But CF judges are initialsing array with values which are causing trouble .Either use 2D vector , which default initialises to zero (As here zero will not cause trouble because no color is zero here ) or take input first . Issue is of default initialisation .