Reagrding MLE veridict.

Правка en1, от AARYABHATTA_THE_GREAT, 2024-12-29 11:56:06

Can Someone please help me out with optimizing my solution?

Question Link -> https://mirror.codeforces.com/contest/2037/problem/G

My Solution -> https://mirror.codeforces.com/contest/2037/submission/298945671

Its obvious what I am trying to do. I simply create DAG by adding edges between indexes where transition is possible. Then I run Kahn's algo to sort the nodes and then its simple dp to find number of ways to reach the ending node.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский AARYABHATTA_THE_GREAT 2024-12-29 11:56:06 460 Initial revision (published)