#include #include #include using namespace std; #define N 100005 #define P 9973 int n,m,k,l,t,s,ans,T,x,y; int inv[N],a[N]; char st[N]; int main(){ inv[1]=1; for (int i=2;i