You come home and fell some unpleasant smell. Where is it coming from? You are given an array a. You have to answer the following queries: You are given two integers l and r. Let ci be the number of occurrences of i inal: r, where al: r is the subarr…