You have a directed graph with weighted edges (can be negative). Find the maximum-score path from to . If there is a positive cycle reachable from that can reach , the answer is infinite. Otherwise, use DP on the DAG formed by nodes reachable from .
Process in topological order, track dp[v] = max score to reach . Detect positive cycles using a modified DFS that tracks nodes in the current recursion stack.