blob: f439f469ff859e8ca599e60bc79229be052f1d4b (
plain)
1
2
3
4
5
|
from utils import sliding_window
inp: list[int] = [int(l.strip()) for l in open('1.in')]
print(sum(s[1] > s[0] for s in sliding_window(inp, 2)))
print(sum(s[3] > s[0] for s in sliding_window(inp, 4)))
|