Problem Description Chika gives you an integer sequence a1,a2,…,an and m tasks. For each task, you need to answer the number of “friendly pairs” in a given interval. friendly pair: for two integers a
Problem Description You are given an array a1,a2,…,an(∀i∈[1,n],1≤ai≤n). Initially, each element of the array is unique. Moreover, there are m instructions. Each instruction is in one of the followin