A题
CQXYM Count Permutations
当时知道是阶乘/2,但是数据都溢出了,边算边模又答案不对,就放弃了
// #pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
const int N = 2e8 + 10;
const int M = 2e6 + 1000;
const int inf = 1000000000000007;
const int mod = 1000000007;
const int pi = acos(-1);
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
ll T, n, m, tot, res;
// ll fac[N];数组过大还REcao
int main()
{
// IOS;
scanf("%lld", &T);
while (T--)
{
scanf("%lld", &n);
m = 2 * n, res = 1;
for (int i = 3; i <= m; i++) //从3开始避免除2
res = res * i % mod; //边乘边模是对的
printf("%lld\n", res);
// fac[0] = 1, fac[1] = 1, fac[2] = 2;
// for (int i = 3; i <= m; i++) //这样不知道为啥过不了,答案不对
// fac[i] = fac[i - 1] * i % mod;
// printf("%lld\n", fac[m] / 2 % mod);
}
return 0;
}