this is my code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t,n,m;cin>>t;vector<pair<int ,int> >V(100000);
while(t–)
{
cin>>n>>m;
for(int i=0;i<100000;i++)
{
if(i<n)
{
cin>>V[i].first;V[i].second=i%m;
}
else
{
V[i].first=1000000007;V[i].second=i;
}
}
sort(V.begin(),V.end());
}
return 0;
}