Message rate limiter

Write codeEasy20 minStripe style

Your task

Implement a logger rate limiter. Given a chronologically ordered list of [timestamp, message] requests, a message should be printed only if it has not been printed in the last 10 seconds, meaning at least 10 seconds have elapsed since the last time it printed. Return a list of booleans, one per request, indicating whether each message is allowed to print. Timestamps are non-decreasing.

Examples

rate_limited(requests: list[list]) -> list[bool]
Example 1
Inputrate_limited([[1, "foo"], [2, "bar"], [3, "foo"]])
Output[True, True, False]