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

Автор EslamYassien, 14 лет назад, По-английски

I can't understand the problem. can anyone help me please :)

Problems link: http://www.codeforces.com/problemset/problem/196/B

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

»
14 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

Here's the main idea:

If you can reach cell (i,j) in maze A and also in some other maze B, then you can walk infinitely. This reduces the space of your BFS to N*N (a node in your BFS consists of (i,j,mazeNumber)).