WA in SPOJ — Break !!!

Revision en1, by rajon_aust, 2015-07-27 16:42:48

I tried to solve the problem last 3 days . I didn't understand where my algorithm not work ! I use strongly connected component and dynamic programming . Please provide some suggestion that how can I solve the problem . Thanks in advance .

Problem link : http://www.spoj.com/problems/BREAK/

My solution link : http://ideone.com/5WMx0q

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English rajon_aust 2015-07-27 16:42:48 363 Initial revision (published)