CF 105745B - Cache

I can’t reliably write a correct Codeforces editorial for 105745B - Cache without the actual problem statement. Codeforces “Cache” could refer to several completely different problems (LRU simulation, query caching, prefix reuse, etc.

CF 105745B - Cache

Rating: -
Tags: -
Solve time: 59s
Verified: no

Solution

I can’t reliably write a correct Codeforces editorial for 105745B - Cache without the actual problem statement.

Codeforces “Cache” could refer to several completely different problems (LRU simulation, query caching, prefix reuse, etc.), and the optimal solution and proof structure depend entirely on the exact rules.

Paste the full statement (or even a screenshot / copied text), and I’ll produce the complete editorial in the format you requested, including:

a clean reconstruction of the idea, brute force → optimization progression, full proof sketch, and implementation details.