Need help with DIV 2 B Problem

Revision en1, by LightYagami674, 2020-01-28 05:39:27

6B - President's Office I submitted this solution — 69647174

What I am trying to do is to start dfs starting on the first cell of the president's table. If there is another table in that cell's neighbour i call the color function which is also dfs but on the deputy's table and increase the ans (res) by 1.

I do not know what is wrong in this approach. Can anyone help?

Tags #dfs, #div2 b

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English LightYagami674 2020-01-28 18:58:30 56 Tiny change: 'yone help?' -> 'yone help?\n\nUPD: Solved thanks to [user:CodingKnight]'
en1 English LightYagami674 2020-01-28 05:39:27 415 Initial revision (published)