#include #include #include using namespace std; using ll = long long; #include using mint = atcoder::modint998244353; void solve(){ ll n,k; cin>>n>>k; vector a(n); for(int i = 0;i>a[i]; ll sum = 0; for(int i = 0;i use(n),res(n); for(int i = 0;i idx(n); for(int i = 0;i res[j]; return a[i] > a[j]; }); ll now = 0; for(int i = 0;i fac(k+1,0); fac[0] = 1; for(int i = 1;i<=k;i++) fac[i] = fac[i-1] * i; for(int i = 0;i>t; while(t--){ solve(); } }