#include #include #include #include #include #include #include #include #define logk(x) (int)(log(double(x))/log(2.0)) using namespace std; const int MAXN = 100000+100; int a[MAXN]; char ch[MAXN]; long long sum; void solve(){ int n,m; long long que,sum=0; scanf("%d%d",&n,&m); for(int i=0;i