This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import List | |
| import torch | |
| @torch.jit.script | |
| def part1(input: List[str]) -> int: | |
| depths = torch.tensor([int(line) for line in input]) | |
| return (depths[1:] > depths[:-1]).sum() | |
| @torch.jit.script | |
| def part2(input: List[str]) -> int: |