#include #include #include #include #include #define LL long long int using namespace std; LL sum,a,q[100005]; int main() { int t;cin>>t; while(t--) { LL n,m; cin>>n>>m; sum=0; for(int i=0;i