How to count simple cycles between cell (1,1) and cell (n,m) in a grid??

Правка en1, от AzorAhai, 2016-04-15 22:00:06

Hi guys, I was trying to solve this problem http://acm.timus.ru/problem.aspx?space=1&num=1459 obviously the solution is counting simple cycles between cell (1,1) and cell (n,m) in the given grid. but since m is very large I think that we need to use matrix power to solve this problem .. but I could't find any recurrence to use.. any help please?? thanks in advance.

Теги matrix power, dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский AzorAhai 2016-04-15 22:00:06 447 Initial revision (published)