Can you answer these queries III

Problem Name:
Can you answer these queries III
Site:Spoj
Links:
Tags:
Problem setters: