question link : https://codeforces.net/problemset/problem/459/D solution link: https://codeforces.net/contest/459/submission/103579274
here if i am using arr[i]=upper_bound(arr1.begin(),arr1.begin()+n1,arr[i])-arr1.begin(); than it is showing wrong answer . why?
pls help.