← 返回 meta 的题目列表In-Memory Record Store with Timestamp and TTL
类型:online_judge
Problem: In-Memory Record Store with Timestamp and TTL (Level 3)
Extend the previous in-memory record store to support timestamps and time-to-live (TTL).
Extended Semantics
You must incorporate write time and expiration into the existing add/remove/scan operations:
Each write/update includes a timestamp.
A record may have a ttl (time to live).
During reads/scans, determine whether a record is expired based on the prompt’s rule (commonly something like: expired if now >= write_ts + ttl). Expired records should be treated as not visible.
Requirements
Implement the additional functions required by the prompt/template (exact function list was not included in the post).
All operations must produce correct outputs under TTL expiration rules.
Constraints and I/O
Follow the OA harness for function signatures, input/output format, and constraints (not provided in the shared text).