Submission #328841

#TimeUsernameProblemLanguageResultExecution timeMemory
328841xiaowuc1Jump (BOI06_jump)Cpython 3
5 / 100
35 ms3436 KiB
n = int(input()) g = [] dp = [] for _ in range(n): g.append([int(x) for x in input().split()]) dp.append([0] * n) dp[0][0] = 1 for i in range(n): for j in range(n): if i + g[i][j] < n: dp[i+g[i][j]][j] += dp[i][j] if j + g[i][j] < n: dp[i][j+g[i][j]] += dp[i][j] print(dp[n-1][n-1])
#Verdict Execution timeMemoryGrader output
Fetching results...