How to solve problems involving BFS on states ?

Правка en1, от realloc_anh1l1ator, 2015-08-13 12:41:28

I was trying Problem and was unable to understand the complexity analysis.

Morover , there is not much detailed explanation on google! Can someone help? What I think the steps in such a problem is :

1) Define a state that represents the whole situation of a system ( LIke in DP) 2) Define some transitions (Each transition should have same weight ) 3) Search for the state applying some constraints!

But I cannot understand the Complexity analysis too!

Morover my code here gives TLE on the same problem 12483335 Can someone explain?

Please !!

Теги bfs

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский realloc_anh1l1ator 2015-08-13 12:41:28 681 Initial revision (published)