This is the harder version of the problem. In this version, 1≤n,m≤2⋅105. You can hack this problem if you locked it. But you can hack the previous problem only if you locked both problems. You are given a sequence of integers a=[a1,a2,…,an] of length n. Its subsequence is obtained by removing zero ...