0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-30 17:36:27 +00:00

A - CQXYM Count Permutations

https://codeforces.com/contest/1581/submission/130344045
This commit is contained in:
Baoshuo Ren 2021-09-30 20:34:36 +08:00 committed by Baoshuo Ren
parent 51b7412d56
commit d1e3ca9f09
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

22
CodeForces/1581/A/A.cpp Normal file
View File

@ -0,0 +1,22 @@
#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int t, inv[100005];
long long n, ans;
int main() {
cin >> t;
while (t--) {
ans = 1;
cin >> n;
n *= 2;
while (n) {
ans = ans * n-- % mod;
}
cout << ans * 500000004 % mod << endl;
}
return 0;
}