#include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector vi; typedef pair ii; typedef vector vii; typedef long double ld; typedef pair pll; #define FOR(i, a, b) for(int i = a; i < b; i++) #define ROF(i, a, b) for(int i = a; i >= b; i--) #define ms memset #define pb push_back #define fi first #define se second #define inp(n, a) vector a;for(int i=0;i>now;a.pb(now);} #define all(a) a.begin(),a.end() #define show(a) for(long long loppls=0;loppls<(long long)(a.size()-1);loppls++)cout< 0) { if (b & 1) res = res * a % m; a = a * a % m; b >>= 1; } return res; } long long inv(long long a, long long p){ return binpow(a, p-2, p); } vector fact; // must be init if nCk needed long long nCk(long long n, long long k, long long p){ return ((fact[n] * inv(fact[k], p) % p) * inv(fact[n-k], p)) % p; } long long exgcd(long long a, long long b, long long& x, long long& y) { x = 1, y = 0; long long x1 = 0, y1 = 1, a1 = a, b1 = b; while (b1) { long long q = a1 / b1; tie(x, x1) = make_tuple(x1, x - q * x1); tie(y, y1) = make_tuple(y1, y - q * y1); tie(a1, b1) = make_tuple(b1, a1 - q * b1); } return a1; } ll sum2(ll a, ll l, ll n){return (n*(a+l))/2;} ll ceil2(ll a, ll b){ll c=a/b;if(a%b!=0)c++;return c;} ll floor2(ll x, ll m){ll r=(x%m+m)%m;return (x-r)/m;} const ll INF=1e16,MAX=100020,MOD=998244353; void solve() { ll n,q;cin>>n>>q; ll a[n+1]; for(int i=1;i<=n;i++)cin>>a[i]; ll tmp[MAX]; for(int i=1;i<=n;i++)tmp[i]=a[i]; sort(tmp+1,tmp+n+1); ll len=unique(tmp+1,tmp+n+1)-(tmp+1); for(int i=1;i<=n;i++)a[i]=lower_bound(tmp+1,tmp+n+1,a[i])-tmp; ouo(a,n+1); while(q--){ ll u,v;cin>>u>>v; cout<