Skip to content

Instantly share code, notes, and snippets.

@fourkbomb
Created June 2, 2016 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fourkbomb/938225d4d9cfe729ea7a65c01d6e393c to your computer and use it in GitHub Desktop.
Save fourkbomb/938225d4d9cfe729ea7a65c01d6e393c to your computer and use it in GitHub Desktop.
with open('in') as f:
R, C = map(int, f.readline().split())
tramp = []
for line in f:
tramp.append(list(map(int, f.readline().split())))
q = [((0, 0))]
done = set()
while q:
cur = q.pop()
jumpDist = tramp[cur[-1][0]][cur[-1][1]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment