How to solve problems involving BFS on states ?

Revision en1, by 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 !!

Tags bfs

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English realloc_anh1l1ator 2015-08-13 12:41:28 681 Initial revision (published)