from utils import sliding_window inp: list[int] = list(map(int, open('1.in'))) print(sum(s[0] < s[1] for s in sliding_window(inp, 2))) print(sum(s[0] < s[3] for s in sliding_window(inp, 4)))