제출 #659340

#제출 시각아이디문제언어결과실행 시간메모리
659340Trisanu_DasJump (BOI06_jump)Pypy 3
100 / 100
66 ms20912 KiB
n = int(input()) a = [] dp = [] for _ in range(n): a.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 < n - 1 and i + a[i][j] < n: dp[i + a[i][j]][j] += dp[i][j] if j < n - 1 and j + a[i][j] < n: dp[i][j + a[i][j]] += dp[i][j] print(dp[n-1][n-1])
#Verdict Execution timeMemoryGrader output
Fetching results...