Design a data structure that stores a stream of vehicle sensor telemetry events and supports efficient real-time queries over a sliding time window. Each event is a pair (timestamp, value) for a single sensor, where timestamps are added in non-decreasing order. Implement a function that processes a list of operations and returns query results. Supported operations are: add(timestamp, value), avg(k) returning the average of values with timestamp >= current_timestamp - k + 1, and max(k) returning the maximum value in that same window. If the window is empty, return -1.
1 <= len(operations) <= 10^50 <= timestamp <= 10^9-10^6 <= value <= 10^6add operations are non-decreasing1 <= k <= 10^9add occurs before any query