Блог пользователя menyhlas

Автор menyhlas, история, 44 часа назад, По-английски

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

Thanks!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
43 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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 .