#include #include #include using namespace std; const int mod = 1000000007; typedef long long LL; LL dp[2][8]; int f[51][51]; int main() { int T,N,M,K,l,now; LL tmp; scanf("%d",&T); for(int cas=1;cas<=T;cas++){ LL ans=0; scanf("%d%d",&N,&M); memset(f,0,sizeof f); for(int i=0;i