3393 - Lucky Ways

Discussion around the problems of the COJ.
Forum rules
Remember that posting AC code is not allowed here. If you are going to ask a question or to post a solution, describe your algorithm instead. Posting AC code will be penalized.
Post Reply
User avatar
ymondelo20
Posts: 1968
Joined: 9 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

3393 - Lucky Ways

Post by ymondelo20 » 5 years ago



"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

User avatar
ymondelo20
Posts: 1968
Joined: 9 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

Re: 3393 - Lucky Ways

Post by ymondelo20 » 5 years ago

Básicamente, armar un DAG que contenga todos los posibles caminos entre A y B.
Luego usar programación dinámica para contar dichos caminos de forma eficiente.
Suena sencillo, pero su implementación no lo es :(
"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

Post Reply

Return to “Problem set”