Mojtaba and caching thief

Problem Name:
Mojtaba and caching thief
Site:HackerEarth
Links:
Tags:
Problem setters: